Opencode calls 'Claude 3.5 Haiku' on session start, despite selecting a custom model #874

Closed
opened 2026-02-16 17:28:38 -05:00 by yindo · 3 comments
Owner

Originally created by @SteveHere on GitHub (Jul 23, 2025).

Originally assigned to: @thdxr on GitHub.

This is an edge case that I keep finding myself in.

Given the following opencode.json config (bodging together suggestions from a comment in #1050 & a comment in #1038):

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "openrouter": {
      "options": { 
        "name": "OpenRouter"
      },
      "models": {
        "moonshotai/kimi-k2:free": {
          "name": "MoonshotAI: Kimi K2 (free) - Chutes",
          "attachment": false,
          "reasoning": true,
          "temperature": true,
          "tool_call": true,
          "limit": {
            "context": 60000,
            "output": 60000
          },
          "options": {
            "tools": true,
            "openrouter": {
              "provider": {
                "order": ["chutes/fp8"],
                "allow_fallbacks": false
              }
            },
            "OpenRouter": {
              "provider": {
                "order": ["chutes/fp8"],
                "allow_fallbacks": false
              }
            }
          }
        }
      }
    }
  }
}

(the almost-similar "openrouter" keys are just there to make sure opencode actually shoves in the specified provider info)

And selecting the custom model, when I start a new session and enter a test prompt, these prompts appear on my 'Activity' page using the Claude model instead of the specified Kimi K2 model:

Image

Afterwards, the issue no longer appears: It only pops up when a new session is created & the first prompt is given (any prompt).

Originally created by @SteveHere on GitHub (Jul 23, 2025). Originally assigned to: @thdxr on GitHub. This is an edge case that I keep finding myself in. Given the following `opencode.json` config (bodging together suggestions from [a comment in #1050](https://github.com/sst/opencode/issues/1050#issuecomment-3079406902) & [a comment in #1038](https://github.com/sst/opencode/issues/1038#issuecomment-3077974666)): ```json { "$schema": "https://opencode.ai/config.json", "provider": { "openrouter": { "options": { "name": "OpenRouter" }, "models": { "moonshotai/kimi-k2:free": { "name": "MoonshotAI: Kimi K2 (free) - Chutes", "attachment": false, "reasoning": true, "temperature": true, "tool_call": true, "limit": { "context": 60000, "output": 60000 }, "options": { "tools": true, "openrouter": { "provider": { "order": ["chutes/fp8"], "allow_fallbacks": false } }, "OpenRouter": { "provider": { "order": ["chutes/fp8"], "allow_fallbacks": false } } } } } } } } ``` (the almost-similar "openrouter" keys are just there to make sure opencode actually shoves in the specified provider info) And selecting the custom model, when I start a new session and enter a test prompt, these prompts appear on my 'Activity' page using the Claude model instead of the specified Kimi K2 model: <img width="844" height="401" alt="Image" src="https://github.com/user-attachments/assets/ac6eb391-abf9-48f8-bdd7-f4b3aaefadde" /> Afterwards, the issue no longer appears: It only pops up when a new session is created & the first prompt is given (any prompt).
yindo closed this issue 2026-02-16 17:28:38 -05:00
Author
Owner

@rekram1-node commented on GitHub (Jul 23, 2025):

opencode does use a small model to generate titles, in many cases claude 3.5 haiku if it is available

That seems like what you are seeing especially since you mentioned it only happens at session start (and that is when title is generated)

@rekram1-node commented on GitHub (Jul 23, 2025): opencode does use a small model to generate titles, in many cases claude 3.5 haiku if it is available That seems like what you are seeing especially since you mentioned it only happens at session start (and that is when title is generated)
Author
Owner

@thdxr commented on GitHub (Jul 23, 2025):

^ yes that's right and you can override small model in the config if you want to control that

@thdxr commented on GitHub (Jul 23, 2025): ^ yes that's right and you can override small model in the config if you want to control that
Author
Owner

@SteveHere commented on GitHub (Jul 27, 2025):

Belated response (& note for future me): Fixed the issue by specifying the small_model value in the config file.

DX note: It took looking at the hosted config.json schema to see which value should be changed. I couldn't see it in the documentation because it was out of sync with the .mdx file.

Will be making a new issue for this.

@SteveHere commented on GitHub (Jul 27, 2025): Belated response (& note for future me): Fixed the issue by specifying the `small_model` value in the config file. DX note: It took looking at the hosted `config.json` schema to see which value should be changed. [I couldn't see it in the documentation](https://opencode.ai/docs/config/#models) because [it was out of sync with the .mdx file](https://github.com/sst/opencode/blob/dev/packages/web/src/content/docs/docs/config.mdx#models). Will be making a new issue for this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#874