From 8e4f055d934a860e34527ae7c0c1f9dcabcbf464 Mon Sep 17 00:00:00 2001 From: Winston Chang Date: Wed, 18 Nov 2026 14:30:06 -0600 Subject: [PATCH] Add GPT-6.2 Sol and GPT-6.2 Astra --- memory-bank/aiConfig.md | 8 +++--- .../__tests__/infer.test.ts | 14 ++++++++++ .../bedrock-mantle-helpers.ts | 9 +++++-- .../model-capabilities/gpt6-model-profile.ts | 10 ++++--- .../__tests__/openai-provider.test.ts | 7 +++++ .../src/providers/openai-model-names.ts | 2 ++ .../src/providers/openai-provider.ts | 26 ++++++++++--------- 7 files changed, 54 insertions(+), 22 deletions(-) diff --git a/memory-bank/aiConfig.md b/memory-bank/aiConfig.md index c0dd00b..93ee324 100644 --- a/memory-bank/aiConfig.md +++ b/memory-bank/aiConfig.md @@ -664,9 +664,9 @@ limit or drops a thinking level fails requests until a row is added. (`getGpt6ModelProfile`, not exported from the package). It takes a canonical, unprefixed ID and owns the traits that hold on every endpoint: family, tools, image/PDF input, tool-result images, and reasoning levels — including which -models lack `off` (GPT-6 Astra and GPT-6.1 Sol, matched at a model-name boundary -for any accepted suffix; original Sol/Luna and unknown future GPT-6 IDs keep -`off`). `openai-helpers.ts` and `bedrock-mantle-helpers.ts` both consume it +models lack `off` (GPT-6 Astra, GPT-6.1 Sol, GPT-6.2 Sol, and GPT-6.2 Astra, +matched at a model-name boundary for any accepted suffix; original Sol/Luna, +6.1 Terra, and unknown future GPT-6 IDs keep `off`). `openai-helpers.ts` and `bedrock-mantle-helpers.ts` both consume it (Bedrock strips `openai.` first) and layer their own endpoint policy on top: token limits, protocol, web search. The profile must never carry limits, routes, or eligibility — a published OpenAI capacity is not an assumed @@ -699,7 +699,7 @@ Per-provider cases: known older GPT-5.4/5.5 IDs retain the prior 272K rule, and unknown future GPT-5.x IDs default to the 1M family window. GPT-6 uses Responses with the shared GPT-6 profile; only bare and dated IDs with a published AWS card - carry its limits (Astra and 6.1 Terra: 1.05M/128K; 6.1 Sol: 1M/131,072), + carry its limits (Astra, 6.1 Terra, 6.2 Sol, and 6.2 Astra: 1.05M/128K; 6.1 Sol: 1M/131,072), and other GPT-6 IDs get a 1M window with unknown output — so a suffixed Astra ID can inherit Astra's no-`off` rule without its limits. - `openai` → the OpenAI table, with `maxInputTokens` re-derived via diff --git a/packages/ai-config/src/model-capabilities/__tests__/infer.test.ts b/packages/ai-config/src/model-capabilities/__tests__/infer.test.ts index ef290a6..937412c 100644 --- a/packages/ai-config/src/model-capabilities/__tests__/infer.test.ts +++ b/packages/ai-config/src/model-capabilities/__tests__/infer.test.ts @@ -113,6 +113,20 @@ describe("inferModelCapabilities", () => { } }); + it("omits off but allows max for GPT-6.2 Sol and Astra on OpenAI and Bedrock", () => { + for (const name of ["gpt-6.2-sol", "gpt-6.2-astra"]) { + for (const [providerId, modelId] of [ + ["openai", name], + ["bedrock", `openai.${name}`], + ]) { + const facts = inferModelCapabilities(providerId, modelId).facts; + expect(facts.thinkingEffortLevels).toEqual(["low", "medium", "high", "xhigh", "max"]); + expect(facts.maxContextLength).toBe(1_050_000); + expect(facts.maxOutputTokens).toBe(128_000); + } + } + }); + it("keeps provider-owned GPT-6 capacities while sharing reasoning levels", () => { const openai = inferModelCapabilities("openai", "gpt-6.1-sol"); const bedrock = inferModelCapabilities("bedrock", "openai.gpt-6.1-sol"); diff --git a/packages/ai-config/src/model-capabilities/bedrock-mantle-helpers.ts b/packages/ai-config/src/model-capabilities/bedrock-mantle-helpers.ts index 575b0d8..eaf1179 100644 --- a/packages/ai-config/src/model-capabilities/bedrock-mantle-helpers.ts +++ b/packages/ai-config/src/model-capabilities/bedrock-mantle-helpers.ts @@ -12,12 +12,15 @@ const IMAGE_MEDIA_TYPES = ["image/png", "image/jpeg", "image/gif", "image/webp", const DATED_SNAPSHOT_SUFFIX = /-\d{4}-\d{2}-\d{2}$/; // Limits published on each model's AWS card, keyed by undated model name. -// Sources verified 2026-09-22 (Astra) and 2026-10-27 (6.1 Terra, 6.1 Sol): +// Sources verified 2026-09-22 (Astra), 2026-10-27 (6.1 Terra, 6.1 Sol), and +// 2026-11-18 (6.2 Sol, 6.2 Astra): // https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-openai-gpt-6-astra.html // https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-openai-gpt-6-1-terra.html // https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-openai-gpt-6-1-sol.html +// https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-openai-gpt-6-2-sol.html +// https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-openai-gpt-6-2-astra.html // 6.1 Sol's card lists a 1M window and 131,072 output tokens, unlike the -// 1.05M / 128K of the other two. +// 1.05M / 128K of the others. const GPT6_PUBLISHED_LIMITS = new Map< string, Required> @@ -25,6 +28,8 @@ const GPT6_PUBLISHED_LIMITS = new Map< ["gpt-6-astra", { maxContextLength: 1_050_000, maxOutputTokens: 128_000 }], ["gpt-6.1-terra", { maxContextLength: 1_050_000, maxOutputTokens: 128_000 }], ["gpt-6.1-sol", { maxContextLength: 1_000_000, maxOutputTokens: 131_072 }], + ["gpt-6.2-sol", { maxContextLength: 1_050_000, maxOutputTokens: 128_000 }], + ["gpt-6.2-astra", { maxContextLength: 1_050_000, maxOutputTokens: 128_000 }], ]); /** diff --git a/packages/ai-config/src/model-capabilities/gpt6-model-profile.ts b/packages/ai-config/src/model-capabilities/gpt6-model-profile.ts index 493266f..7bacb36 100644 --- a/packages/ai-config/src/model-capabilities/gpt6-model-profile.ts +++ b/packages/ai-config/src/model-capabilities/gpt6-model-profile.ts @@ -24,13 +24,15 @@ export type Gpt6ModelProfile = Required< const GPT6_EFFORT_LEVELS = ["off", "low", "medium", "high", "xhigh", "max"]; // The product's "off" maps onto OpenAI's "none" effort (the OpenAI client // omits reasoning_effort; Bedrock Mantle sends the wire value "none"). -// Sources verified 2026-09-22 (Astra) and 2026-09-30 (6.1 Sol): +// Sources verified 2026-09-22 (Astra), 2026-09-30 (6.1 Sol), 2026-11-18 (6.2): // https://developers.openai.com/api/docs/models/gpt-6-astra // https://developers.openai.com/api/docs/models/gpt-6.1-sol -// Neither model offers "none", so the product must not offer "off". This is a -// model property, so it applies to every accepted suffix of these names. +// https://developers.openai.com/api/docs/models/gpt-6.2-sol +// https://developers.openai.com/api/docs/models/gpt-6.2-astra +// None of these models offers "none", so the product must not offer "off". +// This is a model property, so it applies to every accepted suffix of these names. const GPT6_NO_OFF_EFFORT_LEVELS = ["low", "medium", "high", "xhigh", "max"]; -const GPT6_NO_OFF_MODEL = /^gpt-6(?:-astra|\.1-sol)(?:-|$)/; +const GPT6_NO_OFF_MODEL = /^gpt-6(?:-astra|\.1-sol|\.2-(?:sol|astra))(?:-|$)/; const IMAGE_MEDIA_TYPES = ["image/png", "image/jpeg", "image/gif", "image/webp", "application/pdf"]; /** diff --git a/packages/ai-provider-bridge/src/providers/__tests__/openai-provider.test.ts b/packages/ai-provider-bridge/src/providers/__tests__/openai-provider.test.ts index 9723598..d5d1049 100644 --- a/packages/ai-provider-bridge/src/providers/__tests__/openai-provider.test.ts +++ b/packages/ai-provider-bridge/src/providers/__tests__/openai-provider.test.ts @@ -98,9 +98,16 @@ describe("OpenAI model discovery", () => { "gpt-6-sol", "gpt-6.1-sol", "gpt-6.1-terra", + "gpt-6.2-sol", + "gpt-6.2-astra", "gpt-6-luna", ]), ); + expect(models.find((model) => model.id === "gpt-6.2-sol")).toMatchObject({ + name: "GPT-6.2 Sol", + thinkingEffortLevels: ["low", "medium", "high", "xhigh", "max"], + }); + expect(models.find((model) => model.id === "gpt-6.2-astra")?.name).toBe("GPT-6.2 Astra"); expect(models.find((model) => model.id === "gpt-6.1-terra")).toMatchObject({ name: "GPT-6.1 Terra", thinkingEffortLevels: ["off", "low", "medium", "high", "xhigh", "max"], diff --git a/packages/ai-provider-bridge/src/providers/openai-model-names.ts b/packages/ai-provider-bridge/src/providers/openai-model-names.ts index 61c3dae..871f5ad 100644 --- a/packages/ai-provider-bridge/src/providers/openai-model-names.ts +++ b/packages/ai-provider-bridge/src/providers/openai-model-names.ts @@ -29,6 +29,8 @@ export const OPENAI_MODEL_NAMES: Record = { "gpt-6-sol": "GPT-6 Sol", "gpt-6.1-sol": "GPT-6.1 Sol", "gpt-6.1-terra": "GPT-6.1 Terra", + "gpt-6.2-sol": "GPT-6.2 Sol", + "gpt-6.2-astra": "GPT-6.2 Astra", "gpt-6-luna": "GPT-6 Luna", "gpt-5-mini": "GPT-5 Mini", "gpt-5-nano": "GPT-5 Nano", diff --git a/packages/ai-provider-bridge/src/providers/openai-provider.ts b/packages/ai-provider-bridge/src/providers/openai-provider.ts index ca2f15f..525bd50 100644 --- a/packages/ai-provider-bridge/src/providers/openai-provider.ts +++ b/packages/ai-provider-bridge/src/providers/openai-provider.ts @@ -29,17 +29,19 @@ const OPENAI_DEFAULT_CAPABILITIES = { // Static fallback models for Responses API - current as of September 2026 // Only includes models confirmed to support Responses API -const OPENAI_FALLBACK_ROWS = [ - { id: "gpt-6-astra", name: "GPT-6 Astra" }, - { id: "gpt-6-sol", name: "GPT-6 Sol" }, - { id: "gpt-6.1-sol", name: "GPT-6.1 Sol" }, - { id: "gpt-6.1-terra", name: "GPT-6.1 Terra" }, - { id: "gpt-6-luna", name: "GPT-6 Luna" }, - { id: "gpt-5.4", name: "GPT-5.4" }, - { id: "gpt-5.4-mini", name: "GPT-5.4 Mini" }, - { id: "gpt-5.4-nano", name: "GPT-5.4 Nano" }, - { id: "gpt-5.4-pro", name: "GPT-5.4 Pro" }, - { id: "gpt-5-chat-latest", name: "GPT-5 Chat Latest" }, +const OPENAI_FALLBACK_IDS = [ + "gpt-6-astra", + "gpt-6-sol", + "gpt-6.1-sol", + "gpt-6.1-terra", + "gpt-6.2-sol", + "gpt-6.2-astra", + "gpt-6-luna", + "gpt-5.4", + "gpt-5.4-mini", + "gpt-5.4-nano", + "gpt-5.4-pro", + "gpt-5-chat-latest", ]; function buildOpenAIModel(providerId: ResolvedProviderId, id: string, name: string): ModelInfo { @@ -106,7 +108,7 @@ function createOpenAIModelFetcher( ); }, fallbackModels: includeHostedModels - ? OPENAI_FALLBACK_ROWS.map(({ id, name }) => buildOpenAIModel(providerId, id, name)) + ? OPENAI_FALLBACK_IDS.map((id) => buildOpenAIModel(providerId, id, getOpenAIModelName(id))) : [], logger, });