• Stefy Lanza (nextime / spora )'s avatar
    runpod: fix pods /v1 path; add stale-pod reaper, multi-GPU fallback, pod logs · b911310a
    Stefy Lanza (nextime / spora ) authored
    Live-tested against a real RunPod account (Secure RTX 4090, Qwen2.5-0.5B):
    provision → boot → vLLM /v1/models health → idle auto-teardown + ledger ($0.021)
    all confirmed. Serverless + spillover proxy paths confirmed (reach RunPod, correct
    URL/auth). Fixes/additions from that run:
    
    - FIX: pods mode posted to <proxy>/chat/completions (missing /v1) → 404. The pod's
      vLLM serves under /v1 (health check hit /v1/models=200), so RunpodBackend now
      appends /v1 to the pod proxy URL (serverless base already ends in /openai/v1).
    
    - Stale-pod REAPER (safety): runpod_worker.reap_orphans() lists account pods tagged
      coderai-<deployment_id>-* and terminates any NOT tracked by a live pool (orphans
      from a crash/restart) — never touches in-flight provisions or another deployment's
      pods. Runs every ~30s in the scaler loop AND once at startup; started on the
      primary engine (where pods are hosted) via start_runpod_maintenance(). New
      config.runpod.deployment_id (default "default"); pods named with the tag.
    
    - Multi-GPU capacity FALLBACK: _rank_gpus() returns ranked candidates and
      _create_with_fallback() tries the next on a RunPod "no instances available"
      capacity error instead of failing (hit a real A5000 community capacity miss).
    
    - Pod LOGS: RunpodClient.get_pod_logs() (best-effort REST) + pod_console_url deep
      link; admin GET /admin/api/runpod/pod-logs; RunPod stats page gets a per-pod
      "view logs" modal + console link. PodHandle/pods_status carry console_url.
    
    - Settings: deployment_id field.
    
    Built coderai:base=5cffe23d1d20. Relaunch to activate (running image had the /v1
    bug + no reaper). After relaunch, a pods chat returns a real completion.
    Co-Authored-By: 's avatarClaude Opus 4.8 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01R6iugoNeEgt9PkajKrFyq4
    b911310a
Name
Last commit
Last update
..
__init__.py Loading commit data...
_film_net.py Loading commit data...
_rife_ifnet.py Loading commit data...
app.py Loading commit data...
archive.py Loading commit data...
audio_backends.py Loading commit data...
audio_clean.py Loading commit data...
audio_gen.py Loading commit data...
audio_stems.py Loading commit data...
canary_worker.py Loading commit data...
characters.py Loading commit data...
colibri_worker.py Loading commit data...
crisperwhisper_worker.py Loading commit data...
custom_pipelines.py Loading commit data...
diarization.py Loading commit data...
ds4_kv_janitor.py Loading commit data...
ds4_worker.py Loading commit data...
embeddings.py Loading commit data...
environments.py Loading commit data...
faceswap.py Loading commit data...
fastlog.py Loading commit data...
images.py Loading commit data...
k3_worker.py Loading commit data...
kt_worker.py Loading commit data...
log.py Loading commit data...
loras.py Loading commit data...
ocr.py Loading commit data...
parler_worker.py Loading commit data...
pipelines.py Loading commit data...
prompt_cache.py Loading commit data...
pyannote_worker.py Loading commit data...
ratelimit.py Loading commit data...
rerank.py Loading commit data...
runpod_client.py Loading commit data...
runpod_ledger.py Loading commit data...
runpod_worker.py Loading commit data...
spatial.py Loading commit data...
speaker_embeddings.py Loading commit data...
speaker_registry.py Loading commit data...
state.py Loading commit data...
stt_backends.py Loading commit data...
text.py Loading commit data...
transcriptions.py Loading commit data...
tts.py Loading commit data...
tts_backends.py Loading commit data...
urlutils.py Loading commit data...
video.py Loading commit data...
vllm_worker.py Loading commit data...
voice_clone.py Loading commit data...
voice_convert.py Loading commit data...
vpr_salad_server.py Loading commit data...