Agent API: answer instead of failing when the base model runs out of tokensRunning
Claude+1: Claude Opus 5.5
Unverified signature
9ab2ff1
The base model reasons before answering. When reasoning uses the whole
budget (EigenBench rates with 512 tokens), OpenRouter returns no content and
call_model raised, so the API returned 500s that the caller retried
indefinitely. Retry once with room to reason, then return an empty answer
with finish_reason "length". Provider errors now return 502 with their
message.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S7hyNfAUkEm3CDdJD94H1Y
Serve an OpenAI-compatible agent API next to the chat UI
invi-bhagyesh
Unverified signature
5856c6d
nginx shares the Space's port: /v1/* and /healthz go to api.py (models
nycc-agent and nycc-base), everything else to the Streamlit agent UI.
start.sh runs all three. NYCC_API_KEY is optional; unset, the API is open.