From 58b1c076f34be5111b3428ee9013924d9465fb2e Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Tue, 17 Nov 2026 18:39:39 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A4=96=20feat(models):=20move=20gpt/s?= =?UTF-8?q?ol/astra=20to=20GPT-6.2=20Sol=20and=20Astra?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OpenAI released GPT-6.2 Astra and GPT-6.2 Sol on 2026-11-17. The `gpt`/`sol` aliases now resolve to openai:gpt-6.2-sol and `astra` to openai:gpt-6.2-astra (the `gpt-6-astra` version alias becomes `gpt-6.2-astra`, as grok-4.6 -> 4.7 did). - thinking.ts: one OPENAI_GPT_TIERS table (rejectsNoneEffort, ultrafast, flex) replaces the per-model Astra / 6.1 Sol regexes. - Service tiers: Ultrafast is offered on both 6.2 models; Flex is dropped for them (no Flex row on the pricing page). Pricing: Fast 2x, Ultrafast at the 6x list factor (over-counts 2x during the 3x promo through 2027-02-28). - Cyber: the Daybreak program map moves to an exact-id table in cyberMode.ts; 6.2 is not in the guide, so Cyber stays on gpt-6-astra and gpt-6.1-sol only. - Codex OAuth: both 6.2 ids allowed, 272K cap ASSUMED (no catalog row yet). - GPT-6 Astra and GPT-6.1 Sol stay usable as custom model strings with their pricing, tiers (Flex included), reasoning policy and Codex routing. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh`_ --- docs/config/models.mdx | 14 +-- docs/config/providers.mdx | 10 +- .../Settings/Sections/ProvidersSection.tsx | 2 +- src/common/config/schemas/providersConfig.ts | 3 +- src/common/constants/codexOAuth.test.ts | 3 + src/common/constants/codexOAuth.ts | 16 ++- src/common/constants/knownModels.test.ts | 2 + src/common/constants/knownModels.ts | 46 ++++----- src/common/types/thinking.test.ts | 60 ++++++----- src/common/types/thinking.ts | 99 ++++++++++++------- src/common/utils/ai/cyberMode.test.ts | 32 ++++-- src/common/utils/ai/cyberMode.ts | 27 +++-- .../ai/openaiProviderOptionsAvailability.ts | 33 ++++--- src/common/utils/ai/providerOptions.test.ts | 42 ++++++++ src/common/utils/ai/providerOptions.ts | 4 +- src/common/utils/ai/selectableModels.test.ts | 12 ++- .../utils/compaction/contextLimit.test.ts | 20 ++-- src/common/utils/thinking/policy.test.ts | 14 ++- src/common/utils/thinking/policy.ts | 7 +- src/common/utils/tokens/displayUsage.test.ts | 20 ++++ src/common/utils/tokens/modelStats.test.ts | 16 ++- src/common/utils/tokens/models-extra.ts | 46 +++++++++ src/common/utils/tokens/serviceTierPricing.ts | 8 ++ .../builtInSkillContent.generated.ts | 24 +++-- src/node/services/aiService.test.ts | 3 +- .../services/providerModelFactory.test.ts | 36 +++++++ src/node/services/providerModelFactory.ts | 5 +- tests/ui/agents/thinkingSelector.test.ts | 2 +- 28 files changed, 436 insertions(+), 170 deletions(-) diff --git a/docs/config/models.mdx b/docs/config/models.mdx index 73f13d2c92c..732f1a0320d 100644 --- a/docs/config/models.mdx +++ b/docs/config/models.mdx @@ -18,9 +18,9 @@ Xum ships with curated models kept up to date with the frontier. Use any custom | Opus 5.5 | anthropic:claude-opus-5-5 | `opus` | ✓ | | Sonnet 5.5 | anthropic:claude-sonnet-5-5 | `sonnet` | | | Haiku 5.5 | anthropic:claude-haiku-5-5 | `haiku` | | -| GPT-6.1 Sol | openai:gpt-6.1-sol | `gpt`, `sol` | | +| GPT-6.2 Sol | openai:gpt-6.2-sol | `gpt`, `sol` | | | GPT-6 Luna | openai:gpt-6-luna | `luna` | | -| GPT-6 Astra | openai:gpt-6-astra | `astra`, `gpt-6-astra` | | +| GPT-6.2 Astra | openai:gpt-6.2-astra | `astra`, `gpt-6.2-astra` | | | Gemini 3.1 Pro Preview | google:gemini-3.1-pro-preview | `gemini`, `gemini-pro` | | | Gemini 3.8 Flash | google:gemini-3.8-flash | `gemini-flash` | | | Gemini 4 Argon | google:gemini-4-argon | `argon`, `gemini-argon`, `gemini-4` | | @@ -34,21 +34,23 @@ Xum ships with curated models kept up to date with the frontier. Use any custom {/* END KNOWN_MODELS_TABLE */} -Xum supports the GPT-6 tiers (GPT-6.1 Sol, GPT-6 Astra, and GPT-6 Luna); older OpenAI GPT models are no longer supported. +Xum supports the GPT-6 tiers (GPT-6.2 Sol, GPT-6.2 Astra, and GPT-6 Luna); older OpenAI GPT models are no longer supported. GPT-6.1 Sol and GPT-6 Astra stay usable as the custom model strings `openai:gpt-6.1-sol` and `openai:gpt-6-astra`. GPT-5.6 models added from **Settings → Models** (`gpt-5.6`, `gpt-5.6-sol`, `gpt-5.6-terra`, and `gpt-5.6-luna`) support thinking from off through max and Pro reasoning mode. Other older GPT models stay unsupported. GPT-6 Luna supports thinking from off through max on the default Responses API route. On the opt-in Chat Completions route, Xum disables its reasoning because OpenAI only supports function calling there with reasoning off. -GPT-6.1 Sol (the `gpt` and `sol` aliases) and GPT-6 Astra support thinking from low through max; OpenAI does not allow turning their reasoning off. Use the default Responses API route with them, because OpenAI does not support tool calling for these models on Chat Completions. +GPT-6.2 Sol (the `gpt` and `sol` aliases), GPT-6.2 Astra (the `astra` alias), GPT-6.1 Sol, and GPT-6 Astra support thinking from low through max; OpenAI does not allow turning their reasoning off. Use the default Responses API route with them, because OpenAI does not support tool calling for these models on Chat Completions. ### OpenAI Ultrafast -To use OpenAI's fastest processing tier, turn on the thinking selector's **Ultrafast mode** row (it sits next to **Fast mode**), run **Toggle Ultrafast Mode** from the command palette, or use its keyboard shortcut. You can also choose **ultrafast** as the service tier in **Settings → Providers → OpenAI**. Fast and Ultrafast are mutually exclusive, and turning either off switches the chat to Standard. Like the thinking level, the choice is saved per chat and stays with the chat when you switch models; chats without a choice use the provider's service tier. Xum sends it only to models that OpenAI serves Ultrafast for: GPT-6.1 Sol and GPT-6 Astra. It also needs a route that sends OpenAI's own Responses API: direct OpenAI on the default wire format, Coder instances of type OpenAI, or custom OpenAI Responses providers. Direct OpenAI set to Chat Completions, Coder OpenAI-compatible instances, OpenRouter, and GitHub Copilot do not accept the tier. Elsewhere the request runs without a service tier instead of falling back to Fast. Ultrafast costs 6× the Standard price, and Xum's cost tracking uses that rate. +To use OpenAI's fastest processing tier, turn on the thinking selector's **Ultrafast mode** row (it sits next to **Fast mode**), run **Toggle Ultrafast Mode** from the command palette, or use its keyboard shortcut. You can also choose **ultrafast** as the service tier in **Settings → Providers → OpenAI**. Fast and Ultrafast are mutually exclusive, and turning either off switches the chat to Standard. Like the thinking level, the choice is saved per chat and stays with the chat when you switch models; chats without a choice use the provider's service tier. Xum sends it only to models that OpenAI serves Ultrafast for: GPT-6.2 Sol, GPT-6.2 Astra, GPT-6.1 Sol, and GPT-6 Astra. It also needs a route that sends OpenAI's own Responses API: direct OpenAI on the default wire format, Coder instances of type OpenAI, or custom OpenAI Responses providers. Direct OpenAI set to Chat Completions, Coder OpenAI-compatible instances, OpenRouter, and GitHub Copilot do not accept the tier. Elsewhere the request runs without a service tier instead of falling back to Fast. Ultrafast costs 6× the Standard price, and Xum's cost tracking uses that rate. OpenAI charges 3× for GPT-6.2 Sol and Astra through February 28, 2027, so until then Xum shows twice their real Ultrafast cost. + +OpenAI does not offer the Flex tier for GPT-6.2 Sol and Astra. If **Settings → Providers → OpenAI** sets the service tier to **flex**, their requests run at Standard instead. ### Pro reasoning mode -GPT-6.1 Sol, GPT-6 Astra, GPT-6 Luna, and the GPT-5.6 models added from **Settings → Models** support OpenAI's pro reasoning mode. Open the reasoning selector next to the model picker and enable **Pro mode** (or run "Toggle Pro Reasoning Mode" from the Command Palette) to send `reasoning.mode: "pro"` with each request. The setting is saved per workspace. Pro mode can consume more tokens and responses can take noticeably longer. Pro is available on supported direct OpenAI Responses API routes. Gateway routes, Chat Completions, and Codex OAuth use standard mode. +The GPT-6 tiers (GPT-6.2 Sol, GPT-6.2 Astra, GPT-6.1 Sol, GPT-6 Astra, and GPT-6 Luna) and the GPT-5.6 models added from **Settings → Models** support OpenAI's pro reasoning mode. Open the reasoning selector next to the model picker and enable **Pro mode** (or run "Toggle Pro Reasoning Mode" from the Command Palette) to send `reasoning.mode: "pro"` with each request. The setting is saved per workspace. Pro mode can consume more tokens and responses can take noticeably longer. Pro is available on supported direct OpenAI Responses API routes. Gateway routes, Chat Completions, and Codex OAuth use standard mode. ## Model Selection diff --git a/docs/config/providers.mdx b/docs/config/providers.mdx index dfc03605e0b..fbd9a63a299 100644 --- a/docs/config/providers.mdx +++ b/docs/config/providers.mdx @@ -167,8 +167,8 @@ The built-in `openai` provider supports two wire formats: | `responses` | Uses the OpenAI Responses API. This is the default and supports current OpenAI and Codex features. | | `chatCompletions` | Uses `/v1/chat/completions`. Use this for OpenAI-API-shaped gateways that do not expose `/v1/responses`, such as Azure Government endpoints. | -OpenAI documents that GPT-6 Astra only supports tool calling through the Responses API, so keep -`responses` when using that model. +OpenAI documents that GPT-6 Astra and the GPT-6.2 models only support tool calling through the +Responses API, so keep `responses` when using them. Set the format in **Settings → Providers → OpenAI → Wire format**, or in `~/.xum/providers.jsonc`: @@ -200,8 +200,10 @@ Palette. Cyber and Pro are mutually exclusive. Cyber appears only for models with a documented Daybreak value. GPT-6.1 Sol and GPT-6 Astra send `daybreak_blue`. OpenAI requires Daybreak Red approval for reduced refusals on these models, but -they still take `daybreak_blue`. Cyber works only with the built-in OpenAI provider's API key on -the `responses` wire format. A custom base URL on the built-in provider also receives the field. +they still take `daybreak_blue`. OpenAI's guide lists no value for GPT-6.2 Sol or Astra, so Cyber +does not appear for them or for the `gpt`, `sol`, and `astra` aliases; to use Cyber, pick +`openai:gpt-6.1-sol` or `openai:gpt-6-astra`. Cyber works only with the built-in OpenAI +provider's API key on the `responses` wire format. A custom base URL on the built-in provider also receives the field. Gateways, custom providers, Codex OAuth, and Chat Completions use standard safeguards. If OpenAI rejects the program, Xum shows OpenAI's message and does not retry: diff --git a/src/browser/features/Settings/Sections/ProvidersSection.tsx b/src/browser/features/Settings/Sections/ProvidersSection.tsx index 56f0795971c..d3a3d59e5cf 100644 --- a/src/browser/features/Settings/Sections/ProvidersSection.tsx +++ b/src/browser/features/Settings/Sections/ProvidersSection.tsx @@ -2544,7 +2544,7 @@ export function ProvidersSection() {

Applies to models that support both ChatGPT OAuth and API keys - (e.g. gpt-6.1-sol). + (e.g. gpt-6.2-sol).

diff --git a/src/common/config/schemas/providersConfig.ts b/src/common/config/schemas/providersConfig.ts index aae5127d60e..7df933f2f7d 100644 --- a/src/common/config/schemas/providersConfig.ts +++ b/src/common/config/schemas/providersConfig.ts @@ -9,7 +9,8 @@ export const CacheTtlSchema = z.enum(["5m", "1h"]); /** Anthropic request speed; "fast" opts into Fast mode (see anthropicFastMode.ts). */ export const AnthropicSpeedSchema = z.enum(["standard", "fast"]); // "ultrafast" is OpenAI's model-gated premium tier (DevDay 2026-09-29); requests for -// models without it drop the tier (see openaiModelSupportsServiceTier). +// models without it drop the tier, as GPT-6.2 requests do for "flex" (see +// openaiModelSupportsServiceTier). export const ServiceTierSchema = z.enum(["auto", "default", "flex", "priority", "ultrafast"]); export type ServiceTier = z.infer; // Fast mode remembers the tier it replaced, so toggling Fast off from Ultrafast restores it. diff --git a/src/common/constants/codexOAuth.test.ts b/src/common/constants/codexOAuth.test.ts index 94c2b0d8127..ce8c8a04135 100644 --- a/src/common/constants/codexOAuth.test.ts +++ b/src/common/constants/codexOAuth.test.ts @@ -11,6 +11,9 @@ describe("codexOAuth model gating", () => { ["gpt-6-astra", 272_000], ["gpt-6.1-sol", 272_000], ["gpt-6-luna", 272_000], + // No catalog row yet; the cap is assumed from the rows above. + ["gpt-6.2-astra", 272_000], + ["gpt-6.2-sol", 272_000], ])("allows %s through Codex OAuth with a %d context cap", (model, contextLimit) => { for (const id of [model, `openai:${model}`]) { expect(isCodexOauthAllowedModelId(id)).toBe(true); diff --git a/src/common/constants/codexOAuth.ts b/src/common/constants/codexOAuth.ts index 7a7450931d5..dd75032cb08 100644 --- a/src/common/constants/codexOAuth.ts +++ b/src/common/constants/codexOAuth.ts @@ -108,9 +108,15 @@ export const CODEX_OAUTH_ALLOWED_MODELS = new Set([ // context-window overrides below), so the `luna` alias keeps working for // OAuth-only users. "gpt-6-luna", - // GPT-6.1 Sol (September 29, 2026): the Codex catalog's default model, so the - // promoted `gpt`/`sol` aliases keep working for OAuth-only users. + // GPT-6.1 Sol (September 29, 2026): the Codex catalog's default model when the + // `gpt`/`sol` aliases moved to it. "gpt-6.1-sol", + // GPT-6.2 Astra and Sol (November 17, 2026): OpenAI announced both in Codex on + // release day, and the `astra` and `gpt`/`sol` aliases now point at them, so + // without these entries OAuth-only users of those aliases fail with + // api_key_not_found. + "gpt-6.2-astra", + "gpt-6.2-sol", ]); /** @@ -129,6 +135,12 @@ const CODEX_OAUTH_CONTEXT_WINDOW_OVERRIDES: Record = { "gpt-6-luna": 272_000, // GPT-6.1 Sol: https://github.com/openai/codex/blob/b1e72963c3b71a9265a551e54beff078384efed9/codex-rs/models-manager/models.json "gpt-6.1-sol": 272_000, + // GPT-6.2 Astra/Sol: ASSUMED, the one exception to the rule above. The catalog had + // no 6.2 row at c08843a5bd16de5524129b2f4270490447991984 (release day), so these + // copy the other GPT-6 rows' 272K. A cap below the real one only compacts + // earlier; replace them with the catalog's values once its rows land. + "gpt-6.2-astra": 272_000, + "gpt-6.2-sol": 272_000, }; function normalizeCodexOauthModelId(modelId: string): string { diff --git a/src/common/constants/knownModels.test.ts b/src/common/constants/knownModels.test.ts index ab7712d7c47..70a56069230 100644 --- a/src/common/constants/knownModels.test.ts +++ b/src/common/constants/knownModels.test.ts @@ -67,6 +67,8 @@ describe("Known Models Integration", () => { ["anthropic:claude-haiku-4-5", "anthropic/claude-3.5-haiku"], ["anthropic:claude-fable-5-1", "anthropic/claude-opus-4.5"], ["anthropic:claude-mythos-5-1", "anthropic/claude-opus-4.5"], + ["openai:gpt-6.1-sol", "openai/gpt-5"], + ["openai:gpt-6-astra", "openai/gpt-5"], ])("retired id %s keeps its tokenizer override", (modelId, tokenizer) => { expect(TOKENIZER_MODEL_OVERRIDES[modelId]).toBe(tokenizer); }); diff --git a/src/common/constants/knownModels.ts b/src/common/constants/knownModels.ts index 57cae1179c0..dfe7ac086b0 100644 --- a/src/common/constants/knownModels.ts +++ b/src/common/constants/knownModels.ts @@ -2,7 +2,6 @@ * Centralized model metadata. Update model versions here and everywhere else will follow. */ -import type { OpenAICyberAccessProgram } from "../types/openaiAccessPrograms"; import { formatModelDisplayName } from "../utils/ai/modelDisplay"; type ModelProvider = @@ -30,16 +29,6 @@ interface KnownModelDefinition { warm?: boolean; /** Optional tokenizer override for ai-tokenizer */ tokenizerOverride?: string; - /** - * OpenAI `access_programs.cyber` value sent in Cyber mode. Set only for the - * exact request model ids OpenAI's Daybreak guide maps to a program - * (https://developers.openai.com/api/docs/guides/daybreak, retrieved - * 2026-09-30). The value follows the model, not the organization's approval - * level. GPT-6 Luna is not listed, and GPT-6 Sol is listed but no longer a - * Xum model. Daybreak aliases and gpt-5.6-cyber accept only one program, - * which the API already selects when the field is omitted. - */ - cyberAccessProgram?: OpenAICyberAccessProgram; } interface KnownModel extends KnownModelDefinition { @@ -128,22 +117,21 @@ const MODEL_DEFINITIONS = { // counting (same situation as OPUS above). tokenizerOverride: "anthropic/claude-opus-4.5", }, - // GPT-6.1 Sol - released September 29, 2026, successor to GPT-6 Sol at the same - // Standard pricing ($2/M input, $10/M output) with cheaper cache reads ($0.10/M). - // Like Astra, it cannot disable reasoning. Keep the durable gpt/sol aliases on the - // latest Sol tier without moving users to the more expensive Astra tier. OpenAI GPT - // models older than GPT-6 (and GPT-6 Sol) are no longer supported: Pro reasoning - // mode on the GPT-6 tiers supersedes the separate gpt-5.5-pro model id. + // GPT-6.2 Sol - released November 17, 2026, successor to GPT-6.1 Sol at the same + // Standard pricing ($2/M input, $10/M output, $0.10/M cache reads). Like Astra, it + // cannot disable reasoning. Keep the durable gpt/sol aliases on the latest Sol tier + // without moving users to the more expensive Astra tier. GPT-6.1 Sol stays usable as + // the custom model string `openai:gpt-6.1-sol`. OpenAI GPT models older than GPT-6 + // (and GPT-6 Sol) are no longer supported: Pro reasoning mode on the GPT-6 tiers + // supersedes the separate gpt-5.5-pro model id. + // https://developers.openai.com/api/docs/models/gpt-6.2-sol GPT: { provider: "openai", - providerModelId: "gpt-6.1-sol", + providerModelId: "gpt-6.2-sol", aliases: ["gpt", "sol"], warm: true, // GPT-6's tokenizer is not published upstream; reuse gpt-5 for approximate counting. tokenizerOverride: "openai/gpt-5", - // OpenAI requires Daybreak Red approval for reduced refusals, yet the model - // rejects daybreak_red. - cyberAccessProgram: "daybreak_blue", }, // GPT-6 Luna - the latest cost-efficient tier, released September 22, 2026. GPT_6_LUNA: { @@ -152,16 +140,18 @@ const MODEL_DEFINITIONS = { aliases: ["luna"], tokenizerOverride: "openai/gpt-5", }, - // Astra stays a separate frontier-tier choice rather than taking over `gpt`. - // Not warmed: its tokenizer override is already warmed via GPT. + // GPT-6.2 Astra - released November 17, 2026, successor to GPT-6 Astra at lower + // Standard pricing ($8/M input, $40/M output). Astra stays a separate frontier-tier + // choice rather than taking over `gpt`. The version alias follows the version, as + // `grok-4.7` did: GPT-6 Astra stays usable as the custom model string + // `openai:gpt-6-astra`. Not warmed: its tokenizer override is already warmed via GPT. + // https://developers.openai.com/api/docs/models/gpt-6.2-astra GPT_6_ASTRA: { provider: "openai", - providerModelId: "gpt-6-astra", - aliases: ["astra", "gpt-6-astra"], + providerModelId: "gpt-6.2-astra", + aliases: ["astra", "gpt-6.2-astra"], // GPT-6 tokenizer not published upstream; reuse gpt-5 for approximate counting. tokenizerOverride: "openai/gpt-5", - // Same Daybreak constraint as GPT (see its cyberAccessProgram). - cyberAccessProgram: "daybreak_blue", }, // Gemini 3.1 Pro supersedes Gemini 3 Pro; keep bare aliases pointed at the latest Pro tier. GEMINI_31_PRO: { @@ -313,6 +303,8 @@ const LEGACY_TOKENIZER_MODEL_OVERRIDES: Record = { "anthropic:claude-sonnet-5": "anthropic/claude-sonnet-4.5", "anthropic:claude-haiku-4-5": "anthropic/claude-3.5-haiku", "anthropic:claude-opus-4-8": "anthropic/claude-opus-4.5", + "openai:gpt-6.1-sol": "openai/gpt-5", + "openai:gpt-6-astra": "openai/gpt-5", "openai:daybreak-blue-latest": "openai/gpt-5", "openai:daybreak-red-latest": "openai/gpt-5", }; diff --git a/src/common/types/thinking.test.ts b/src/common/types/thinking.test.ts index a3b8d26e739..09bd3471de1 100644 --- a/src/common/types/thinking.test.ts +++ b/src/common/types/thinking.test.ts @@ -4,9 +4,8 @@ import { getOpenAIReasoningEffort, getThinkingDisplayLabel, getThinkingOptionLabel, - isGpt61SolModel, - isGpt6AstraModel, isGpt6LunaModel, + openaiGptTier, openaiRejectsDisabledReasoning, openaiSupportsNativeMaxEffort, openaiSupportsProMode, @@ -118,26 +117,38 @@ describe("openaiSupportsNativeMaxEffort", () => { expect(openaiSupportsNativeMaxEffort("openai:gpt-6-astra-20260930")).toBe(true); }); - test("does not extend the Astra matcher to named variants or other GPT-6 ids", () => { - expect(isGpt6AstraModel("openai:gpt-6-astra-mini")).toBe(false); - expect(isGpt6AstraModel("openai:gpt-6-astra.1")).toBe(false); - expect(isGpt6AstraModel("openai:gpt-6-astral")).toBe(false); - expect(isGpt6AstraModel("openai:gpt-6")).toBe(false); - expect(isGpt6AstraModel("openai:gpt-6-sol")).toBe(false); - expect(isGpt6AstraModel("openai:gpt-5.6-sol")).toBe(false); - expect(openaiSupportsNativeMaxEffort("openai:gpt-6")).toBe(false); + test("does not extend the GPT tiers to named variants or other GPT-6 ids", () => { + for (const model of [ + "openai:gpt-6-astra-mini", + "openai:gpt-6-astra.1", + "openai:gpt-6-astral", + "openai:gpt-6", + "openai:gpt-6-sol", + "openai:gpt-6.2", + "openai:gpt-6.2-terra", + "openai:gpt-6.2-sol-mini", + ]) { + expect(openaiGptTier(model)).toBeUndefined(); + expect(openaiSupportsNativeMaxEffort(model)).toBe(false); + } }); - test("accepts only dated Astra snapshots, not numeric-prefixed qualifiers", () => { - expect(isGpt6AstraModel("gpt-6-astra-2026-09-30")).toBe(true); - expect(isGpt6AstraModel("gpt-6-astra-20260930")).toBe(true); + test("accepts only dated snapshots, not numeric-prefixed qualifiers", () => { + expect(openaiRejectsDisabledReasoning("gpt-6-astra-2026-09-30")).toBe(true); + expect(openaiRejectsDisabledReasoning("gpt-6-astra-20260930")).toBe(true); + expect(openaiRejectsDisabledReasoning("gpt-6.2-sol-2026-11-17")).toBe(true); // Numeric-prefixed qualifiers are not dated snapshots and must not inherit // Astra's reasoning surface. - expect(isGpt6AstraModel("gpt-6-astra-2-mini")).toBe(false); - expect(isGpt6AstraModel("gpt-6-astra-2026-preview")).toBe(false); - expect(isGpt6AstraModel("gpt-6-astra-2026-09-30-preview")).toBe(false); - expect(isGpt6AstraModel("gpt-6-astra-2026")).toBe(false); - expect(openaiSupportsNativeMaxEffort("openai:gpt-6-astra-2-mini")).toBe(false); + for (const model of [ + "gpt-6-astra-2-mini", + "gpt-6-astra-2026-preview", + "gpt-6-astra-2026-09-30-preview", + "gpt-6-astra-2026", + "gpt-6.2-astra-2026-11-17-2026-11-17", + ]) { + expect(openaiGptTier(model)).toBeUndefined(); + expect(openaiRejectsDisabledReasoning(model)).toBe(false); + } }); }); @@ -192,13 +203,17 @@ describe("getOpenAIReasoningEffort", () => { expect(getOpenAIReasoningEffort("low", "openai:gpt-6-luna")).toBe("low"); }); - test("gives GPT-6.1 Sol Astra's surface: native max, off clamps to low, Pro allowed", () => { + // https://developers.openai.com/api/docs/models/gpt-6.2-sol and gpt-6.2-astra: + // "The API rejects requests that set reasoning effort to `none`." + test("gives GPT-6.1 Sol and GPT-6.2 Astra's surface: native max, off clamps to low, Pro allowed", () => { for (const id of [ "openai:gpt-6.1-sol", "openrouter:openai/gpt-6.1-sol", "openai:gpt-6.1-sol-2026-09-29", + "openai:gpt-6.2-sol", + "openai:gpt-6.2-astra", + "openrouter:openai/gpt-6.2-sol", ]) { - expect(isGpt61SolModel(id)).toBe(true); expect(openaiRejectsDisabledReasoning(id)).toBe(true); expect(openaiSupportsProMode(id)).toBe(true); expect(getOpenAIReasoningEffort("max", id)).toBe("max"); @@ -207,8 +222,9 @@ describe("getOpenAIReasoningEffort", () => { // GPT-6.1 Sol must not inherit Luna's "none" (Chat Completions tool clamp) // behavior, and variants stay outside it. expect(isGpt6LunaModel("openai:gpt-6.1-sol")).toBe(false); - expect(isGpt61SolModel("openai:gpt-6.1-sol-mini")).toBe(false); - expect(isGpt61SolModel("openai:gpt-6-sol")).toBe(false); + expect(isGpt6LunaModel("openai:gpt-6.2-sol")).toBe(false); + expect(openaiRejectsDisabledReasoning("openai:gpt-6.1-sol-mini")).toBe(false); + expect(openaiRejectsDisabledReasoning("openai:gpt-6-sol")).toBe(false); }); test("gives GPT-6 Astra native max but clamps off to low (it rejects none)", () => { diff --git a/src/common/types/thinking.ts b/src/common/types/thinking.ts index a5351a240c0..79c66cb2bcd 100644 --- a/src/common/types/thinking.ts +++ b/src/common/types/thinking.ts @@ -270,33 +270,62 @@ export function anthropicSupportsNativeXhigh(modelString: string): boolean { ); } -/** - * GPT-6 Astra matcher (released September 3, 2026 under the API id - * `gpt-6-astra`; there is no bare `gpt-6` alias). Accepts only the bare id or a - * dated snapshot (`-YYYY-MM-DD` / `-YYYYMMDD`, e.g. gpt-6-astra-2026-09-30) and - * is anchored so any other qualifier, named (`gpt-6-astra-mini`) or numeric - * (`gpt-6-astra-2-mini`, `gpt-6-astra-2026-preview`), stays outside it. A false - * match would apply Astra's reasoning surface (native `max`, no `none`) to a - * model that may reject it. - */ -export function isGpt6AstraModel(modelString: string): boolean { - const withoutPrefix = stripModelProviderPrefixes(modelString); - return /^gpt-6-astra(?:-\d{4}-\d{2}-\d{2}|-\d{8})?$/.test(withoutPrefix); +/** What OpenAI documents for one supported GPT model id. */ +interface OpenAIGptTier { + /** + * The API returns HTTP 400 for `reasoning.effort: "none"` and lists no + * `minimal`, so reasoning cannot be turned off (see openaiRejectsDisabledReasoning). + */ + readonly rejectsNoneEffort: boolean; + /** OpenAI serves `service_tier: "ultrafast"` (https://developers.openai.com/api/docs/guides/ultrafast-mode). */ + readonly ultrafast: boolean; + /** The Flex table of https://developers.openai.com/api/docs/pricing lists the model. */ + readonly flex: boolean; } /** - * GPT-6.1 Sol matcher (released September 29, 2026 as `gpt-6.1-sol`). Anchored - * like isGpt6AstraModel. Unlike GPT-6 Sol (no longer supported), it shares - * Astra's reasoning surface: low through max, no `none`/`minimal`, and no Chat - * Completions tool calling. + * The supported OpenAI GPT tiers, keyed by API id. Older GPT models are not built + * in. Every tier has the native "max" reasoning effort, Pro reasoning mode on the + * same model id, and explicit prompt-cache breakpoints (GPT-5.6 and later). GPT-6 + * Astra and GPT-6.1 Sol keep their rows after the aliases moved to GPT-6.2: they + * stay usable as custom model strings. + */ +const OPENAI_GPT_TIERS: Readonly> = { + // GPT-6 Astra (September 3, 2026). https://developers.openai.com/api/docs/models/gpt-6-astra + "gpt-6-astra": { rejectsNoneEffort: true, ultrafast: true, flex: true }, + // GPT-6 Luna (September 22, 2026) takes `none` through `max`; Chat Completions + // function calls require `none` (see isGpt6LunaModel). + "gpt-6-luna": { rejectsNoneEffort: false, ultrafast: false, flex: true }, + // GPT-6.1 Sol (September 29, 2026; Ultrafast since 2026-10-08). Unlike GPT-6 Sol + // (no longer supported) it shares Astra's reasoning surface. + "gpt-6.1-sol": { rejectsNoneEffort: true, ultrafast: true, flex: true }, + // GPT-6.2 Astra and Sol (November 17, 2026). Both reject `none`. Neither is in the + // pricing page's Flex table (the model pages list Standard, Batch, Fast and + // Ultrafast), so Xum drops a Flex tier for them instead of sending it. + // https://developers.openai.com/api/docs/models/gpt-6.2-astra + // https://developers.openai.com/api/docs/models/gpt-6.2-sol + "gpt-6.2-astra": { rejectsNoneEffort: true, ultrafast: true, flex: false }, + "gpt-6.2-sol": { rejectsNoneEffort: true, ultrafast: true, flex: false }, +}; + +/** + * The OpenAI GPT tier a model string names, or undefined. Accepts provider and + * gateway prefixes and a dated snapshot suffix (`-YYYY-MM-DD` / `-YYYYMMDD`, + * e.g. gpt-6-astra-2026-09-30). Any other qualifier, named (`gpt-6-astra-mini`) + * or numeric (`gpt-6-astra-2-mini`, `gpt-6-astra-2026-preview`), stays outside + * it: a false match would apply a reasoning surface (native `max`, no `none`) + * to a model that may reject it. */ -export function isGpt61SolModel(modelString: string): boolean { - const withoutPrefix = stripModelProviderPrefixes(modelString); - return /^gpt-6\.1-sol(?:-\d{4}-\d{2}-\d{2}|-\d{8})?$/.test(withoutPrefix); +export function openaiGptTier(modelString: string): OpenAIGptTier | undefined { + const modelId = stripModelProviderPrefixes(modelString).replace( + /-(?:\d{4}-\d{2}-\d{2}|\d{8})$/, + "" + ); + return Object.hasOwn(OPENAI_GPT_TIERS, modelId) ? OPENAI_GPT_TIERS[modelId] : undefined; } /** - * GPT-6 Luna matcher (released September 22, 2026). Unlike Astra and GPT-6.1 Sol it + * GPT-6 Luna matcher (released September 22, 2026). Unlike the other GPT tiers it * supports `none` through `max`; Chat Completions function calls require `none`. */ export function isGpt6LunaModel(modelString: string): boolean { @@ -304,16 +333,9 @@ export function isGpt6LunaModel(modelString: string): boolean { return /^gpt-6-luna(?:-\d{4}-\d{2}-\d{2}|-\d{8})?$/.test(withoutPrefix); } -/** - * The supported OpenAI GPT tiers: GPT-6 Astra, GPT-6.1 Sol, and GPT-6 Luna. Older - * GPT models are not built in. Every tier has the native "max" reasoning effort, - * Pro reasoning mode on the same model id, and explicit prompt-cache breakpoints. - * Unannounced variants (e.g. `gpt-6-astra-mini`) stay outside it. - */ +/** Whether the model is one of the supported OpenAI GPT tiers (see OPENAI_GPT_TIERS). */ export function isGpt6FamilyModel(modelString: string): boolean { - return ( - isGpt6AstraModel(modelString) || isGpt61SolModel(modelString) || isGpt6LunaModel(modelString) - ); + return openaiGptTier(modelString) !== undefined; } /** @@ -321,7 +343,7 @@ export function isGpt6FamilyModel(modelString: string): boolean { * `gpt-5.6-luna`, plus dated snapshots). GPT-5.6 is no longer a built-in model * (#5258), but the Settings → Models catalogue still offers it, and OpenAI serves * `none` through native `max` and Pro mode on the whole family. Anchored like - * isGpt6AstraModel so `gpt-5.6-cyber` (a separate Daybreak model with an unknown + * openaiGptTier so `gpt-5.6-cyber` (a separate Daybreak model with an unknown * reasoning surface) and unannounced variants (`gpt-5.6-sol-mini`, `gpt-5.61`) * stay outside it. */ @@ -332,9 +354,9 @@ function isGpt56FamilyModel(modelString: string): boolean { /** * Whether the given OpenAI model supports the native "max" reasoning effort - * (every GPT-6 tier and the GPT-5.6 family). Astra and GPT-6.1 Sol reject `none` - * (see openaiRejectsDisabledReasoning); Luna and GPT-5.6 support none through - * max. Pro mode is independent of that effort ladder. + * (every GPT-6 tier and the GPT-5.6 family). Every GPT-6 tier but Luna rejects + * `none` (see openaiRejectsDisabledReasoning); Luna and GPT-5.6 support none + * through max. Pro mode is independent of that effort ladder. */ export function openaiSupportsNativeMaxEffort(modelString: string): boolean { return isGpt6FamilyModel(modelString) || isGpt56FamilyModel(modelString); @@ -344,12 +366,13 @@ export function openaiSupportsNativeMaxEffort(modelString: string): boolean { * Whether the given OpenAI model rejects `reasoning.effort: "none"`. * * GPT-6 Astra returns HTTP 400 for `none` and lists no `minimal`; reasoning - * cannot be turned off. GPT-6.1 Sol's model page likewise rejects both. - * OpenAI's migration guidance for callers of either value is to send `low`, so - * the thinking policy drops "off" and clamps it to "low". + * cannot be turned off. The GPT-6.1 Sol and GPT-6.2 model pages likewise reject + * `none` (see OPENAI_GPT_TIERS). OpenAI's migration guidance for callers of + * either value is to send `low`, so the thinking policy drops "off" and clamps + * it to "low". */ export function openaiRejectsDisabledReasoning(modelString: string): boolean { - return isGpt6AstraModel(modelString) || isGpt61SolModel(modelString); + return openaiGptTier(modelString)?.rejectsNoneEffort === true; } /** @@ -550,7 +573,7 @@ export const OPENAI_REASONING_EFFORT: Record * effort-less request echoed `effort: medium`), which would silently ignore the * user's off selection. * - * GPT-6 Astra and GPT-6.1 Sol reject "none" with a 400 (see + * Every GPT-6 tier but Luna rejects "none" with a 400 (see * openaiRejectsDisabledReasoning). The thinking policy already excludes "off" for * them; a stray "off" clamps to "low" here so a caller bypassing policy cannot * trigger the error. diff --git a/src/common/utils/ai/cyberMode.test.ts b/src/common/utils/ai/cyberMode.test.ts index ef721e70ac0..f9a095ddb05 100644 --- a/src/common/utils/ai/cyberMode.test.ts +++ b/src/common/utils/ai/cyberMode.test.ts @@ -28,8 +28,11 @@ const providersConfig: ProvidersConfigMap = { }, }; +// A model the Daybreak guide maps to a program, for the route and setting gates below. +const CYBER_MODEL = "openai:gpt-6.1-sol"; + describe("openaiCyberAccessProgram", () => { - test.each(["gpt", "sol", "astra", " gpt-6-astra ", "openai:gpt-6.1-sol", "openai:gpt-6-astra"])( + test.each([" openai:gpt-6.1-sol ", "openai:gpt-6.1-sol", "openai:gpt-6-astra"])( "maps %p to the model's Daybreak program on direct OpenAI Responses", (model) => { expect(openaiCyberAccessProgram(model, { providersConfig })).toBe("daybreak_blue"); @@ -37,8 +40,16 @@ describe("openaiCyberAccessProgram", () => { ); // Only exact ids the Daybreak guide maps are eligible; the API rejects a - // program the requested model does not take. + // program the requested model does not take. The guide's table + // (https://developers.openai.com/api/docs/guides/daybreak, 2026-11-17) has no + // GPT-6.2 row, so the aliases that moved to GPT-6.2 lose Cyber. test.each([ + "gpt", + "sol", + "astra", + "openai:gpt-6.2-sol", + "openai:gpt-6.2-astra", + "gpt-6-astra", "openai:gpt", "openai:gpt-6.1-sol-2026-09-29", "luna", @@ -55,21 +66,26 @@ describe("openaiCyberAccessProgram", () => { ...providersConfig, openai: { ...enabledOpenAI, cyberModelEnabled: false }, }; - expect(openaiCyberAccessProgram("gpt", { providersConfig: off })).toBeUndefined(); - expect(openaiCyberAccessProgram("gpt")).toBeUndefined(); + expect(openaiCyberAccessProgram(CYBER_MODEL, { providersConfig: off })).toBeUndefined(); + expect(openaiCyberAccessProgram(CYBER_MODEL)).toBeUndefined(); const { openai: _openai, ...withoutOpenAI } = providersConfig; - expect(openaiCyberAccessProgram("gpt", { providersConfig: withoutOpenAI })).toBeUndefined(); + expect( + openaiCyberAccessProgram(CYBER_MODEL, { providersConfig: withoutOpenAI }) + ).toBeUndefined(); }); test("is unavailable on Chat Completions", () => { expect( - openaiCyberAccessProgram("gpt", { providersConfig, openaiWireFormat: "chatCompletions" }) + openaiCyberAccessProgram(CYBER_MODEL, { + providersConfig, + openaiWireFormat: "chatCompletions", + }) ).toBeUndefined(); const storedChat: ProvidersConfigMap = { ...providersConfig, openai: { ...enabledOpenAI, wireFormat: "chatCompletions" }, }; - expect(openaiCyberAccessProgram("gpt", { providersConfig: storedChat })).toBeUndefined(); + expect(openaiCyberAccessProgram(CYBER_MODEL, { providersConfig: storedChat })).toBeUndefined(); }); test("is unavailable when Codex OAuth serves the request", () => { @@ -77,7 +93,7 @@ describe("openaiCyberAccessProgram", () => { ...providersConfig, openai: { ...enabledOpenAI, apiKeySet: false, codexOauthSet: true }, }; - expect(openaiCyberAccessProgram("gpt", { providersConfig: oauth })).toBeUndefined(); + expect(openaiCyberAccessProgram(CYBER_MODEL, { providersConfig: oauth })).toBeUndefined(); }); test.each([ diff --git a/src/common/utils/ai/cyberMode.ts b/src/common/utils/ai/cyberMode.ts index d9dd2437896..f6eb12c1568 100644 --- a/src/common/utils/ai/cyberMode.ts +++ b/src/common/utils/ai/cyberMode.ts @@ -4,12 +4,10 @@ * Cyber sends the Responses API `access_programs.cyber` field, which only the * direct OpenAI API accepts. Gateways, Codex OAuth, custom providers and Chat * Completions never receive it, and eligibility is the exact request model id - * OpenAI's Daybreak guide maps to a program (see - * KnownModelDefinition.cyberAccessProgram): no dated snapshots, mapped aliases + * OpenAI's Daybreak guide maps to a program: no dated snapshots, mapped aliases * or name patterns, because the API rejects a program the model does not take. */ -import { KNOWN_MODELS } from "@/common/constants/knownModels"; import type { OpenAICyberAccessProgram } from "@/common/types/openaiAccessPrograms"; import { normalizeToCanonical, resolveModelAlias } from "@/common/utils/ai/models"; import { @@ -18,13 +16,22 @@ import { } from "@/common/utils/ai/openaiProviderOptionsAvailability"; import type { ProModeAvailabilityOptions } from "@/common/utils/ai/proMode"; -const CYBER_ACCESS_PROGRAM_BY_MODEL_ID = new Map( - Object.values(KNOWN_MODELS).flatMap((model) => - model.provider === "openai" && model.cyberAccessProgram != null - ? [[model.id, model.cyberAccessProgram] as const] - : [] - ) -); +/** + * The `access_programs.cyber` value per request model id, from the model table of + * https://developers.openai.com/api/docs/guides/daybreak (retrieved 2026-11-17). + * The value follows the model, not the organization's approval level: OpenAI + * requires Daybreak Red approval for reduced refusals on these two, yet both + * reject `daybreak_red`. The guide does not list GPT-6 Luna or GPT-6.2 Astra/Sol, + * so Cyber is unavailable for them (and for the aliases on GPT-6.2); their + * requests omit the field, which the guide says selects standard safeguards for + * models released from gpt-6.1-terra on. GPT-6 Sol is listed but no longer a Xum + * model. Daybreak aliases and gpt-5.6-cyber accept only one program, which the + * API already selects when the field is omitted. + */ +const CYBER_ACCESS_PROGRAM_BY_MODEL_ID: ReadonlyMap = new Map([ + ["openai:gpt-6-astra", "daybreak_blue"], + ["openai:gpt-6.1-sol", "daybreak_blue"], +]); /** The `access_programs.cyber` value Cyber mode sends, or undefined when Cyber is unavailable. */ export function openaiCyberAccessProgram( diff --git a/src/common/utils/ai/openaiProviderOptionsAvailability.ts b/src/common/utils/ai/openaiProviderOptionsAvailability.ts index 52927b425a7..9e6f92d78c0 100644 --- a/src/common/utils/ai/openaiProviderOptionsAvailability.ts +++ b/src/common/utils/ai/openaiProviderOptionsAvailability.ts @@ -12,7 +12,7 @@ import { resolveCoderWireCanonicalModel } from "@/common/constants/coderOAuth"; import { resolveCoderGatewayMetadataModel } from "@/common/utils/providers/coderGatewayMetadata"; import { isCustomProviderConfig } from "@/common/utils/providers/customProviders"; import { resolveModelForMetadata } from "@/common/utils/providers/modelEntries"; -import { isGpt61SolModel, isGpt6AstraModel } from "@/common/types/thinking"; +import { openaiGptTier } from "@/common/types/thinking"; export interface OpenAIDirectProviderOptionsAvailability { /** Settings-resolved route for the canonical model ("direct" = no gateway). */ @@ -62,28 +62,33 @@ export function resolveProviderOptionsRoute( } /** - * Whether the model accepts the given OpenAI service tier. Every tier but - * Ultrafast is route-gated only (see openaiServiceTierAvailable). + * Whether the model accepts the given OpenAI service tier. Other tiers are + * route-gated only (see openaiServiceTierAvailable). * - * Ultrafast (`service_tier: "ultrafast"`, launched at DevDay 2026-09-29, billed - * at 6x Standard) is model-gated: among the supported models OpenAI serves it - * for GPT-6 Astra and, since 2026-10-08, GPT-6.1 Sol (GPT-5.6 Sol preview access - * is no longer supported). Callers drop the tier for other models (Standard or - * the project default) instead of switching to Fast, which is a different paid - * tier. Ultrafast is also Responses-only: the Chat Completions service_tier enum - * has no "ultrafast" and rejects it with a 400 (see ultrafastWireAccepted). - * https://developers.openai.com/api/docs/guides/ultrafast-mode + * Ultrafast (`service_tier: "ultrafast"`, launched at DevDay 2026-09-29) is + * model-gated: among the supported models OpenAI serves it only for the GPT + * tiers OPENAI_GPT_TIERS marks (GPT-5.6 Sol preview access is no longer + * supported). Ultrafast is also Responses-only: the Chat Completions + * service_tier enum has no "ultrafast" and rejects it with a 400 (see + * ultrafastWireAccepted). https://developers.openai.com/api/docs/guides/ultrafast-mode + * + * Flex is dropped only for a GPT tier that OpenAI does not offer it on (GPT-6.2); + * other models, custom ids included, keep the route-only gate. + * + * Callers drop a refused tier (Standard or the project default) instead of + * switching to another paid tier. */ export function openaiModelSupportsServiceTier( modelString: string, serviceTier: string, options?: OpenAIDirectProviderOptionsAvailability ): boolean { - if (serviceTier !== "ultrafast") return true; - if (!ultrafastWireAccepted(modelString, options)) return false; + if (serviceTier !== "ultrafast" && serviceTier !== "flex") return true; + if (serviceTier === "ultrafast" && !ultrafastWireAccepted(modelString, options)) return false; // Resolve mapped aliases and Coder gateway identities to the upstream model. const capabilityModel = resolveModelForMetadata(modelString, options?.providersConfig ?? null); - return isGpt6AstraModel(capabilityModel) || isGpt61SolModel(capabilityModel); + const tier = openaiGptTier(capabilityModel); + return serviceTier === "ultrafast" ? tier?.ultrafast === true : tier?.flex !== false; } /** diff --git a/src/common/utils/ai/providerOptions.test.ts b/src/common/utils/ai/providerOptions.test.ts index 3aba28bb6e9..620991c4989 100644 --- a/src/common/utils/ai/providerOptions.test.ts +++ b/src/common/utils/ai/providerOptions.test.ts @@ -1705,6 +1705,8 @@ describe("buildProviderOptions - OpenAI", () => { ["openai:gpt-6-astra", "ultrafast"], ["openai:gpt-6.1-sol", "ultrafast"], ["openai:gpt-6.1-sol-2026-09-29", "ultrafast"], + ["openai:gpt-6.2-astra", "ultrafast"], + ["openai:gpt-6.2-sol", "ultrafast"], // GPT-5.6 Sol preview access is no longer supported, so the tier is dropped. ["openai:gpt-5.6-sol", undefined], ["openai:gpt-5.6", undefined], @@ -1730,6 +1732,46 @@ describe("buildProviderOptions - OpenAI", () => { expect(openai?.serviceTier).toBeUndefined(); }); + // GPT-6.2 is missing from the Flex pricing table; custom ids keep the route-only gate. + test.each([ + ["openai:gpt-6.2-sol", undefined], + ["openai:gpt-6.2-astra", undefined], + ["openrouter:openai/gpt-6.2-sol", undefined], + ["openrouter:openai/gpt-6.1-sol", "flex"], + ["openai:gpt-6.1-sol", "flex"], + ["openai:gpt-6-astra", "flex"], + ["openai:some-custom-model", "flex"], + ] as const)("gates the Flex tier by model: %s -> %s", (model, expected) => { + const result = buildProviderOptions(model, "medium", undefined, undefined, { + openai: { serviceTier: "flex" }, + }); + expect(getOpenAIOptions(result)?.serviceTier).toBe(expected); + }); + + test("drops Flex for a mapped alias of GPT-6.2", () => { + const openai = getOpenAIOptions( + buildProviderOptions( + "openai:team-sol", + "medium", + undefined, + undefined, + { openai: { serviceTier: "flex" } }, + undefined, + undefined, + { + openai: { + apiKeySet: true, + isEnabled: true, + isConfigured: true, + models: [{ id: "team-sol", mappedToModel: "openai:gpt-6.2-sol" }], + }, + }, + "openai" + ) + ); + expect(openai?.serviceTier).toBeUndefined(); + }); + test("resolves Ultrafast support through a mapped alias", () => { const openai = getOpenAIOptions( buildProviderOptions( diff --git a/src/common/utils/ai/providerOptions.ts b/src/common/utils/ai/providerOptions.ts index fa17c16677d..31184972ebd 100644 --- a/src/common/utils/ai/providerOptions.ts +++ b/src/common/utils/ai/providerOptions.ts @@ -795,7 +795,7 @@ export function buildProviderOptions( : (routeProvider ?? origin); // Fast mode follows the actual route/wire, not capability aliases or thinking. - // Ultrafast is additionally model-gated; unsupported models drop the tier. + // Ultrafast (and Flex on GPT-6.2) is additionally model-gated; unsupported models drop the tier. const requestedServiceTier = muxProviderOptions?.openai?.serviceTier; const serviceTierRouteOptions = { providersConfig, @@ -939,7 +939,7 @@ export function buildProviderOptions( // effort; other OpenAI models keep the max -> "xhigh" downgrade. Use // capabilityModel so mapped aliases (mappedToModel) inherit their target's // native effort. GPT-6 Luna and GPT-5.6 "off" must be explicit "none" because - // omission defaults to medium; Astra and GPT-6.1 Sol instead clamp "off" to "low". + // omission defaults to medium; the other GPT-6 tiers instead clamp "off" to "low". // Xum always sends the latest conversation history explicitly. OpenAI's // previous_response_id is an alternative state-management path, not an additive one. diff --git a/src/common/utils/ai/selectableModels.test.ts b/src/common/utils/ai/selectableModels.test.ts index 3fe5401aa6d..845a693baa5 100644 --- a/src/common/utils/ai/selectableModels.test.ts +++ b/src/common/utils/ai/selectableModels.test.ts @@ -176,9 +176,11 @@ describe("computeSelectableModels", () => { describe("authoritative catalogs", () => { test("coder gates gateway routing on discoveredModels and honors removedModels", () => { - // Follow the moving `gpt` alias so the catalog keeps listing the routed built-in. + // Follow the moving `gpt` and `astra` aliases so the catalog keeps listing the + // routed built-ins. const gptSlug = `openai/${KNOWN_MODELS.GPT.providerModelId}`; - const catalog = [gptSlug, "openai/gpt-6-astra"]; + const astraSlug = `openai/${KNOWN_MODELS.GPT_6_ASTRA.providerModelId}`; + const catalog = [gptSlug, astraSlug]; const base = { apiKeySet: false, isEnabled: true, isConfigured: true }; // Unknown catalog (discovery pending): permissive, every routable openai built-in shows. @@ -187,7 +189,7 @@ describe("computeSelectableModels", () => { providersConfig: { coder: { ...base, models: catalog } }, routePriority: ["coder"], }) - ).toEqual([`coder:${gptSlug}`, "coder:openai/gpt-6-astra", ...ANTHROPIC, ...OPENAI]); + ).toEqual([`coder:${gptSlug}`, `coder:${astraSlug}`, ...ANTHROPIC, ...OPENAI]); // Known catalog: only listed models route through coder. expect( @@ -197,7 +199,7 @@ describe("computeSelectableModels", () => { }) ).toEqual([ `coder:${gptSlug}`, - "coder:openai/gpt-6-astra", + `coder:${astraSlug}`, KNOWN_MODELS.GPT.id, KNOWN_MODELS.GPT_6_ASTRA.id, ]); @@ -210,7 +212,7 @@ describe("computeSelectableModels", () => { ...base, models: catalog, discoveredModels: catalog, - removedModels: ["openai/gpt-6-astra"], + removedModels: [astraSlug], }, }, routePriority: ["coder"], diff --git a/src/common/utils/compaction/contextLimit.test.ts b/src/common/utils/compaction/contextLimit.test.ts index b881e7b843f..0af9c4343fa 100644 --- a/src/common/utils/compaction/contextLimit.test.ts +++ b/src/common/utils/compaction/contextLimit.test.ts @@ -18,13 +18,16 @@ function providersWithOpenAI(overrides: Partial): ProvidersC } describe("getEffectiveContextLimit", () => { - test.each(["gpt-6.1-sol", "gpt-6-luna"])("reserves output capacity for %s", (model) => { - for (const id of [`openai:${model}`, `coder:openai/${model}`]) { - expect(getEffectiveContextLimit(id, false, null)).toBe(922000); - expect(getEffectiveContextLimit(id, true, null)).toBe(922000); - expect(getModelStats(id)?.max_output_tokens).toBe(128000); + test.each(["gpt-6.2-sol", "gpt-6.2-astra", "gpt-6.1-sol", "gpt-6-luna"])( + "reserves output capacity for %s", + (model) => { + for (const id of [`openai:${model}`, `coder:openai/${model}`]) { + expect(getEffectiveContextLimit(id, false, null)).toBe(922000); + expect(getEffectiveContextLimit(id, true, null)).toBe(922000); + expect(getModelStats(id)?.max_output_tokens).toBe(128000); + } } - }); + ); test("uses mapped model metadata for context limits", () => { const config: ProvidersConfigMap = { @@ -105,8 +108,11 @@ describe("getEffectiveContextLimit", () => { expect(limit).toBe(272_000); }); - test("caps GPT-6.1 Sol and GPT-6 Luna at each tier's Codex OAuth context window", () => { + test("caps each GPT tier at its Codex OAuth context window", () => { const contextLimits = { + // GPT-6.2: assumed from the other GPT-6 rows until the Codex catalog lists it. + "gpt-6.2-sol": 272_000, + "gpt-6.2-astra": 272_000, "gpt-6.1-sol": 272_000, "gpt-6-luna": 272_000, } as const; diff --git a/src/common/utils/thinking/policy.test.ts b/src/common/utils/thinking/policy.test.ts index cb790ef9757..707c884500f 100644 --- a/src/common/utils/thinking/policy.test.ts +++ b/src/common/utils/thinking/policy.test.ts @@ -1,5 +1,6 @@ import { describe, expect, test } from "bun:test"; import type { ProvidersConfigMap } from "@/common/orpc/types"; +import { KNOWN_MODELS } from "@/common/constants/knownModels"; import { getThinkingOptionLabel, type ThinkingLevel } from "@/common/types/thinking"; import { getThinkingPolicyForModel, @@ -108,9 +109,18 @@ describe("getThinkingPolicyForModel", () => { expect(enforceThinkingPolicy("openai:gpt-6-astra", "off")).toBe("low"); }); - test("gpt-6.1-sol follows Astra: 5 levels (no off), off and unset clamp to low", () => { + // GPT-6.2 model pages: "The API rejects requests that set reasoning effort to `none`." + test("gpt-6.1-sol, GPT-6.2 and their aliases follow Astra: 5 levels (no off), off and unset clamp to low", () => { const fiveLevels: ThinkingLevel[] = ["low", "medium", "high", "xhigh", "max"]; - for (const id of ["openai:gpt-6.1-sol", "coder:openai/gpt-6.1-sol"]) { + for (const id of [ + "openai:gpt-6.1-sol", + "coder:openai/gpt-6.1-sol", + "openai:gpt-6.2-sol", + "openai:gpt-6.2-astra", + "openrouter:openai/gpt-6.2-sol-2026-11-17", + KNOWN_MODELS.GPT.id, + KNOWN_MODELS.GPT_6_ASTRA.id, + ]) { expect(getThinkingPolicyForModel(id)).toEqual(fiveLevels); expect(enforceThinkingPolicy(id, "off")).toBe("low"); expect(resolveEffectiveThinkingLevel(id, undefined)).toBe("low"); diff --git a/src/common/utils/thinking/policy.ts b/src/common/utils/thinking/policy.ts index 54900fcc4c2..a456013ec94 100644 --- a/src/common/utils/thinking/policy.ts +++ b/src/common/utils/thinking/policy.ts @@ -92,8 +92,9 @@ function isGeminiLowMediumHighModelName(modelName: string): boolean { * Returns the thinking policy for a given model. * * Rules: - * - openai:gpt-6-astra / openai:gpt-6.1-sol → ["low", "medium", "high", "xhigh", "max"] - * (native max; the API rejects "none", so reasoning cannot be disabled) + * - openai:gpt-6.2-astra / gpt-6.2-sol / gpt-6-astra / gpt-6.1-sol → ["low", "medium", + * "high", "xhigh", "max"] (native max; the API rejects "none", so reasoning cannot be + * disabled) * - openai:gpt-6-luna → ["off", "low", "medium", "high", "xhigh", "max"] (6 levels) * - openai:gpt-5.6 / -sol / -terra / -luna → ["off", "low", "medium", "high", "xhigh", "max"] * - Gemini 3.8 Flash / Gemini 4 Argon / Carbon → ["low", "medium", "high"] (no minimal, so no "off") @@ -108,7 +109,7 @@ function isGeminiLowMediumHighModelName(modelName: string): boolean { * Does NOT match unannounced variants like gpt-6-astra-mini. * * Pass `providersConfig` so configured aliases (`mappedToModel`, e.g. - * `openai:team-sol` -> `openai:gpt-6.1-sol`) resolve to their capability model + * `openai:team-sol` -> `openai:gpt-6.2-sol`) resolve to their capability model * before rule matching — matching how `buildProviderOptions` / * `openaiProModeAvailable` detect capabilities. Without it, mapped aliases fall * through to the default 4-level policy and clamping strips levels (e.g. native diff --git a/src/common/utils/tokens/displayUsage.test.ts b/src/common/utils/tokens/displayUsage.test.ts index db3d6ef6db0..7871459ffd2 100644 --- a/src/common/utils/tokens/displayUsage.test.ts +++ b/src/common/utils/tokens/displayUsage.test.ts @@ -230,7 +230,13 @@ describe("createDisplayUsage", () => { }); describe("tiered long-context pricing", () => { + // Standard $/1M input, cached input and output as published on each model page, e.g. + // https://developers.openai.com/api/docs/models/gpt-6.2-astra (retrieved 2026-11-17): + // 30-minute cache writes at 1.25x input; above 272K input, input and cache rates + // double and output costs 1.5x for the full request. test.each([ + ["openai:gpt-6.2-sol", 2, 0.1, 10], + ["openai:gpt-6.2-astra", 8, 0.4, 40], ["openai:gpt-6.1-sol", 2, 0.1, 10], ["openai:gpt-6-luna", 0.1, 0.01, 0.5], ] as const)( @@ -1038,6 +1044,20 @@ describe("OpenAI service-tier pricing (#4352)", () => { } }); + // https://developers.openai.com/api/docs/models/gpt-6.2-sol: "Fast mode costs twice the + // Standard rate for the same context length"; Ultrafast is 3x through 2027-02-28 and 6x + // after. Xum prices the 6x list rate (never under-count), and GPT-6.2 has no Flex rate. + test("prices GPT-6.2 Fast at 2x and Ultrafast at 6x in both bands, Flex at Standard", () => { + for (const model of ["openai:gpt-6.2-sol", "openai:gpt-6.2-astra"]) { + for (const inputTokens of [100_000, 300_000]) { + const standard = cost(model, inputTokens); + expect(cost(model, inputTokens, "priority")).toBeCloseTo(2 * standard, 9); + expect(cost(model, inputTokens, "ultrafast")).toBeCloseTo(6 * standard, 9); + expect(cost(model, inputTokens, "flex")).toBe(standard); + } + } + }); + test("keeps included costs at zero whatever tier was reported", () => { const usage = createDisplayUsage( { inputTokens: 100_000, outputTokens: 1_000 }, diff --git a/src/common/utils/tokens/modelStats.test.ts b/src/common/utils/tokens/modelStats.test.ts index 3fa2ba66720..40e97783f0a 100644 --- a/src/common/utils/tokens/modelStats.test.ts +++ b/src/common/utils/tokens/modelStats.test.ts @@ -113,12 +113,20 @@ describe("getModelStats", () => { } ); - test("resolves GPT-6 Astra by alias, dated snapshot, and gateway prefix", () => { + test("resolves GPT-6.2 Astra by alias, dated snapshot, and gateway prefix", () => { const astra = expectStats(KNOWN_MODELS.GPT_6_ASTRA.id); - expect(expectStats("openai:gpt-6-astra-2026-09-30")).toEqual(astra); - expect(expectStats("coder:openai/gpt-6-astra")).toEqual(astra); + expect(expectStats("openai:gpt-6.2-astra-2026-11-17")).toEqual(astra); + expect(expectStats("coder:openai/gpt-6.2-astra")).toEqual(astra); // OpenAI has published no Astra variants; do not resolve unknown ids to it. - expect(getModelStats("openai:gpt-6-astra-mini")).toBeNull(); + expect(getModelStats("openai:gpt-6.2-astra-mini")).toBeNull(); + }); + + // The aliases moved to GPT-6.2; the ids they left keep their own metadata. + test("keeps GPT-6 Astra and GPT-6.1 Sol resolvable as custom model strings", () => { + expect(expectStats("openai:gpt-6-astra-2026-09-30")).toEqual(expectStats("openai:gpt-6-astra")); + // GPT-6 Astra keeps its own $10/M input, not GPT-6.2 Astra's $8/M. + expect(expectStats("coder:openai/gpt-6-astra").input_cost_per_token).toBe(0.00001); + expect(expectStats("openai:gpt-6.1-sol").input_cost_per_token).toBe(0.000002); }); test("resolves Gemini 3.8 Flash with the billed introductory pricing and limits", () => { diff --git a/src/common/utils/tokens/models-extra.ts b/src/common/utils/tokens/models-extra.ts index 81101365072..183c7fbe4f9 100644 --- a/src/common/utils/tokens/models-extra.ts +++ b/src/common/utils/tokens/models-extra.ts @@ -473,6 +473,52 @@ export const modelsExtra: Record = { // GPT-6 tiers: the 1.05M total window accepts at most 922K input tokens. Above // 272K input, the full request costs 2x input/cache and 1.5x output. + // GPT-6.2 Sol and Astra - Released November 17, 2026. Cache writes are the + // 30-minute rate (1.25x input); Xum does not request 12-hour retention. Like + // GPT-6.1 Sol, reasoning cannot be disabled and Chat Completions has no tool + // calling, so supports_function_calling holds for the default Responses wire + // format only. + // Ref: https://developers.openai.com/api/docs/models/gpt-6.2-sol + // Ref: https://developers.openai.com/api/docs/models/gpt-6.2-astra + "gpt-6.2-sol": { + max_input_tokens: 922000, + max_output_tokens: 128000, + input_cost_per_token: 0.000002, // $2 per million input tokens (<272K prompt tokens) + input_cost_per_token_above_272k_tokens: 0.000004, // $4 per million input tokens (>272K) + output_cost_per_token: 0.00001, // $10 per million output tokens (<272K prompt tokens) + output_cost_per_token_above_272k_tokens: 0.000015, // $15 per million output tokens (>272K) + cache_read_input_token_cost: 0.0000001, // $0.10 per million cached input tokens (<272K) + cache_read_input_token_cost_above_272k_tokens: 0.0000002, // $0.20 per million cached input tokens (>272K) + cache_creation_input_token_cost: 0.0000025, // $2.50 per million tokens (1.25x input) + cache_creation_input_token_cost_above_272k_tokens: 0.000005, // $5 per million tokens (1.25x long-context input) + litellm_provider: "openai", + mode: "chat", + supports_function_calling: true, + supports_vision: true, + supports_reasoning: true, + supports_response_schema: true, + knowledge_cutoff: "2026-06-01", + }, + "gpt-6.2-astra": { + max_input_tokens: 922000, + max_output_tokens: 128000, + input_cost_per_token: 0.000008, // $8 per million input tokens (<272K prompt tokens) + input_cost_per_token_above_272k_tokens: 0.000016, // $16 per million input tokens (>272K) + output_cost_per_token: 0.00004, // $40 per million output tokens (<272K prompt tokens) + output_cost_per_token_above_272k_tokens: 0.00006, // $60 per million output tokens (>272K) + cache_read_input_token_cost: 0.0000004, // $0.40 per million cached input tokens (<272K) + cache_read_input_token_cost_above_272k_tokens: 0.0000008, // $0.80 per million cached input tokens (>272K) + cache_creation_input_token_cost: 0.00001, // $10 per million tokens (1.25x input) + cache_creation_input_token_cost_above_272k_tokens: 0.00002, // $20 per million tokens (1.25x long-context input) + litellm_provider: "openai", + mode: "chat", + supports_function_calling: true, + supports_vision: true, + supports_reasoning: true, + supports_response_schema: true, + knowledge_cutoff: "2026-05-18", + }, + // GPT-6.1 Sol - Released September 29, 2026: $2/M input, $10/M output, cached // input 5% of input ($0.10/M). Like Astra, reasoning cannot be disabled and Chat // Completions has no tool calling, so supports_function_calling holds for the diff --git a/src/common/utils/tokens/serviceTierPricing.ts b/src/common/utils/tokens/serviceTierPricing.ts index 84e1b7fbf51..b788ccbc1c5 100644 --- a/src/common/utils/tokens/serviceTierPricing.ts +++ b/src/common/utils/tokens/serviceTierPricing.ts @@ -122,6 +122,11 @@ const fastShortOnly = (factor: number): TierFactor => ({ factor, longContext: fa * announced 2026-10-08 at $12 input / $60 output, also 6x). This factor also * prices models whose Ultrafast rate is not published instead of the lower * highest-published fallback, keeping the budget rule's "never under-count" promise. + * + * GPT-6.2 Astra and Sol list 6x from 2027-03-01 but 3x through 2027-02-28 + * (Pacific). Xum prices them at the 6x list factor rather than adding + * date-dependent pricing, so it over-counts their Ultrafast cost 2x until then. + * https://developers.openai.com/api/docs/models/gpt-6.2-sol */ const ULTRAFAST_SIX_BOTH_BANDS: TierFactor = { factor: 6, longContext: true }; @@ -148,6 +153,9 @@ const SERVICE_TIER_FACTORS: Readonly< ultrafast: ULTRAFAST_SIX_BOTH_BANDS, }, "gpt-6-luna": { flex: HALF_BOTH_BANDS, fast: DOUBLE_BOTH_BANDS }, + // No Flex: the GPT-6.2 tiers are missing from the pricing page's Flex table. + "gpt-6.2-astra": { fast: DOUBLE_BOTH_BANDS, ultrafast: ULTRAFAST_SIX_BOTH_BANDS }, + "gpt-6.2-sol": { fast: DOUBLE_BOTH_BANDS, ultrafast: ULTRAFAST_SIX_BOTH_BANDS }, // Unsupported older models stay here: they remain routable as custom/persisted // strings and LiteLLM still prices their Standard rates, so dropping the factor // would bill a reported Fast/Flex response at Standard (under-counting budgets). diff --git a/src/node/services/agentSkills/builtInSkillContent.generated.ts b/src/node/services/agentSkills/builtInSkillContent.generated.ts index 421da331ee9..beff3f85576 100644 --- a/src/node/services/agentSkills/builtInSkillContent.generated.ts +++ b/src/node/services/agentSkills/builtInSkillContent.generated.ts @@ -5374,9 +5374,9 @@ export const BUILTIN_SKILL_FILES: Record> = { "| Opus 5.5 | anthropic:claude-opus-5-5 | `opus` | ✓ |", "| Sonnet 5.5 | anthropic:claude-sonnet-5-5 | `sonnet` | |", "| Haiku 5.5 | anthropic:claude-haiku-5-5 | `haiku` | |", - "| GPT-6.1 Sol | openai:gpt-6.1-sol | `gpt`, `sol` | |", + "| GPT-6.2 Sol | openai:gpt-6.2-sol | `gpt`, `sol` | |", "| GPT-6 Luna | openai:gpt-6-luna | `luna` | |", - "| GPT-6 Astra | openai:gpt-6-astra | `astra`, `gpt-6-astra` | |", + "| GPT-6.2 Astra | openai:gpt-6.2-astra | `astra`, `gpt-6.2-astra` | |", "| Gemini 3.1 Pro Preview | google:gemini-3.1-pro-preview | `gemini`, `gemini-pro` | |", "| Gemini 3.8 Flash | google:gemini-3.8-flash | `gemini-flash` | |", "| Gemini 4 Argon | google:gemini-4-argon | `argon`, `gemini-argon`, `gemini-4` | |", @@ -5390,21 +5390,23 @@ export const BUILTIN_SKILL_FILES: Record> = { "", "{/* END KNOWN_MODELS_TABLE */}", "", - "Xum supports the GPT-6 tiers (GPT-6.1 Sol, GPT-6 Astra, and GPT-6 Luna); older OpenAI GPT models are no longer supported.", + "Xum supports the GPT-6 tiers (GPT-6.2 Sol, GPT-6.2 Astra, and GPT-6 Luna); older OpenAI GPT models are no longer supported. GPT-6.1 Sol and GPT-6 Astra stay usable as the custom model strings `openai:gpt-6.1-sol` and `openai:gpt-6-astra`.", "", "GPT-5.6 models added from **Settings → Models** (`gpt-5.6`, `gpt-5.6-sol`, `gpt-5.6-terra`, and `gpt-5.6-luna`) support thinking from off through max and Pro reasoning mode. Other older GPT models stay unsupported.", "", "GPT-6 Luna supports thinking from off through max on the default Responses API route. On the opt-in Chat Completions route, Xum disables its reasoning because OpenAI only supports function calling there with reasoning off.", "", - "GPT-6.1 Sol (the `gpt` and `sol` aliases) and GPT-6 Astra support thinking from low through max; OpenAI does not allow turning their reasoning off. Use the default Responses API route with them, because OpenAI does not support tool calling for these models on Chat Completions.", + "GPT-6.2 Sol (the `gpt` and `sol` aliases), GPT-6.2 Astra (the `astra` alias), GPT-6.1 Sol, and GPT-6 Astra support thinking from low through max; OpenAI does not allow turning their reasoning off. Use the default Responses API route with them, because OpenAI does not support tool calling for these models on Chat Completions.", "", "### OpenAI Ultrafast", "", - "To use OpenAI's fastest processing tier, turn on the thinking selector's **Ultrafast mode** row (it sits next to **Fast mode**), run **Toggle Ultrafast Mode** from the command palette, or use its keyboard shortcut. You can also choose **ultrafast** as the service tier in **Settings → Providers → OpenAI**. Fast and Ultrafast are mutually exclusive, and turning either off switches the chat to Standard. Like the thinking level, the choice is saved per chat and stays with the chat when you switch models; chats without a choice use the provider's service tier. Xum sends it only to models that OpenAI serves Ultrafast for: GPT-6.1 Sol and GPT-6 Astra. It also needs a route that sends OpenAI's own Responses API: direct OpenAI on the default wire format, Coder instances of type OpenAI, or custom OpenAI Responses providers. Direct OpenAI set to Chat Completions, Coder OpenAI-compatible instances, OpenRouter, and GitHub Copilot do not accept the tier. Elsewhere the request runs without a service tier instead of falling back to Fast. Ultrafast costs 6× the Standard price, and Xum's cost tracking uses that rate.", + "To use OpenAI's fastest processing tier, turn on the thinking selector's **Ultrafast mode** row (it sits next to **Fast mode**), run **Toggle Ultrafast Mode** from the command palette, or use its keyboard shortcut. You can also choose **ultrafast** as the service tier in **Settings → Providers → OpenAI**. Fast and Ultrafast are mutually exclusive, and turning either off switches the chat to Standard. Like the thinking level, the choice is saved per chat and stays with the chat when you switch models; chats without a choice use the provider's service tier. Xum sends it only to models that OpenAI serves Ultrafast for: GPT-6.2 Sol, GPT-6.2 Astra, GPT-6.1 Sol, and GPT-6 Astra. It also needs a route that sends OpenAI's own Responses API: direct OpenAI on the default wire format, Coder instances of type OpenAI, or custom OpenAI Responses providers. Direct OpenAI set to Chat Completions, Coder OpenAI-compatible instances, OpenRouter, and GitHub Copilot do not accept the tier. Elsewhere the request runs without a service tier instead of falling back to Fast. Ultrafast costs 6× the Standard price, and Xum's cost tracking uses that rate. OpenAI charges 3× for GPT-6.2 Sol and Astra through February 28, 2027, so until then Xum shows twice their real Ultrafast cost.", + "", + "OpenAI does not offer the Flex tier for GPT-6.2 Sol and Astra. If **Settings → Providers → OpenAI** sets the service tier to **flex**, their requests run at Standard instead.", "", "### Pro reasoning mode", "", - 'GPT-6.1 Sol, GPT-6 Astra, GPT-6 Luna, and the GPT-5.6 models added from **Settings → Models** support OpenAI\'s pro reasoning mode. Open the reasoning selector next to the model picker and enable **Pro mode** (or run "Toggle Pro Reasoning Mode" from the Command Palette) to send `reasoning.mode: "pro"` with each request. The setting is saved per workspace. Pro mode can consume more tokens and responses can take noticeably longer. Pro is available on supported direct OpenAI Responses API routes. Gateway routes, Chat Completions, and Codex OAuth use standard mode.', + 'The GPT-6 tiers (GPT-6.2 Sol, GPT-6.2 Astra, GPT-6.1 Sol, GPT-6 Astra, and GPT-6 Luna) and the GPT-5.6 models added from **Settings → Models** support OpenAI\'s pro reasoning mode. Open the reasoning selector next to the model picker and enable **Pro mode** (or run "Toggle Pro Reasoning Mode" from the Command Palette) to send `reasoning.mode: "pro"` with each request. The setting is saved per workspace. Pro mode can consume more tokens and responses can take noticeably longer. Pro is available on supported direct OpenAI Responses API routes. Gateway routes, Chat Completions, and Codex OAuth use standard mode.', "", "## Model Selection", "", @@ -5916,8 +5918,8 @@ export const BUILTIN_SKILL_FILES: Record> = { "| `responses` | Uses the OpenAI Responses API. This is the default and supports current OpenAI and Codex features. |", "| `chatCompletions` | Uses `/v1/chat/completions`. Use this for OpenAI-API-shaped gateways that do not expose `/v1/responses`, such as Azure Government endpoints. |", "", - "OpenAI documents that GPT-6 Astra only supports tool calling through the Responses API, so keep", - "`responses` when using that model.", + "OpenAI documents that GPT-6 Astra and the GPT-6.2 models only support tool calling through the", + "Responses API, so keep `responses` when using them.", "", "Set the format in **Settings → Providers → OpenAI → Wire format**, or in", "`~/.xum/providers.jsonc`:", @@ -5949,8 +5951,10 @@ export const BUILTIN_SKILL_FILES: Record> = { "", "Cyber appears only for models with a documented Daybreak value. GPT-6.1 Sol and GPT-6 Astra send", "`daybreak_blue`. OpenAI requires Daybreak Red approval for reduced refusals on these models, but", - "they still take `daybreak_blue`. Cyber works only with the built-in OpenAI provider's API key on", - "the `responses` wire format. A custom base URL on the built-in provider also receives the field.", + "they still take `daybreak_blue`. OpenAI's guide lists no value for GPT-6.2 Sol or Astra, so Cyber", + "does not appear for them or for the `gpt`, `sol`, and `astra` aliases; to use Cyber, pick", + "`openai:gpt-6.1-sol` or `openai:gpt-6-astra`. Cyber works only with the built-in OpenAI", + "provider's API key on the `responses` wire format. A custom base URL on the built-in provider also receives the field.", "Gateways, custom providers, Codex OAuth, and Chat Completions use standard safeguards.", "", "If OpenAI rejects the program, Xum shows OpenAI's message and does not retry:", diff --git a/src/node/services/aiService.test.ts b/src/node/services/aiService.test.ts index 6118f2a53ab..a99722e90b4 100644 --- a/src/node/services/aiService.test.ts +++ b/src/node/services/aiService.test.ts @@ -2715,7 +2715,8 @@ describe("AIService.streamMessage compaction boundary slicing", () => { it("preserves the chat speed across unsupported attempts and later live changes", async () => { using xumHome = new DisposableTempDir("ai-service-chat-speed-fallback"); const sourceModel = KNOWN_MODELS.SONNET.id; - const fallbackModel = KNOWN_MODELS.GPT.id; + // Luna, because the live change below picks Flex, which GPT-6.2 does not offer. + const fallbackModel = KNOWN_MODELS.GPT_6_LUNA.id; await writeMainConfig(xumHome.path, { modelFallbacks: { [sourceModel]: { models: [fallbackModel] } }, }); diff --git a/src/node/services/providerModelFactory.test.ts b/src/node/services/providerModelFactory.test.ts index 553ca738760..d62b1988293 100644 --- a/src/node/services/providerModelFactory.test.ts +++ b/src/node/services/providerModelFactory.test.ts @@ -1950,6 +1950,8 @@ describe("ProviderModelFactory native OpenAI alias tiers", () => { it.each([ ["gpt-6-astra", "responses", "ultrafast"], ["gpt-6.1-sol", "responses", "ultrafast"], + ["gpt-6.2-astra", "responses", "ultrafast"], + ["gpt-6.2-sol", "responses", "ultrafast"], // Ultrafast is model-gated: other models drop the tier instead of sending one // OpenAI rejects (and never fall back to the separately billed Fast tier). ["gpt-6-luna", "responses", undefined], @@ -1984,6 +1986,40 @@ describe("ProviderModelFactory native OpenAI alias tiers", () => { }); } ); + + // OpenAI's pricing page has no Flex row for GPT-6.2, so a configured Flex tier is + // dropped (Standard) for it; the ids the aliases left keep Flex. + it.each([ + ["gpt-6.2-sol", undefined], + ["gpt-6.2-astra", undefined], + ["gpt-6.2-sol-2026-11-17", undefined], + ["gpt-6.1-sol", "flex"], + ["gpt-6-astra", "flex"], + ["gpt-6-luna", "flex"], + ] as const)("sends the configured Flex tier for %s only when offered", async (model, tier) => { + await withTempConfig(async (_config, factory, _oauth, store) => { + store.saveProvidersConfig({ + openai: { + apiKey: "native-key", + baseUrl: "https://native.example.com/v1", + serviceTier: "flex", + }, + }); + const { calls, fakeFetch } = createCapturingFetch(); + const fetchSpy = spyOn(globalThis, "fetch").mockImplementation(fakeFetch); + try { + const result = await factory.createModel(`openai:${model}`); + if (!result.success) throw new Error(result.error.type); + await generateText({ model: result.data, prompt: "hello", maxRetries: 0 }).catch( + () => undefined + ); + expect(calls.length).toBe(1); + expect(parseSentBody(calls[0]).service_tier).toBe(tier); + } finally { + fetchSpy.mockRestore(); + } + }); + }); }); async function sendWithCyberKey( diff --git a/src/node/services/providerModelFactory.ts b/src/node/services/providerModelFactory.ts index 017ce4928ab..17f376f5794 100644 --- a/src/node/services/providerModelFactory.ts +++ b/src/node/services/providerModelFactory.ts @@ -652,7 +652,7 @@ function createOpenAIModelWithPreservedOptions( const model = createModel(baseFetch); // @ai-sdk/openai (through at least 4.0.72) allowlists GPT-6 reasoning efforts // without "none" and silently strips it, but Luna accepts "none" and OpenAI - // requires it for Chat Completions function calling (Astra and GPT-6.1 Sol + // requires it for Chat Completions function calling (the other GPT-6 tiers // genuinely reject it, and Xum never requests it there). Without this, Chat // agent turns fail and Responses "off" silently runs at the API default effort. This lives in Xum // runtime code rather than a bun patch because npm installs of the published @@ -2187,7 +2187,8 @@ export class ProviderModelFactory { if ( serviceTier.success && serviceTierAvailable && - // Ultrafast is model-gated: drop it rather than send a tier the model rejects. + // Ultrafast (and Flex on GPT-6.2) is model-gated: drop it rather than send a + // tier the model rejects. openaiModelSupportsServiceTier(modelString, serviceTier.data, serviceTierRouteOptions) ) { serviceTierDefault = { diff --git a/tests/ui/agents/thinkingSelector.test.ts b/tests/ui/agents/thinkingSelector.test.ts index 8418cb3bad1..3040ff7eb32 100644 --- a/tests/ui/agents/thinkingSelector.test.ts +++ b/tests/ui/agents/thinkingSelector.test.ts @@ -19,7 +19,7 @@ import { createAppHarness } from "../harness"; const describeIntegration = shouldRunIntegrationTests() ? describe : describe.skip; const SOL_MODEL = KNOWN_MODELS.GPT.id; -// Every supported GPT built-in (GPT-6 Astra/Luna, GPT-6.1 Sol) supports Pro mode, so the +// Every supported GPT built-in (GPT-6.2 Astra/Sol, GPT-6 Luna) supports Pro mode, so the // hidden case uses a custom direct OpenAI model that can still exercise the fast-mode row. const NON_PRO_PROVIDER_MODEL_ID = "some-custom-model"; const NON_PRO_MODEL = `openai:${NON_PRO_PROVIDER_MODEL_ID}`; From b2faad7d08303053da118cb53374bd1a125840c4 Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Tue, 17 Nov 2026 19:09:31 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A4=96=20tests:=20seed=20Google=20for?= =?UTF-8?q?=20the=20auto-compaction=20UI=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test relied on GPT-6 Astra's 1.05M input window to give OpenAI a model larger than the default Opus 5.5 (1M). GPT-6.2 Astra caps input at 922K, so with only OpenAI configured no built-in qualifies and the UI shows the manual /compact button instead. Seed Google (1,048,576) instead. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh`_ --- tests/ui/compaction/compaction.test.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/ui/compaction/compaction.test.ts b/tests/ui/compaction/compaction.test.ts index f63fe021179..94ca6f8624e 100644 --- a/tests/ui/compaction/compaction.test.ts +++ b/tests/ui/compaction/compaction.test.ts @@ -149,12 +149,13 @@ describe("Compaction UI (mock AI router)", () => { try { // The UI auto-compacts into the largest-context model of a configured provider (see // getHigherContextCompactionSuggestion), and a model qualifies only with a larger context - // than the default model's (OpenAI, Google, Moonshot AI, Meta and Z.ai each list one). + // than the default model's (Google, Moonshot AI, Meta and Z.ai each list one; no OpenAI + // built-in does since GPT-6.2 Astra's 922K input cap replaced GPT-6 Astra's 1.05M). // Without such a provider the UI does not auto-compact: it shows the manual "Insert /compact" // button, and this test waits for a summary that never comes. The mock router never calls // the provider, so a dummy key is enough. Seeding it here keeps the test independent of an - // ambient OPENAI_API_KEY. - await setupProviders(app.env, { openai: { apiKey: "test-key-for-ui-tests" } }); + // ambient provider key. + await setupProviders(app.env, { google: { apiKey: "test-key-for-ui-tests" } }); const triggerMessage = "Trigger context error"; const userDraft = "My draft message that should be preserved";