• Stefy Lanza (nextime / spora )'s avatar
    a request could ask for a warm floor but not for a ceiling (v0.4.33) · d6b35d18
    Stefy Lanza (nextime / spora ) authored
    /v1/runpod/scale set a FLOOR. "Give me 8 pods" meant "hold at least 8
    ready", and the autoscaler stayed free to grow the pool to the configured
    max_pods for as long as work kept arriving. A client running a staged
    batch -- 8 pods for the first stage, 32 for the next -- had no way to
    bound a stage at all, and nothing in the reply said so.
    
    Observed 2026-10-18: a run that asked for 8 pods was at 13 and climbing
    toward 128. Every pod past the plan is ~700s of paid boot producing
    nothing, which is why the realised cost per page came out 16.5x the
    measured baseline while every component behaved exactly as written.
    
    A lease may now also carry `max_pods`, under the same rule `gpu_types`
    already follows there: it may only ever NARROW the operator's ceiling, a
    larger number is clamped and reported in `notes`, and it dies with the
    lease. `pods: 0` with a `max_pods` is a cap with no floor -- what a
    client with a long tail of work wants; `pods: 0` alone releases both.
    
    The ceiling has to be read by EVERY path that decides whether to rent,
    or it is a race between the grower that honours it and the one that does
    not: _pods_for_demand, _grow_reason, _pods_needed and the warm-floor
    top-up all now read effective_max_pods(). A leased floor is clamped to
    it too, since a floor above a ceiling is a fleet that oscillates for as
    long as the lease lasts. A configured max_pods of 0 still means zero --
    that is the operator having turned renting off, not a lease.
    
    22 tests, including a guard that no growth path reads mcfg.max_pods
    directly, so a path added later cannot silently escape every cap.
    Co-Authored-By: 's avatarClaude Opus 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01KnfkxBpcZ1v6ypRFFyhrVM
    d6b35d18
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...