[PR #11363] fix(provider): exclude chat models from textVerbosity setting #13754

Closed
opened 2026-02-16 18:18:35 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/11363

State: closed
Merged: Yes


Summary

Fixes #9969 - GPT-5.x chat models (e.g. gpt-5.2-chat-latest) were incorrectly getting textVerbosity: "low" set, but these models only support medium verbosity, causing API errors.

Root Cause

The condition at transform.ts:592 checked for gpt-5-chat (dash) but missed dot-versioned chat models like gpt-5.2-chat-latest:

// Before: only excluded "gpt-5-chat", missed "gpt-5.2-chat-latest"
if (input.model.api.id.includes("gpt-5") && !input.model.api.id.includes("gpt-5-chat")) {

Fix

Added -chat suffix check to exclude all chat model variants from the textVerbosity: "low" setting:

if (
  input.model.api.id.includes("gpt-5.") &&
  !input.model.api.id.includes("codex") &&
  !input.model.api.id.includes("-chat") &&  // <-- Added
  input.model.providerID !== "azure"
) {
  result["textVerbosity"] = "low"
}

Testing

Added 7 new test cases covering:

  • gpt-5.2 and gpt-5.1 → should have textVerbosity: "low"
  • gpt-5.2-chat-latest, gpt-5.1-chat-latest, gpt-5.2-chat, gpt-5-chat → should NOT have textVerbosity set
  • gpt-5.2-codex → should NOT have textVerbosity set (already excluded)

All 88 transform tests pass.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11363 **State:** closed **Merged:** Yes --- ## Summary Fixes #9969 - GPT-5.x chat models (e.g. `gpt-5.2-chat-latest`) were incorrectly getting `textVerbosity: "low"` set, but these models only support `medium` verbosity, causing API errors. ## Root Cause The condition at `transform.ts:592` checked for `gpt-5-chat` (dash) but missed dot-versioned chat models like `gpt-5.2-chat-latest`: ```typescript // Before: only excluded "gpt-5-chat", missed "gpt-5.2-chat-latest" if (input.model.api.id.includes("gpt-5") && !input.model.api.id.includes("gpt-5-chat")) { ``` ## Fix Added `-chat` suffix check to exclude all chat model variants from the `textVerbosity: "low"` setting: ```typescript if ( input.model.api.id.includes("gpt-5.") && !input.model.api.id.includes("codex") && !input.model.api.id.includes("-chat") && // <-- Added input.model.providerID !== "azure" ) { result["textVerbosity"] = "low" } ``` ## Testing Added 7 new test cases covering: - `gpt-5.2` and `gpt-5.1` → should have `textVerbosity: "low"` - `gpt-5.2-chat-latest`, `gpt-5.1-chat-latest`, `gpt-5.2-chat`, `gpt-5-chat` → should NOT have `textVerbosity` set - `gpt-5.2-codex` → should NOT have `textVerbosity` set (already excluded) All 88 transform tests pass.
yindo added the pull-request label 2026-02-16 18:18:35 -05:00
yindo closed this issue 2026-02-16 18:18:35 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13754