From 0776756cc6dd55537ea5aea8314d86f34f705dbd Mon Sep 17 00:00:00 2001 From: Andrew Ginns Date: Sat, 6 Dec 2025 13:23:14 +0000 Subject: [PATCH 1/4] feat: add xhigh reasoning effort for gpt-5.1-codex-max --- packages/types/src/model.ts | 6 +-- packages/types/src/providers/openai.ts | 2 +- .../providers/__tests__/openai-native.spec.ts | 40 +++++++++++++++++++ webview-ui/src/i18n/locales/en/settings.json | 3 +- 4 files changed, 46 insertions(+), 5 deletions(-) diff --git a/packages/types/src/model.ts b/packages/types/src/model.ts index bcdf5681e13..6c7d0a4b4b6 100644 --- a/packages/types/src/model.ts +++ b/packages/types/src/model.ts @@ -22,7 +22,7 @@ export type ReasoningEffortWithMinimal = z.infer { ) }) + it("should support xhigh reasoning effort for GPT-5.1 Codex Max", async () => { + // Mock fetch for Responses API + const mockFetch = vitest.fn().mockResolvedValue({ + ok: true, + body: new ReadableStream({ + start(controller) { + controller.enqueue( + new TextEncoder().encode( + 'data: {"type":"response.output_item.added","item":{"type":"text","text":"XHigh effort"}}\n\n', + ), + ) + controller.enqueue(new TextEncoder().encode("data: [DONE]\n\n")) + controller.close() + }, + }), + }) + global.fetch = mockFetch as any + + // Mock SDK to fail + mockResponsesCreate.mockRejectedValue(new Error("SDK not available")) + + handler = new OpenAiNativeHandler({ + ...mockOptions, + apiModelId: "gpt-5.1-codex-max", + reasoningEffort: "xhigh", + }) + + const stream = handler.createMessage(systemPrompt, messages) + for await (const _chunk of stream) { + // drain + } + + expect(mockFetch).toHaveBeenCalledWith( + "https://api.openai.com/v1/responses", + expect.objectContaining({ + body: expect.stringContaining('"effort":"xhigh"'), + }), + ) + }) + it("should omit reasoning when selection is 'disable'", async () => { // Mock fetch for Responses API const mockFetch = vitest.fn().mockResolvedValue({ diff --git a/webview-ui/src/i18n/locales/en/settings.json b/webview-ui/src/i18n/locales/en/settings.json index 6dd07ca4110..89a3f7150da 100644 --- a/webview-ui/src/i18n/locales/en/settings.json +++ b/webview-ui/src/i18n/locales/en/settings.json @@ -512,7 +512,8 @@ "minimal": "Minimal (Fastest)", "low": "Low", "medium": "Medium", - "high": "High" + "high": "High", + "xhigh": "Extra High" }, "verbosity": { "label": "Output Verbosity", From c5cf3c33f08cbddb18ef04346e87ebf74b74f996 Mon Sep 17 00:00:00 2001 From: Andrew Ginns Date: Sun, 7 Dec 2025 09:51:46 +0000 Subject: [PATCH 2/4] fix: Address openai-native.spec.ts test failure --- src/core/config/CustomModesManager.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/core/config/CustomModesManager.ts b/src/core/config/CustomModesManager.ts index a243a9236be..4344cdd75f0 100644 --- a/src/core/config/CustomModesManager.ts +++ b/src/core/config/CustomModesManager.ts @@ -193,14 +193,13 @@ export class CustomModesManager { const result = customModesSettingsSchema.safeParse(settings) if (!result.success) { - console.error(`[CustomModesManager] Schema validation failed for ${filePath}:`, result.error) + const issues = result.error.issues + .map((issue) => `• ${issue.path.join(".")}: ${issue.message}`) + .join("\n") + console.error(`[CustomModesManager] Schema validation failed for ${filePath}:\n${issues}`) // Show user-friendly error for .roomodes files if (filePath.endsWith(ROOMODES_FILENAME)) { - const issues = result.error.issues - .map((issue) => `• ${issue.path.join(".")}: ${issue.message}`) - .join("\n") - vscode.window.showErrorMessage(t("common:customModes.errors.schemaValidationError", { issues })) } From d39d0b2671e1467b558f062e9da419509b94bc57 Mon Sep 17 00:00:00 2001 From: Andrew Ginns Date: Sun, 7 Dec 2025 10:07:34 +0000 Subject: [PATCH 3/4] chore: Localisation of 'Extra high' --- webview-ui/src/i18n/locales/ca/settings.json | 1 + webview-ui/src/i18n/locales/de/settings.json | 1 + webview-ui/src/i18n/locales/es/settings.json | 1 + webview-ui/src/i18n/locales/fr/settings.json | 1 + webview-ui/src/i18n/locales/hi/settings.json | 1 + webview-ui/src/i18n/locales/id/settings.json | 1 + webview-ui/src/i18n/locales/it/settings.json | 1 + webview-ui/src/i18n/locales/ja/settings.json | 1 + webview-ui/src/i18n/locales/ko/settings.json | 1 + webview-ui/src/i18n/locales/nl/settings.json | 1 + webview-ui/src/i18n/locales/pl/settings.json | 1 + webview-ui/src/i18n/locales/pt-BR/settings.json | 1 + webview-ui/src/i18n/locales/ru/settings.json | 1 + webview-ui/src/i18n/locales/tr/settings.json | 1 + webview-ui/src/i18n/locales/vi/settings.json | 1 + webview-ui/src/i18n/locales/zh-CN/settings.json | 1 + webview-ui/src/i18n/locales/zh-TW/settings.json | 1 + 17 files changed, 17 insertions(+) diff --git a/webview-ui/src/i18n/locales/ca/settings.json b/webview-ui/src/i18n/locales/ca/settings.json index 1d2124b6fba..87f1112a532 100644 --- a/webview-ui/src/i18n/locales/ca/settings.json +++ b/webview-ui/src/i18n/locales/ca/settings.json @@ -506,6 +506,7 @@ "none": "Cap", "minimal": "Mínim (el més ràpid)", "high": "Alt", + "xhigh": "Molt alt", "medium": "Mitjà", "low": "Baix" }, diff --git a/webview-ui/src/i18n/locales/de/settings.json b/webview-ui/src/i18n/locales/de/settings.json index 53799baca6a..b1463e58ac8 100644 --- a/webview-ui/src/i18n/locales/de/settings.json +++ b/webview-ui/src/i18n/locales/de/settings.json @@ -506,6 +506,7 @@ "none": "Keine", "minimal": "Minimal (schnellste)", "high": "Hoch", + "xhigh": "Sehr hoch", "medium": "Mittel", "low": "Niedrig" }, diff --git a/webview-ui/src/i18n/locales/es/settings.json b/webview-ui/src/i18n/locales/es/settings.json index 25a7ee2128f..3cf4c9a5b54 100644 --- a/webview-ui/src/i18n/locales/es/settings.json +++ b/webview-ui/src/i18n/locales/es/settings.json @@ -506,6 +506,7 @@ "none": "Ninguno", "minimal": "Mínimo (el más rápido)", "high": "Alto", + "xhigh": "Muy alto", "medium": "Medio", "low": "Bajo" }, diff --git a/webview-ui/src/i18n/locales/fr/settings.json b/webview-ui/src/i18n/locales/fr/settings.json index f53715ec1e4..b03b2d9bf32 100644 --- a/webview-ui/src/i18n/locales/fr/settings.json +++ b/webview-ui/src/i18n/locales/fr/settings.json @@ -506,6 +506,7 @@ "none": "Aucun", "minimal": "Minimal (le plus rapide)", "high": "Élevé", + "xhigh": "Très élevé", "medium": "Moyen", "low": "Faible" }, diff --git a/webview-ui/src/i18n/locales/hi/settings.json b/webview-ui/src/i18n/locales/hi/settings.json index 3d6ab6969c4..0baba60d199 100644 --- a/webview-ui/src/i18n/locales/hi/settings.json +++ b/webview-ui/src/i18n/locales/hi/settings.json @@ -506,6 +506,7 @@ "none": "कोई नहीं", "minimal": "न्यूनतम (सबसे तेज़)", "high": "उच्च", + "xhigh": "बहुत उच्च", "medium": "मध्यम", "low": "निम्न" }, diff --git a/webview-ui/src/i18n/locales/id/settings.json b/webview-ui/src/i18n/locales/id/settings.json index c519f0dccb9..e0ba9f1b99c 100644 --- a/webview-ui/src/i18n/locales/id/settings.json +++ b/webview-ui/src/i18n/locales/id/settings.json @@ -510,6 +510,7 @@ "none": "Tidak Ada", "minimal": "Minimal (Tercepat)", "high": "Tinggi", + "xhigh": "Sangat tinggi", "medium": "Sedang", "low": "Rendah" }, diff --git a/webview-ui/src/i18n/locales/it/settings.json b/webview-ui/src/i18n/locales/it/settings.json index 568cf19d47c..83af1aa57ee 100644 --- a/webview-ui/src/i18n/locales/it/settings.json +++ b/webview-ui/src/i18n/locales/it/settings.json @@ -506,6 +506,7 @@ "none": "Nessuno", "minimal": "Minimo (più veloce)", "high": "Alto", + "xhigh": "Molto alto", "medium": "Medio", "low": "Basso" }, diff --git a/webview-ui/src/i18n/locales/ja/settings.json b/webview-ui/src/i18n/locales/ja/settings.json index 00b45386301..1a534c6bb5b 100644 --- a/webview-ui/src/i18n/locales/ja/settings.json +++ b/webview-ui/src/i18n/locales/ja/settings.json @@ -506,6 +506,7 @@ "none": "なし", "minimal": "最小 (最速)", "high": "高", + "xhigh": "非常に高い", "medium": "中", "low": "低" }, diff --git a/webview-ui/src/i18n/locales/ko/settings.json b/webview-ui/src/i18n/locales/ko/settings.json index fcbda4acebe..f5d40d7ecd2 100644 --- a/webview-ui/src/i18n/locales/ko/settings.json +++ b/webview-ui/src/i18n/locales/ko/settings.json @@ -506,6 +506,7 @@ "none": "없음", "minimal": "최소 (가장 빠름)", "high": "높음", + "xhigh": "매우 높음", "medium": "중간", "low": "낮음" }, diff --git a/webview-ui/src/i18n/locales/nl/settings.json b/webview-ui/src/i18n/locales/nl/settings.json index 404e35e0da1..d15bd799b82 100644 --- a/webview-ui/src/i18n/locales/nl/settings.json +++ b/webview-ui/src/i18n/locales/nl/settings.json @@ -506,6 +506,7 @@ "none": "Geen", "minimal": "Minimaal (Snelst)", "high": "Hoog", + "xhigh": "Zeer hoog", "medium": "Middel", "low": "Laag" }, diff --git a/webview-ui/src/i18n/locales/pl/settings.json b/webview-ui/src/i18n/locales/pl/settings.json index 08225847b92..80ee0a1949c 100644 --- a/webview-ui/src/i18n/locales/pl/settings.json +++ b/webview-ui/src/i18n/locales/pl/settings.json @@ -506,6 +506,7 @@ "none": "Brak", "minimal": "Minimalny (najszybszy)", "high": "Wysoki", + "xhigh": "Bardzo wysoki", "medium": "Średni", "low": "Niski" }, diff --git a/webview-ui/src/i18n/locales/pt-BR/settings.json b/webview-ui/src/i18n/locales/pt-BR/settings.json index a1f4155a879..74a9842574f 100644 --- a/webview-ui/src/i18n/locales/pt-BR/settings.json +++ b/webview-ui/src/i18n/locales/pt-BR/settings.json @@ -506,6 +506,7 @@ "none": "Nenhum", "minimal": "Mínimo (mais rápido)", "high": "Alto", + "xhigh": "Muito alto", "medium": "Médio", "low": "Baixo" }, diff --git a/webview-ui/src/i18n/locales/ru/settings.json b/webview-ui/src/i18n/locales/ru/settings.json index e71ddfd936b..a6ab5805100 100644 --- a/webview-ui/src/i18n/locales/ru/settings.json +++ b/webview-ui/src/i18n/locales/ru/settings.json @@ -506,6 +506,7 @@ "none": "Нет", "minimal": "Минимальный (самый быстрый)", "high": "Высокие", + "xhigh": "Очень высокие", "medium": "Средние", "low": "Низкие" }, diff --git a/webview-ui/src/i18n/locales/tr/settings.json b/webview-ui/src/i18n/locales/tr/settings.json index 0e17e1a6cc9..0d07eec8885 100644 --- a/webview-ui/src/i18n/locales/tr/settings.json +++ b/webview-ui/src/i18n/locales/tr/settings.json @@ -506,6 +506,7 @@ "none": "Yok", "minimal": "Minimal (en hızlı)", "high": "Yüksek", + "xhigh": "Çok yüksek", "medium": "Orta", "low": "Düşük" }, diff --git a/webview-ui/src/i18n/locales/vi/settings.json b/webview-ui/src/i18n/locales/vi/settings.json index f164db9ac90..f0dc935fa06 100644 --- a/webview-ui/src/i18n/locales/vi/settings.json +++ b/webview-ui/src/i18n/locales/vi/settings.json @@ -506,6 +506,7 @@ "none": "Không", "minimal": "Tối thiểu (nhanh nhất)", "high": "Cao", + "xhigh": "Rất cao", "medium": "Trung bình", "low": "Thấp" }, diff --git a/webview-ui/src/i18n/locales/zh-CN/settings.json b/webview-ui/src/i18n/locales/zh-CN/settings.json index 2c9327c94db..873f9d2e87b 100644 --- a/webview-ui/src/i18n/locales/zh-CN/settings.json +++ b/webview-ui/src/i18n/locales/zh-CN/settings.json @@ -506,6 +506,7 @@ "none": "无", "minimal": "最小 (最快)", "high": "高", + "xhigh": "超高", "medium": "中", "low": "低" }, diff --git a/webview-ui/src/i18n/locales/zh-TW/settings.json b/webview-ui/src/i18n/locales/zh-TW/settings.json index 67957e87afb..ca584a606e4 100644 --- a/webview-ui/src/i18n/locales/zh-TW/settings.json +++ b/webview-ui/src/i18n/locales/zh-TW/settings.json @@ -506,6 +506,7 @@ "none": "無", "minimal": "最小 (最快)", "high": "高", + "xhigh": "超高", "medium": "中", "low": "低" }, From 6763f55a525e8073c9deb22200803768de30a738 Mon Sep 17 00:00:00 2001 From: Hannes Rudolph Date: Mon, 8 Dec 2025 10:52:40 -0700 Subject: [PATCH 4/4] chore: revert unrelated CustomModesManager refactoring --- src/core/config/CustomModesManager.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/config/CustomModesManager.ts b/src/core/config/CustomModesManager.ts index 4344cdd75f0..a243a9236be 100644 --- a/src/core/config/CustomModesManager.ts +++ b/src/core/config/CustomModesManager.ts @@ -193,13 +193,14 @@ export class CustomModesManager { const result = customModesSettingsSchema.safeParse(settings) if (!result.success) { - const issues = result.error.issues - .map((issue) => `• ${issue.path.join(".")}: ${issue.message}`) - .join("\n") - console.error(`[CustomModesManager] Schema validation failed for ${filePath}:\n${issues}`) + console.error(`[CustomModesManager] Schema validation failed for ${filePath}:`, result.error) // Show user-friendly error for .roomodes files if (filePath.endsWith(ROOMODES_FILENAME)) { + const issues = result.error.issues + .map((issue) => `• ${issue.path.join(".")}: ${issue.message}`) + .join("\n") + vscode.window.showErrorMessage(t("common:customModes.errors.schemaValidationError", { issues })) }