fix: suppress reasoning effort display for BYOK models#137
Merged
Conversation
When a BYOK provider is active, resolve currentModelInfo using the provider-prefixed model ID. This prevents inheriting metadata like supportedReasoningEfforts from a same-named Copilot model. BYOK models don't carry reasoning effort metadata, so /status and /reasoning now correctly reflect that rather than showing inherited Copilot model capabilities. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Fixes /status and /reasoning incorrectly displaying reasoning-effort metadata for BYOK sessions by ensuring model capability lookup uses the provider-prefixed BYOK model ID (instead of matching a same-named Copilot model entry).
Changes:
- Resolve
currentModelInfousing${provider}:${sessionInfo.model}when a channel BYOK provider is active. - Add inline clarification comment explaining why provider-prefixed lookup is required to avoid metadata inheritance.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… tests - Only resolve currentProvider/currentModelInfo for commands that need it (reasoning, status, model) to avoid extra SQLite read on every command - Add 3 tests covering BYOK reasoning suppression: /status suppresses for BYOK, shows for Copilot, /reasoning handles BYOK gracefully Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
When a BYOK provider is active (e.g.,
aif-cr1-eastus2:gpt-5.1-codex-mini), the/statusand/reasoningcommands were incorrectly showing reasoning effort metadata inherited from the same-named Copilot model.Root Cause
currentModelInfowas resolved by matchingsessionInfo.model(bare ID likegpt-5.1-codex-mini) against the models list. This matched the Copilot model entry which hassupportedReasoningEfforts, rather than the BYOK entry (prefixed asaif-cr1-eastus2:gpt-5.1-codex-mini) which doesn't.Fix
When a BYOK provider is active, resolve
currentModelInfousing the provider-prefixed model ID. BYOK models don't carry reasoning effort metadata, so the display is now correctly suppressed.Testing