close
Skip to content

fix: suppress reasoning effort display for BYOK models#137

Merged
ChrisRomp merged 2 commits intomainfrom
fix/byok-reasoning-suppress
Mar 23, 2026
Merged

fix: suppress reasoning effort display for BYOK models#137
ChrisRomp merged 2 commits intomainfrom
fix/byok-reasoning-suppress

Conversation

@ChrisRomp
Copy link
Copy Markdown
Owner

Summary

When a BYOK provider is active (e.g., aif-cr1-eastus2:gpt-5.1-codex-mini), the /status and /reasoning commands were incorrectly showing reasoning effort metadata inherited from the same-named Copilot model.

Root Cause

currentModelInfo was resolved by matching sessionInfo.model (bare ID like gpt-5.1-codex-mini) against the models list. This matched the Copilot model entry which has supportedReasoningEfforts, rather than the BYOK entry (prefixed as aif-cr1-eastus2:gpt-5.1-codex-mini) which doesn't.

Fix

When a BYOK provider is active, resolve currentModelInfo using the provider-prefixed model ID. BYOK models don't carry reasoning effort metadata, so the display is now correctly suppressed.

Testing

  • 559 tests passing
  • Type-check clean

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>
Copilot AI review requested due to automatic review settings March 23, 2026 19:36
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 currentModelInfo using ${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.

Comment thread src/core/command-handler.ts Outdated
Comment thread src/core/command-handler.ts Outdated
… 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>
@ChrisRomp ChrisRomp merged commit 59febda into main Mar 23, 2026
6 checks passed
@ChrisRomp ChrisRomp deleted the fix/byok-reasoning-suppress branch March 23, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants