Show which model actually answered - #1
Open
android6 wants to merge 1 commit into
Open
Conversation
Author
|
Closing to trim scope; will reopen a smaller version. |
android6
force-pushed
the
feat/model-fallback-note
branch
2 times, most recently
from
August 20, 2026 21:11
c81642e to
cdbfe44
Compare
Claude Code can switch models mid-conversation: when the safety classifiers refuse a request on Fable 5, the CLI re-runs it on Opus. OpenCode kept showing the requested model, so the user never knew. Surface the real model as a short callout after the answer: - model switched: system/model_refusal_fallback (models, category, scope) - model refused: model_refusal_no_fallback, turn ended with an error - model mismatch: init.model or assistant.message.model differs from the user's pick (catches switches the CLI does not announce) One note per leg, after the text so it cannot land inside a code fence. OPENCODE_CLAUDE_MODEL_NOTES=reasoning moves it to the thinking trace. system/notification events (medium+) go to the reasoning trace as [notice].
android6
force-pushed
the
feat/model-fallback-note
branch
from
August 20, 2026 21:31
cdbfe44 to
69a7ab4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claude Code can switch models mid-conversation: when the safety classifiers refuse a request on Fable 5, the CLI silently re-runs it on Opus. OpenCode keeps displaying the model the user picked, so there is no way to tell.
This adds a short callout at the end of the answer whenever the answering model differs from the selected one:
model switched- from the SDKmodel_refusal_fallbackevent (models, safeguard category, scope).model refused-model_refusal_no_fallback: the turn ended with an error and no retry ran.model mismatch(answer starts on X) -init.modeldiffers from the user's pick: the session was left on a fallback model by an earlier turn.model mismatch(answered by X) -assistant.message.modeldiffers from what was announced: catches switches the CLI doesn't report.One note per leg, always after the text so it can't land inside a code fence.
OPENCODE_CLAUDE_MODEL_NOTES=reasoningmoves it into the thinking trace instead. CLIsystem/notificationevents (medium+) are forwarded to the reasoning trace as[notice].Seen live with CLI 2.1.237: bio -> claude-opus-5, cyber -> claude-opus-4-8.