From a29ffeee4c90472c1864e295f5e8dc4b1c6b0d09 Mon Sep 17 00:00:00 2001 From: Adeniji Adekunle James Date: Wed, 19 Nov 2025 00:12:49 +0000 Subject: [PATCH] Support GPT-5.1: smarter, faster, and more conversational for complex tasks (#1783) Added to OpenAI and Azure GPT-5.1: adaptive reasoning GPT-5.1-codex: advanced coding workflows GPT-5.1-codex-mini: compact and efficient --- ## Summary by cubic Added support for OpenAI and Azure GPT-5.1, including GPT-5.1 Codex and Codex Mini, for smarter conversations and better coding tasks. All models use a 400k context window, require temperature 1, and leave max output tokens unspecified to align with API behavior. Written for commit 9788541c88732aa7d522fc70bfb20f22c3544982. Summary will update automatically on new commits. --- > [!NOTE] > Adds GPT-5.1, GPT-5.1 Codex, and Codex Mini to OpenAI and Azure model catalogs with 400k context and temperature 1 (max output tokens unspecified). > > - **Model registry updates (`src/ipc/shared/language_model_constants.ts`)**: > - **OpenAI**: > - Add `gpt-5.1`, `gpt-5.1-codex`, `gpt-5.1-codex-mini` (400k `contextWindow`, `temperature: 1`, `maxOutputTokens: undefined`). > - Keep existing `gpt-5`, `gpt-5-codex`, `gpt-5-mini`, `gpt-5-nano`, `o4-mini`. > - **Azure**: > - Add `gpt-5.1`, `gpt-5.1-codex`, `gpt-5.1-codex-mini` with matching settings (400k `contextWindow`, `temperature: 1`). > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 9788541c88732aa7d522fc70bfb20f22c3544982. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --------- Co-authored-by: Will Chen --- src/ipc/shared/language_model_constants.ts | 73 ++++++++++++++++++++-- 1 file changed, 69 insertions(+), 4 deletions(-) diff --git a/src/ipc/shared/language_model_constants.ts b/src/ipc/shared/language_model_constants.ts index 7536dae..cc110b8 100644 --- a/src/ipc/shared/language_model_constants.ts +++ b/src/ipc/shared/language_model_constants.ts @@ -20,11 +20,12 @@ export interface ModelOption { export const MODEL_OPTIONS: Record = { openai: [ - // https://platform.openai.com/docs/models/gpt-5-codex + // https://platform.openai.com/docs/models/gpt-5.1 { - name: "gpt-5-codex", - displayName: "GPT 5 Codex", - description: "OpenAI's flagship model optimized for coding", + name: "gpt-5.1", + displayName: "GPT 5.1", + description: + "OpenAI's flagship model- smarter, faster, and more conversational", // Technically it's 128k but OpenAI errors if you set max_tokens instead of max_completion_tokens maxOutputTokens: undefined, contextWindow: 400_000, @@ -32,6 +33,31 @@ export const MODEL_OPTIONS: Record = { temperature: 1, dollarSigns: 3, }, + // https://platform.openai.com/docs/models/gpt-5.1-codex + { + name: "gpt-5.1-codex", + displayName: "GPT 5.1 Codex", + description: "OpenAI's advanced coding workflows", + // Technically it's 128k but OpenAI errors if you set max_tokens instead of max_completion_tokens + maxOutputTokens: undefined, + contextWindow: 400_000, + // Requires temperature to be default value (1) + temperature: 1, + dollarSigns: 3, + }, + // https://platform.openai.com/docs/models/gpt-5.1-codex-mini + { + name: "gpt-5.1-codex-mini", + displayName: "GPT 5.1 Codex Mini", + description: "OpenAI's compact and efficient coding model", + // Technically it's 128k but OpenAI errors if you set max_tokens instead of max_completion_tokens + maxOutputTokens: undefined, + contextWindow: 400_000, + // Requires temperature to be default value (1) + temperature: 1, + dollarSigns: 2, + }, + // https://platform.openai.com/docs/models/gpt-5 { name: "gpt-5", @@ -44,6 +70,18 @@ export const MODEL_OPTIONS: Record = { temperature: 1, dollarSigns: 3, }, + // https://platform.openai.com/docs/models/gpt-5-codex + { + name: "gpt-5-codex", + displayName: "GPT 5 Codex", + description: "OpenAI's flagship model optimized for coding", + // Technically it's 128k but OpenAI errors if you set max_tokens instead of max_completion_tokens + maxOutputTokens: undefined, + contextWindow: 400_000, + // Requires temperature to be default value (1) + temperature: 1, + dollarSigns: 3, + }, // https://platform.openai.com/docs/models/gpt-5-mini { name: "gpt-5-mini", @@ -297,6 +335,33 @@ export const MODEL_OPTIONS: Record = { }, ], azure: [ + { + name: "gpt-5.1", + displayName: "GPT-5.1", + description: "Azure OpenAI GPT-5.1 model", + // See OpenAI comment above + // maxOutputTokens: 128_000, + contextWindow: 400_000, + temperature: 1, + }, + { + name: "gpt-5.1-codex", + displayName: "GPT-5.1 Codex", + description: "Azure OpenAI GPT-5.1 Codex model", + // See OpenAI comment above + // maxOutputTokens: 128_000, + contextWindow: 400_000, + temperature: 1, + }, + { + name: "gpt-5.1-codex-mini", + displayName: "GPT-5.1 Codex Mini", + description: "Azure OpenAI GPT-5.1 Codex Mini model", + // See OpenAI comment above + // maxOutputTokens: 128_000, + contextWindow: 400_000, + temperature: 1, + }, { name: "gpt-5-codex", displayName: "GPT-5 Codex",