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
I saw this error earlier today when attempting to use OpenRouter's qwen/qwen3-235b-a22b endpoint (via a custom config using OpenRouter's :shortcuts ): ~/.config/opencode/opencode.json:
INFO 2025-07-17T18:47:57 +10534ms service=session session=ses_7e6523bdfffeE1c7kR9nvlM0LC type=start-step part
INFO 2025-07-17T18:47:57 +1ms service=bus type=storage.write publishing
INFO 2025-07-17T18:47:57 +0ms service=bus type=message.part.updated publishing
INFO 2025-07-17T18:47:57 +0ms service=session session=ses_7e6523bdfffeE1c7kR9nvlM0LC type=error part
ERROR 2025-07-17T18:47:57 +0ms service=session session=ses_7e6523bdfffeE1c7kR9nvlM0LC error=Provider returned error
INFO 2025-07-17T18:47:57 +0ms service=session session=ses_7e6523bdfffeE1c7kR9nvlM0LC sessionID=ses_7e6523bdfffeE1c7kR9nvlM0LC unlocking
INFO 2025-07-17T18:47:57 +0ms service=bus type=session.idle publishing
INFO 2025-07-17T18:47:57 +0ms service=server duration=10575 response
INFO 2025-07-17T18:47:57 +1ms service=server method=POST path=/log request
ERROR 2025-07-17T18:47:57 +0ms service=tui failed to send message: POST "http://127.0.0.1:59217/session/ses_7e6523bdfffeE1c7kR9nvlM0LC/message": 400 Bad Request {"name":"UnknownError","data":{"message":"TypeError: w is not an Object. (evaluating '\"name\"in w')"}}
The exception is complaining that isInstance() is being passed a String primitive, and in only works with objects, so it's throwing a TypeError. The primitive string type originates in the AI SDK: (1), (2)
The "Provider returned error" failure itself seems to be related to OpenRouter. I can't reliably reproduce it, but it looks like there's supposed to be some metadata attached with the result (is AI SDK is stripping that out?). Some googling says that error might just be model availability / rate limiting on their side.
same error here, disabling tool just makes opencode unable to achieve anything so its not a solution. happens with any local model with ollama or lmstudio
Activity
thdxr commentedon Jul 16, 2025
need a screenshot
kim0 commentedon Jul 16, 2025
@thdxr a bit confused, I already added a screenshot of the error popup inside OC. Let me know if you need some other kind of a screenshot
caseymatt commentedon Jul 17, 2025
I saw this error earlier today when attempting to use OpenRouter's
qwen/qwen3-235b-a22bendpoint (via a custom config using OpenRouter's :shortcuts ):~/.config/opencode/opencode.json:{ "$schema": "https://opencode.ai/config.json", "provider": { "openrouter-shortcut": { "npm": "@ai-sdk/openai-compatible", "options": { "baseURL": "https://openrouter.ai/api/v1" }, "models": { "qwen/qwen3-235b-a22b:nitro": { "id": "qwen/qwen3-235b-a22b:nitro", "name": "Qwen3-235B Nitro", "attachment": false, "reasoning": true, "temperature": true, "tool_call": true, "limit": { "context": 40000, "output": 40000 } } } } } }Logs:
The exception is complaining that
isInstance()is being passed a String primitive, andinonly works with objects, so it's throwing a TypeError. The primitive string type originates in the AI SDK: (1), (2)The "Provider returned error" failure itself seems to be related to OpenRouter. I can't reliably reproduce it, but it looks like there's supposed to be some metadata attached with the result (is AI SDK is stripping that out?). Some googling says that error might just be model availability / rate limiting on their side.
trufae commentedon Jul 19, 2025
same error here. the error is "gone" if i just set "tool":false in the config file for that specific model (served via lmstudio).
trufae commentedon Aug 7, 2025
same error here, disabling tool just makes opencode unable to achieve anything so its not a solution. happens with any local model with ollama or lmstudio
trufae commentedon Aug 7, 2025
@caseymatt do you have a fix for this bug in the code?
trufae commentedon Aug 8, 2025
works fine when building from git, its an issue in the last release i guess
rekram1-node commentedon Dec 28, 2025
[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
feat(den): add Daytona worker activity heartbeats and release snapsho…