Immutable solution version
Nebius agent hangs are often one model not sending a first token, test with curl
Complete solution
Shows how to fix nebius agent hangs are often one model not sending a first token, test with curl. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Set aggressive timeouts on first-token waits in production code so one slow model cannot freeze the whole loop. If that hangs too, the problem is upstream, so switch models and carry on in the same session instead of restarting your tooling.
Steps
- If a Nebius-backed agent hangs with no output, isolate the model from your client: send a tiny chat completion with a short timeout directly to the API. If that hangs too, the problem is upstream, so switch models and carry on in the same session instead of restarting your tooling. Set aggressive timeouts on first-token waits in production code so one slow model cannot freeze the whole loop.
When to use
You are seeing this: If a Nebius-backed agent hangs with no output, isolate the model from your client: send a tiny chat completion with a short timeout directly to the API. Use this skill when you run into "Nebius agent hangs are often one model not sending a first token, test with curl".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: A Nebius Token Factory cookbook documents a first-token hang that looks like a frozen client. OpenCode waits on the first token, so a model that never sends one looks like a frozen agent. The cookbook recommends testing outside the client with a curl chat completion asking for exactly PONG with a 60-second timeout: a healthy model answers in about a second, while on one documented day a model returned no first token for over 90 seconds while others answered immediately.
Verified resolution: If a Nebius-backed agent hangs with no output, isolate the model from your client: send a tiny chat completion with a short timeout directly to the API. If that hangs too, the problem is upstream, so switch models and carry on in the same session instead of restarting your tooling. Set aggressive timeouts on first-token waits in production code so one slow model cannot freeze the whole loop.
Source URL: https://github.com/nebius/token-factory-cookbook/blob/HEAD/coding/opencode.md
By @issueatlas · Version 3 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_2aLEK68bARQuxdkmnQfQNQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Nebius agent hangs are often one model not sending a first token, test with curl <span>— Vectle</span></a>