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
OpenRouter Provider Initialization Error (400 Bad Request) #863
I'm encountering an issue when trying to use the OpenRouter provider with opencode. I'm consistently receiving a 400 Bad Request error during message sending, indicating a ProviderInitError specifically for the openrouter provider. This happens even after ensuring my apiKey is correctly placed in the config.json.
failed to send message: POST
"[http://127.0.0.1:45365/session/ses\_808f933dfffe1R6hPvcSMMWQuX/message](http://127.0.0.1:45365/session/ses_808f933dfffe1R6hPvcSMMWQuX/message)": 400 Bad Request
{"name":"ProviderInitError","data":{"providerID":"openrouter"}}
Activity
DenzelVH commentedon Jul 11, 2025
#842 (comment)
facelezzzz commentedon Jul 11, 2025
This is a bug because NPM package is not installed.
You can try
cd ~/.cache/opencodepnpm installsivaxreddy commentedon Jul 11, 2025
can u link me to any other config which uses deepseek or qwen models from openrouter, i am unable to other models (apart from gemini, claude,gpts)
thdxr commentedon Jul 12, 2025
get rid of the
npmfield you don't need it - and update to latestrealized our docs were saying the wrong thing - fixed
iwinux commentedon Jul 12, 2025
I see a subprocess of
opencode add @ai-sdk/openai-compatibleevery time I restart the CLI. What is happening!?sivaxreddy commentedon Jul 13, 2025
no idea