• Stefy Lanza (nextime / spora )'s avatar
    runpod: let a client lease warm pods up to max_pods (v0.2.93) · 81507a8b
    Stefy Lanza (nextime / spora ) authored
    The autoscaler reacts to load — a pod is added once the least-loaded one
    already has scale_up_inflight_per_pod requests in flight. That is right for
    traffic nobody predicted and wrong for a client that KNOWS what is coming: a
    batch of a thousand documents otherwise discovers the pool one cold start at a
    time.
    
    So a client may now say so: POST /v1/runpod/scale {model, pods}. It is a lease,
    bounded three ways, because a client that can raise the floor can raise the
    bill:
    
      * allow_client_scale, off by default, so no model is client-scalable unless
        someone said so;
      * clamped to max_pods — asking for more returns the ceiling with
        "clamped": true rather than an error, since the client asked for "as many
        as you can" and refusing would leave it with none;
      * client_scale_ttl_s (default 30 min), because the failure that matters is
        not a wrong number, it is a client that asks for four A40s and then dies.
        A lease that never expired would be a bill that never stopped, so a 0 in
        the config falls back to the default instead of meaning "forever".
    
    The lease and a warm-pod schedule are MAXED, never summed: both mean "hold this
    many ready", so a client cannot lower a configured floor and a closed window
    cannot cancel a lease. /v1/runpod/status reports the live lease per model, so an
    unexpected bill has a visible cause.
    
    Not admin-scoped, unlike /v1/runpod/spend: the gate is the per-model flag, not
    the key, and the account's $/hr and spend caps still refuse to provision.
    Co-Authored-By: 's avatarClaude Opus 5 <noreply@anthropic.com>
    81507a8b
Name
Last commit
Last update
codai Loading commit data...
docs Loading commit data...
packaging Loading commit data...
samples Loading commit data...
tests Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.dockerignore Loading commit data...
.gitignore Loading commit data...
AI.PROMPT Loading commit data...
CODERAI_API_DOCUMENTATION.md Loading commit data...
CoderAI.gif Loading commit data...
DISTRIBUTION.md Loading commit data...
LICENSE.md Loading commit data...
MULTIMODAL_CAPABILITIES.md Loading commit data...
MULTIMODAL_UI_EXAMPLES.md Loading commit data...
README.md Loading commit data...
REQUEST-geoclip-embeddings.md Loading commit data...
REQUEST-vpr-embeddings.md Loading commit data...
amdgpu-coredump-05000.bin Loading commit data...
build-oci.sh Loading commit data...
build.ps1 Loading commit data...
build.sh Loading commit data...
coderai Loading commit data...
coderai-broker-implementation-reference.md Loading commit data...
coderai-integration.md Loading commit data...
commands Loading commit data...
osxbuild.sh Loading commit data...
package-oci.sh Loading commit data...
package-tarball.sh Loading commit data...
requirements-crisperwhisper.txt Loading commit data...
requirements-h3.txt Loading commit data...
requirements-longcat-train.txt Loading commit data...
requirements-longcat.txt Loading commit data...
requirements-melotts.txt Loading commit data...
requirements-nemo.txt Loading commit data...
requirements-nvidia.txt Loading commit data...
requirements-ocr-paddle.txt Loading commit data...
requirements-ocr.txt Loading commit data...
requirements-pyannote.txt Loading commit data...
requirements-surya.txt Loading commit data...
requirements-vllm.txt Loading commit data...
requirements-vulkan.txt Loading commit data...
requirements.txt Loading commit data...
run-oci.sh Loading commit data...
smoke-test-oci.sh Loading commit data...
todo.md Loading commit data...