Sonntet 4.5 thinking boxes are not showing despite thinking boxes enabled. #1919

Closed
opened 2026-02-16 17:33:14 -05:00 by yindo · 19 comments
Owner

Originally created by @XSIRIX on GitHub (Oct 2, 2025).

Originally assigned to: @rekram1-node on GitHub.

Hey,

I have been using sonnet 4.5 through OpenRouter and it doesnt seem like the thinking boxes are working despite thinking being enabled.

Model options also have correctly configured thinking with thinking budget set to 32k.

This is opencode:

Image

Same prompt with Crush without any provider options:

Image

So the opencode results are way more detailed and its taking more time than Crush because of my thinking settings, so i am certain its thinking but its not showing inside the tui.

Originally created by @XSIRIX on GitHub (Oct 2, 2025). Originally assigned to: @rekram1-node on GitHub. Hey, I have been using sonnet 4.5 through OpenRouter and it doesnt seem like the thinking boxes are working despite thinking being enabled. Model options also have correctly configured thinking with thinking budget set to 32k. This is opencode: <img width="1487" height="244" alt="Image" src="https://github.com/user-attachments/assets/284cf89b-5869-4a7a-8e28-871c6c176e1c" /> Same prompt with Crush without any provider options: <img width="1512" height="224" alt="Image" src="https://github.com/user-attachments/assets/120ec954-96f3-41d5-958a-188a8a73bbff" /> So the opencode results are way more detailed and its taking more time than Crush because of my thinking settings, so i am certain its thinking but its not showing inside the tui.
yindo closed this issue 2026-02-16 17:33:14 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 2, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #2484: Reports thinking blocks not being visible for Claude and other models despite being configured correctly
  • #2305: GitHub Copilot Claude Sonnet thinking not working in OpenCode CLI
  • #2599: v0.8.0 introduced thinking block bugs with Claude Sonnet 4, causing API errors with thinking blocks

Your issue with Sonnet 4.5 thinking boxes not displaying through OpenRouter appears very similar to these previous reports about thinking blocks visibility issues with Claude models.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 2, 2025): This issue might be a duplicate of existing issues. Please check: - #2484: Reports thinking blocks not being visible for Claude and other models despite being configured correctly - #2305: GitHub Copilot Claude Sonnet thinking not working in OpenCode CLI - #2599: v0.8.0 introduced thinking block bugs with Claude Sonnet 4, causing API errors with thinking blocks Your issue with Sonnet 4.5 thinking boxes not displaying through OpenRouter appears very similar to these previous reports about thinking blocks visibility issues with Claude models. Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Oct 2, 2025):

@XSIRIX can you show your opencode.json

@rekram1-node commented on GitHub (Oct 2, 2025): @XSIRIX can you show your opencode.json
Author
Owner

@XSIRIX commented on GitHub (Oct 2, 2025):

@rekram1-node hey yea:

Image
@XSIRIX commented on GitHub (Oct 2, 2025): @rekram1-node hey yea: <img width="499" height="713" alt="Image" src="https://github.com/user-attachments/assets/1acc8350-7067-4160-a43f-24dae2cb93e6" />
Author
Owner

@rekram1-node commented on GitHub (Oct 2, 2025):

Hm I think when you are using openrouter the settings are different than they would be for an anthropic model ususally let me see

@rekram1-node commented on GitHub (Oct 2, 2025): Hm I think when you are using openrouter the settings are different than they would be for an anthropic model ususally let me see
Author
Owner

@Amansaxena001 commented on GitHub (Oct 3, 2025):

Im using all default still I dont see the thinking sections

@Amansaxena001 commented on GitHub (Oct 3, 2025): Im using all default still I dont see the thinking sections
Author
Owner

@rekram1-node commented on GitHub (Oct 3, 2025):

@Amansaxena001 that's because thinking isn't enabled by default, I know what the settings look like for most providers I haven't seeen what it is for openrouter tho it doesnt seem to work for them. SO I am guessing there is a setting naming difference that needs to be documented

@rekram1-node commented on GitHub (Oct 3, 2025): @Amansaxena001 that's because thinking isn't enabled by default, I know what the settings look like for most providers I haven't seeen what it is for openrouter tho it doesnt seem to work for them. SO I am guessing there is a setting naming difference that needs to be documented
Author
Owner

@XSIRIX commented on GitHub (Oct 3, 2025):

@Amansaxena001 that's because thinking isn't enabled by default, I know what the settings look like for most providers I haven't seeen what it is for openrouter tho it doesnt seem to work for them. SO I am guessing there is a setting naming difference that needs to be documented

Ok i know the reason why, im blind.

Basically, i am switching between plan and build mode all the time, and for whatever reason the model keeps switching as well between official Claude Sonnet 4.5 model where extended thinking is disabled and my custom configured sonnet 4.5 model where thinking is working.

Here in build mode:

Image

After switching to plan mode with tab model switches:

Image

this looks like a bug to me

@XSIRIX commented on GitHub (Oct 3, 2025): > [@Amansaxena001](https://github.com/Amansaxena001) that's because thinking isn't enabled by default, I know what the settings look like for most providers I haven't seeen what it is for openrouter tho it doesnt seem to work for them. SO I am guessing there is a setting naming difference that needs to be documented Ok i know the reason why, im blind. Basically, i am switching between plan and build mode all the time, and for whatever reason the model keeps switching as well between official Claude Sonnet 4.5 model where extended thinking is disabled and my custom configured sonnet 4.5 model where thinking is working. Here in build mode: <img width="435" height="197" alt="Image" src="https://github.com/user-attachments/assets/cdf8fe73-8472-40c2-9469-6cceaab8aca3" /> After switching to plan mode with tab model switches: <img width="377" height="152" alt="Image" src="https://github.com/user-attachments/assets/5fa831f8-efc4-42f9-a5ad-503c8b3d9865" /> this looks like a bug to me
Author
Owner

@rekram1-node commented on GitHub (Oct 3, 2025):

@XSIRIX when you switch models for a agent, we save the last used model, so when u are switching agents it also switches models to what u last used when uding that agent, unless ofc you hardcode the model in the agent definition

@rekram1-node commented on GitHub (Oct 3, 2025): @XSIRIX when you switch models for a agent, we save the last used model, so when u are switching agents it also switches models to what u last used when uding that agent, unless ofc you hardcode the model in the agent definition
Author
Owner

@rekram1-node commented on GitHub (Oct 4, 2025):

does this resolve issue? Or are you still having problems just wanna make sure I am following you correctly

@rekram1-node commented on GitHub (Oct 4, 2025): does this resolve issue? Or are you still having problems just wanna make sure I am following you correctly
Author
Owner

@numman-ali commented on GitHub (Oct 5, 2025):

I haven't been able to enable thinking when using Claude with OAuth

I tried the config here:

https://opencode.ai/docs/models/#configure-models

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "openai": {
      "models": {
        "gpt-5": {
          "options": {
            "reasoningEffort": "high",
            "textVerbosity": "low",
            "reasoningSummary": "auto",
            "include": ["reasoning.encrypted_content"],
          },
        },
      },
    },
    "anthropic": {
      "models": {
        "claude-sonnet-4-5-20250929": {
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 16000,
            },
          },
        },
      },
    },
  },
}
@numman-ali commented on GitHub (Oct 5, 2025): I haven't been able to enable thinking when using Claude with OAuth I tried the config here: https://opencode.ai/docs/models/#configure-models ```json { "$schema": "https://opencode.ai/config.json", "provider": { "openai": { "models": { "gpt-5": { "options": { "reasoningEffort": "high", "textVerbosity": "low", "reasoningSummary": "auto", "include": ["reasoning.encrypted_content"], }, }, }, }, "anthropic": { "models": { "claude-sonnet-4-5-20250929": { "options": { "thinking": { "type": "enabled", "budgetTokens": 16000, }, }, }, }, }, }, } ```
Author
Owner

@rekram1-node commented on GitHub (Oct 5, 2025):

@numman-ali oh did you try /thinking in the tui?

@rekram1-node commented on GitHub (Oct 5, 2025): @numman-ali oh did you try `/thinking` in the tui?
Author
Owner

@numman-ali commented on GitHub (Oct 5, 2025):

Yes, I'm pretty confident there's an issue with how options may be passed to opencode, and no thinking ever occurs on the Sonnet 4.5 model

I made the OpenAI OAuth Plugin https://github.com/numman-ali/opencode-openai-codex-auth so I'm pretty familiar with how opencode works

I don't have time to review atm, but confident it's how the AI SDK Provider for Anthropic is mapping the properties from OpenCode config, there's a missing piece

@numman-ali commented on GitHub (Oct 5, 2025): Yes, I'm pretty confident there's an issue with how options may be passed to opencode, and no thinking ever occurs on the Sonnet 4.5 model I made the OpenAI OAuth Plugin https://github.com/numman-ali/opencode-openai-codex-auth so I'm pretty familiar with how opencode works I don't have time to review atm, but confident it's how the AI SDK Provider for Anthropic is mapping the properties from OpenCode config, there's a missing piece
Author
Owner

@rekram1-node commented on GitHub (Oct 5, 2025):

@numman-ali if you are using anthropic then that config works:

Image

Can you run opencode debug config and show me output? And you are using anthropic right not openrouter or any other provider

@rekram1-node commented on GitHub (Oct 5, 2025): @numman-ali if you are using anthropic then that config works: <img width="1512" height="817" alt="Image" src="https://github.com/user-attachments/assets/3fe411b7-7a19-445d-8882-46e19df5daf4" /> Can you run `opencode debug config` and show me output? And you are using anthropic right not openrouter or any other provider
Author
Owner

@rekram1-node commented on GitHub (Oct 5, 2025):

I copied your config verbatim and sent "hello" to claude sonnet 4.5, thinking shows as expected

@rekram1-node commented on GitHub (Oct 5, 2025): I copied your config verbatim and sent "hello" to claude sonnet 4.5, thinking shows as expected
Author
Owner

@F0x1d commented on GitHub (Oct 9, 2025):

It seems that it works if i use

                "claude-sonnet-4-5-20250929": {
                    "name": "Claude Sonnet 4.5 Thinking",
                    "options": {
                        "thinking": {
                            "type": "enabled",
                            "budgetTokens": 16000,
                        }
                    }
                },
Image

but if i use it with custom id, it does not

                "claude-sonnet-4-5-thinking": {
                    "id": "claude-sonnet-4-5-20250929",
                    "name": "Claude Sonnet 4.5 Thinking SWAG",
                    "options": {
                        "thinking": {
                            "type": "enabled",
                            "budgetTokens": 16000,
                        }
                    }
                },
Image
@F0x1d commented on GitHub (Oct 9, 2025): It seems that it works if i use ```json "claude-sonnet-4-5-20250929": { "name": "Claude Sonnet 4.5 Thinking", "options": { "thinking": { "type": "enabled", "budgetTokens": 16000, } } }, ``` <img width="912" height="740" alt="Image" src="https://github.com/user-attachments/assets/2ea78371-e3dd-4b63-9607-e7db8bff8a8a" /> but if i use it with custom id, it does not ```json "claude-sonnet-4-5-thinking": { "id": "claude-sonnet-4-5-20250929", "name": "Claude Sonnet 4.5 Thinking SWAG", "options": { "thinking": { "type": "enabled", "budgetTokens": 16000, } } }, ``` <img width="912" height="740" alt="Image" src="https://github.com/user-attachments/assets/ad9d2cad-0eb5-45f0-a8df-940333614fea" />
Author
Owner

@F0x1d commented on GitHub (Oct 10, 2025):

@rekram1-node can you check it please?

@F0x1d commented on GitHub (Oct 10, 2025): @rekram1-node can you check it please?
Author
Owner

@rekram1-node commented on GitHub (Oct 10, 2025):

yes I will, I managed to replicate, I know issue

@rekram1-node commented on GitHub (Oct 10, 2025): yes I will, I managed to replicate, I know issue
Author
Owner

@Amansaxena001 commented on GitHub (Oct 13, 2025):

There is "alwaysThinkingEnabled": false in settings.json file which works @rekram1-node

@Amansaxena001 commented on GitHub (Oct 13, 2025): There is `"alwaysThinkingEnabled": false` in `settings.json` file which works @rekram1-node
Author
Owner

@rekram1-node commented on GitHub (Oct 17, 2025):

this should be fixed

@rekram1-node commented on GitHub (Oct 17, 2025): this should be fixed
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1919