From 43661e5a6e8d1db898f82390af5002cf3ac7ced1 Mon Sep 17 00:00:00 2001 From: Shirone Date: Sat, 24 Jan 2026 20:41:25 +0100 Subject: [PATCH] fix: adress pr comments --- libs/types/src/provider-utils.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libs/types/src/provider-utils.ts b/libs/types/src/provider-utils.ts index eadc41bb..772d4d7c 100644 --- a/libs/types/src/provider-utils.ts +++ b/libs/types/src/provider-utils.ts @@ -7,7 +7,7 @@ */ import type { ModelProvider } from './settings.js'; -import { CURSOR_MODEL_MAP, LEGACY_CURSOR_MODEL_MAP } from './cursor-models.js'; +import { LEGACY_CURSOR_MODEL_MAP } from './cursor-models.js'; import { CLAUDE_MODEL_MAP, CODEX_MODEL_MAP } from './model.js'; import { OPENCODE_MODEL_CONFIG_MAP, LEGACY_OPENCODE_MODEL_MAP } from './opencode-models.js'; import { GEMINI_MODEL_MAP } from './gemini-models.js'; @@ -370,6 +370,16 @@ export function normalizeModelString(model: string | undefined | null): string { * supportsStructuredOutput('gemini-2.5-pro') // false */ export function supportsStructuredOutput(model: string | undefined | null): boolean { + // Exclude proxy providers first - they may have Claude/Codex in the model name + // but route through different APIs that don't support structured output + if ( + isCursorModel(model) || + isGeminiModel(model) || + isOpencodeModel(model) || + isCopilotModel(model) + ) { + return false; + } return isClaudeModel(model) || isCodexModel(model); }