You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Custom Provider Hangs After "build · model" in custom RuAPI provider #23094
Opencode hangs indefinitely after displaying "build · [model]" when using a custom provider with @ai-sdk/openai-compatible SDK. The API works correctly via curl but opencode never receives a response.
Environment
Opencode version: 1.4.7
OS: Linux (Arch-based)
Node/Bun version: (bun)
Steps to Reproduce
Add custom provider to ~/.config/opencode/opencode.jsonc:
Add API key: opencode providers login (or auth.json)
Run: opencode run "hi"
Result: Hangs at "build · claude-opus-4.6" forever
Expected Behavior
Should receive response from API within seconds.
Actual Behavior
Logs show provider loaded, SDK initialized
Logs show "small=false agent=build mode=primary stream"
Then hangs indefinitely - no timeout, no error
Additional Tests
curl to API endpoint works fine (both sync & streaming)
Built-in opencode/minimax-m2.5-free works correctly
Other models on same provider (gpt-5.4, claude-sonnet-4.6) also hang
Tried adding apiKey directly in config - same result
Logs
INFO provider providerID=RuAPI found
INFO provider providerID=RuAPI pkg=@ai-sdk/openai-compatible using bundled provider
INFO provider status=completed duration=4 providerID=RuAPI getSDK
INFO llm providerID=RuAPI modelID=claude-opus-4.6 ... small=false agent=build mode=primary stream
INFO bus type=session.status publishing
INFO session.updated publishing
[then hangs forever]
Workaround
Have to use built-in free model: `opencode run "hi" -m opencode/minimax-m2.5-free" for my tasks
Also asked AI to figure something out and got this:
The Problem
Opencode hangs at "build · [model]" when using @ai-sdk/openai-compatible custom providers.
The API works via curl, but opencode never receives/processes the response.
Activity
github-actions commentedon Apr 17, 2026
This issue might be a duplicate of existing issues. Please check:
@ai-sdk/openai-compatibleprovider, while direct API calls (curl) work fine. The log pattern is identical.bunfig.tomldisabling the Bun install cache was found to resolve it.Please check if either of those resolves your issue, and consider adding a comment there instead.
fadingawayzy commentedon Apr 17, 2026
Also asked AI to figure something out and got this:
The Problem
Opencode hangs at "build · [model]" when using
@ai-sdk/openai-compatiblecustom providers.The API works via curl, but opencode never receives/processes the response.
Confirmed Working
Not Working
Root Cause Hypothesis
The issue is NOT in:
The issue IS in:
Evidence
llm providerID=RuAPI ... streamsession.updated publishingThings That Didn't Fix It
What Would Help Debug
Related Issues (all same root cause - likely)
For Developers
The fix needs to be in opencode's LLM response handling for
@ai-sdk/openai-compatible providers. The SDK itself works fine.
github-actions commentedon Jul 6, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.