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 unwated requests to Claude Haiku 4.5. #4579
I have been using OpenCode with free models on openrouter for example Grok Code fast 1 and currently Grok 4.1 Fast but on openrouter dashboard i can some calls to Claude Haiku 4.5 through the opencode app that i never did, they are very small with just 10-300 tokens but slowly slowly the end up building up to different cents.
OpenCode version
1.0.80
Steps to reproduce
Connect OpenRouter
Message with free models like Grok 4.1 fast or grok code fast 1
Hey @Yyeger Haiku must be used for things like Session Title Generation, I think adding this to you config you can switch it to another model a free one maybe.
Bump. This is not a reasonable default. If I can and do select a (main) model, I expect that model to be used.
Three issue's with the current approach
is this actually necessary? Do I need title naming and whatnot?
model selection should include small model selection and never default to a model I explicitly do not want to use
on the ui I can clearly see my model selection for the main model but cannot see anywhere the small model selector. Unless I trawl though the logs from open router I wouldn't even know opencode is hammering a model I didn't select
Reacted by Julien Sanchez, Yudistira, shreyas, LucazPlays, Adriel Martins, Sergey Moralov, Martin Guzman, guilhermelowa, Eugeniusz Gilewski, Ton and 12 more
I agree with @adam-ah. It's money right out of my pockets. It took me some time to realize what was going on, and it’s definitely not good. Even when you use a free model, you still get charged by default. Seriously? Fortunately, the solution is straightforward: you can either assign the small_model to match the model you're already using or choose another free option, but this should really be the default behavior. For those interested, I’ve developed an AI CLI wrapper where I addressed this for OpenRouter, it automatically sets the small_model to match your selected one. It’s called Omni-CLI.
Reacted by LucazPlays, guilhermelowa, Akshay, Sergey Moralov, Ton, Adrian B, Prakhar Yadav, Henrique Magalhaes, drobin04, Easton Potokar and 1 more
there are free openrouter models too i think, u can also disable this by doing
small_model: “”
I just tested, keeping small_model empty still defaults to anthropic/claude-haiku-4.5
only something like small_model: "something/invalid" works.
Also, this feature sends every message in your session (one by one, as you send the message) to this model, which might be bad for privacy for some people, if they don't want to keylog their data to this particular provider
Not to mention the cost
Reacted by Adam H, Sergey Moralov, rachidbch, Tianxiang Chen, guilhermelowa, Dmitriy Pertsev, Sigi-cz, Adrian B, stonefoxes, Prakhar Yadav and 4 more
I was also just recently confused by this same behavior, phantom charges on my openrouter account due to opencode using a model I NEVER picked and don't even have enabled, to do something I didn't expect it to do.
Not only is this a potential issue with opencode, it nearly sent me to openrouter customer support to claim that I was not in fact using haiku for anything, and claim that they may have an issue on their end.
ie, this is such a problem that it may unduly burden providers support desks because the user will think they're getting charged incorrectly for something that they're not using.
small model should have an on/off switch in the UI
the model to use should have a picker, or should default to the model you're using for the request, if unset
the UI should make it clearer that it's sending requests for session title generation.
It would be nice if there was some option for this to be done locally using some sort of tiny model
Absolutely no need whatsoever for the end user to specify that they want to use a free model. OpenCode could just default to that, and not use a paid model like Haiku. It looks like it's done on purpose too. What's even funny is that my OpenRouter key is set to have a preset with just Deepseek v4 Pro (using only the DeepSeek official instance), OpenCode completely disregarded that and used Haiku. Very sketchy.
Activity
OpeOginni commentedon Nov 21, 2025
Hey @Yyeger Haiku must be used for things like Session Title Generation, I think adding this to you config you can switch it to another model a free one maybe.
{ "$schema": "https://opencode.ai/config.json", ... "small_model": "x-ai/grok-4.1-fast:free" }rekram1-node commentedon Nov 21, 2025
^^ yup
rekram1-node commentedon Nov 21, 2025
there are free openrouter models too i think, u can also disable this by doing
small_model: “”
or you can use free opencode models:
opencode/big-pickle
adam-ah commentedon Jan 17, 2026
Bump. This is not a reasonable default. If I can and do select a (main) model, I expect that model to be used.
Three issue's with the current approach
mabelisle commentedon Jan 21, 2026
I agree with @adam-ah. It's money right out of my pockets. It took me some time to realize what was going on, and it’s definitely not good. Even when you use a free model, you still get charged by default. Seriously? Fortunately, the solution is straightforward: you can either assign the small_model to match the model you're already using or choose another free option, but this should really be the default behavior. For those interested, I’ve developed an AI CLI wrapper where I addressed this for OpenRouter, it automatically sets the small_model to match your selected one. It’s called Omni-CLI.
TheHamkerCat commentedon Jan 31, 2026
I just tested, keeping small_model empty still defaults to
anthropic/claude-haiku-4.5only something like
small_model: "something/invalid"works.Also, this feature sends every message in your session (one by one, as you send the message) to this model, which might be bad for privacy for some people, if they don't want to keylog their data to this particular provider
Not to mention the cost
txchen commentedon Feb 6, 2026
Thanks @TheHamkerCat for the tip!
I think small_model should be disabled by default, the current behavior looks unreasonable.
(fix): Disabling small_models due to anomalyco/opencode#4579
shahidcodes commentedon Apr 3, 2026
I also think unexpected call to small_model should be disabled by default. The default should be the model selected if its really necessary
drobin04 commentedon May 16, 2026
I was also just recently confused by this same behavior, phantom charges on my openrouter account due to opencode using a model I NEVER picked and don't even have enabled, to do something I didn't expect it to do.
Not only is this a potential issue with opencode, it nearly sent me to openrouter customer support to claim that I was not in fact using haiku for anything, and claim that they may have an issue on their end.
ie, this is such a problem that it may unduly burden providers support desks because the user will think they're getting charged incorrectly for something that they're not using.
classy-giraffe commentedon Jun 8, 2026
Absolutely no need whatsoever for the end user to specify that they want to use a free model. OpenCode could just default to that, and not use a paid model like Haiku. It looks like it's done on purpose too. What's even funny is that my OpenRouter key is set to have a preset with just Deepseek v4 Pro (using only the DeepSeek official instance), OpenCode completely disregarded that and used Haiku. Very sketchy.
github-actions commentedon Aug 8, 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.