diff --git a/.changeset/claude-opus-5-5.md b/.changeset/claude-opus-5-5.md new file mode 100644 index 0000000..92dd060 --- /dev/null +++ b/.changeset/claude-opus-5-5.md @@ -0,0 +1,7 @@ +--- +"@upstash/box": patch +"@upstash/box-cli": patch +--- + +Add Claude Opus 5.5 model constants and CLI options for Claude Code, OpenRouter, +Vercel AI Gateway, OpenCode/Zen, and Cursor. diff --git a/.changeset/gpt-6-sol-luna.md b/.changeset/gpt-6-sol-luna.md new file mode 100644 index 0000000..cfa257c --- /dev/null +++ b/.changeset/gpt-6-sol-luna.md @@ -0,0 +1,7 @@ +--- +"@upstash/box": patch +"@upstash/box-cli": patch +--- + +Add GPT-6 Sol and GPT-6 Luna model constants and CLI options for Codex, +OpenRouter, and OpenCode/Zen. diff --git a/.changeset/vercel-gateway-models.md b/.changeset/vercel-gateway-models.md new file mode 100644 index 0000000..106c33d --- /dev/null +++ b/.changeset/vercel-gateway-models.md @@ -0,0 +1,9 @@ +--- +"@upstash/box": patch +"@upstash/box-cli": patch +--- + +Fix Vercel AI Gateway Grok model identifiers: the gateway moved xAI models from +the `xai/` to the `spacexai/` namespace, so `VercelModel.Grok_*` now resolve +again. Add `VercelModel.Grok_4_7`, `GPT_6_Sol`, `GPT_6_Luna`, and +`Gemini_3_8_Flash`, with matching CLI picker options. diff --git a/packages/cli/src/__tests__/models.test.ts b/packages/cli/src/__tests__/models.test.ts index 092372b..87a27cf 100644 --- a/packages/cli/src/__tests__/models.test.ts +++ b/packages/cli/src/__tests__/models.test.ts @@ -3,6 +3,7 @@ import { Agent, ClaudeCode, CursorModel, + OpenAICodex, OpenCodeModel, OpenRouterModel, VercelModel, @@ -10,6 +11,28 @@ import { import { MODEL_OPTIONS_BY_AGENT } from "../models.js"; describe("MODEL_OPTIONS_BY_AGENT", () => { + it.each([ + [Agent.ClaudeCode, "Anthropic", ClaudeCode.Opus_5_5, "Claude Opus 5.5"], + [Agent.ClaudeCode, "OpenRouter", OpenRouterModel.Claude_Opus_5_5, "Claude Opus 5.5 (OR)"], + [ + Agent.ClaudeCode, + "Vercel AI Gateway", + VercelModel.Claude_Opus_5_5, + "Claude Opus 5.5 (Vercel)", + ], + [Agent.Codex, "OpenRouter", OpenRouterModel.Claude_Opus_5_5, "Claude Opus 5.5 (OR)"], + [Agent.Codex, "Vercel AI Gateway", VercelModel.Claude_Opus_5_5, "Claude Opus 5.5 (Vercel)"], + [Agent.OpenCode, "OpenCode — Paid", OpenCodeModel.Zen_Claude_Opus_5_5, "Claude Opus 5.5"], + [Agent.OpenCode, "Anthropic", OpenCodeModel.Claude_Opus_5_5, "Claude Opus 5.5"], + [Agent.OpenCode, "OpenRouter", OpenRouterModel.Claude_Opus_5_5, "Claude Opus 5.5 (OR)"], + [Agent.OpenCode, "Vercel AI Gateway", VercelModel.Claude_Opus_5_5, "Claude Opus 5.5 (Vercel)"], + [Agent.Cursor, "Cursor", CursorModel.Claude_Opus_5_5, "Claude Opus 5.5"], + ])("includes Claude Opus 5.5 for %s via %s", (agent, groupLabel, value, label) => { + const group = MODEL_OPTIONS_BY_AGENT[agent].find(({ label }) => label === groupLabel); + + expect(group?.options).toContainEqual({ value, label }); + }); + it.each([ [Agent.ClaudeCode, "Anthropic", ClaudeCode.Opus_5, "Claude Opus 5"], [Agent.ClaudeCode, "OpenRouter", OpenRouterModel.Claude_Opus_5, "Claude Opus 5 (OR)"], @@ -27,6 +50,31 @@ describe("MODEL_OPTIONS_BY_AGENT", () => { expect(group?.options).toContainEqual({ value, label }); }); + it.each([ + [Agent.ClaudeCode, VercelModel.Grok_4_7, "Grok 4.7 (Vercel)"], + [Agent.ClaudeCode, VercelModel.Gemini_3_8_Flash, "Gemini 3.8 Flash (Vercel)"], + [Agent.Codex, VercelModel.GPT_6_Sol, "GPT-6 Sol (Vercel)"], + [Agent.Codex, VercelModel.GPT_6_Luna, "GPT-6 Luna (Vercel)"], + [Agent.OpenCode, VercelModel.GPT_6_Sol, "GPT-6 Sol (Vercel)"], + [Agent.OpenCode, VercelModel.Grok_4_7, "Grok 4.7 (Vercel)"], + ])("includes current Vercel AI Gateway models for %s", (agent, value, label) => { + const group = MODEL_OPTIONS_BY_AGENT[agent].find(({ label }) => label === "Vercel AI Gateway"); + + expect(group?.options).toContainEqual({ value, label }); + }); + + it.each([ + [Agent.Codex, "OpenAI", OpenAICodex.GPT_6_Sol, "GPT-6 Sol"], + [Agent.Codex, "OpenAI", OpenAICodex.GPT_6_Luna, "GPT-6 Luna"], + [Agent.Codex, "OpenRouter", OpenRouterModel.GPT_6_Sol, "GPT-6 Sol (OR)"], + [Agent.OpenCode, "OpenAI", OpenCodeModel.GPT_6_Sol, "GPT-6 Sol"], + [Agent.OpenCode, "OpenAI", OpenCodeModel.GPT_6_Luna, "GPT-6 Luna"], + ])("includes GPT-6 Sol and Luna for %s via %s", (agent, groupLabel, value, label) => { + const group = MODEL_OPTIONS_BY_AGENT[agent].find(({ label }) => label === groupLabel); + + expect(group?.options).toContainEqual({ value, label }); + }); + it("includes Cursor models", () => { const cursorModels = MODEL_OPTIONS_BY_AGENT[Agent.Cursor].flatMap((group) => group.options); diff --git a/packages/cli/src/models.ts b/packages/cli/src/models.ts index fd3b6c3..3804bff 100644 --- a/packages/cli/src/models.ts +++ b/packages/cli/src/models.ts @@ -19,6 +19,7 @@ export const MODEL_OPTIONS_BY_AGENT: Record< options: [ { value: ClaudeCode.Fable_5_1, label: "Claude Fable 5.1" }, { value: ClaudeCode.Fable_5, label: "Claude Fable 5" }, + { value: ClaudeCode.Opus_5_5, label: "Claude Opus 5.5" }, { value: ClaudeCode.Opus_5, label: "Claude Opus 5" }, { value: ClaudeCode.Opus_4_8, label: "Claude Opus 4.8" }, { value: ClaudeCode.Opus_4_7, label: "Claude Opus 4.7" }, @@ -36,6 +37,7 @@ export const MODEL_OPTIONS_BY_AGENT: Record< options: [ { value: OpenRouterModel.Claude_Fable_5_1, label: "Claude Fable 5.1 (OR)" }, { value: OpenRouterModel.Claude_Fable_5, label: "Claude Fable 5 (OR)" }, + { value: OpenRouterModel.Claude_Opus_5_5, label: "Claude Opus 5.5 (OR)" }, { value: OpenRouterModel.Claude_Opus_5, label: "Claude Opus 5 (OR)" }, { value: OpenRouterModel.Claude_Opus_4_5, label: "Claude Opus 4.5 (OR)" }, { value: OpenRouterModel.Claude_Sonnet_5, label: "Claude Sonnet 5 (OR)" }, @@ -45,6 +47,8 @@ export const MODEL_OPTIONS_BY_AGENT: Record< { value: OpenRouterModel.Gemini_2_5_Pro, label: "Gemini 2.5 Pro (OR)" }, { value: OpenRouterModel.Gemini_2_5_Flash, label: "Gemini 2.5 Flash (OR)" }, { value: OpenRouterModel.GPT_6_Astra, label: "GPT-6 Astra (OR)" }, + { value: OpenRouterModel.GPT_6_Sol, label: "GPT-6 Sol (OR)" }, + { value: OpenRouterModel.GPT_6_Luna, label: "GPT-6 Luna (OR)" }, { value: OpenRouterModel.GPT_5_6_Sol, label: "GPT-5.6 Sol (OR)" }, { value: OpenRouterModel.GPT_5_6_Terra, label: "GPT-5.6 Terra (OR)" }, { value: OpenRouterModel.GPT_5_6_Luna, label: "GPT-5.6 Luna (OR)" }, @@ -58,14 +62,17 @@ export const MODEL_OPTIONS_BY_AGENT: Record< options: [ { value: VercelModel.Claude_Fable_5_1, label: "Claude Fable 5.1 (Vercel)" }, { value: VercelModel.Claude_Fable_5, label: "Claude Fable 5 (Vercel)" }, + { value: VercelModel.Claude_Opus_5_5, label: "Claude Opus 5.5 (Vercel)" }, { value: VercelModel.Claude_Opus_5, label: "Claude Opus 5 (Vercel)" }, { value: VercelModel.Claude_Sonnet_5, label: "Claude Sonnet 5 (Vercel)" }, { value: VercelModel.Claude_Opus_4_7, label: "Claude Opus 4.7 (Vercel)" }, { value: VercelModel.Claude_Sonnet_4_6, label: "Claude Sonnet 4.6 (Vercel)" }, { value: VercelModel.Claude_Opus_4_6, label: "Claude Opus 4.6 (Vercel)" }, { value: VercelModel.Claude_Haiku_4_5, label: "Claude Haiku 4.5 (Vercel)" }, + { value: VercelModel.Gemini_3_8_Flash, label: "Gemini 3.8 Flash (Vercel)" }, { value: VercelModel.Gemini_3_5_Flash, label: "Gemini 3.5 Flash (Vercel)" }, { value: VercelModel.Grok_Build_0_1, label: "Grok Build 0.1 (Vercel)" }, + { value: VercelModel.Grok_4_7, label: "Grok 4.7 (Vercel)" }, { value: VercelModel.Grok_4_3, label: "Grok 4.3 (Vercel)" }, ], }, @@ -75,6 +82,8 @@ export const MODEL_OPTIONS_BY_AGENT: Record< label: "OpenAI", options: [ { value: OpenAICodex.GPT_6_Astra, label: "GPT-6 Astra" }, + { value: OpenAICodex.GPT_6_Sol, label: "GPT-6 Sol" }, + { value: OpenAICodex.GPT_6_Luna, label: "GPT-6 Luna" }, { value: OpenAICodex.GPT_5_6_Sol, label: "GPT-5.6 Sol" }, { value: OpenAICodex.GPT_5_6_Terra, label: "GPT-5.6 Terra" }, { value: OpenAICodex.GPT_5_6_Luna, label: "GPT-5.6 Luna" }, @@ -92,6 +101,7 @@ export const MODEL_OPTIONS_BY_AGENT: Record< options: [ { value: OpenRouterModel.Claude_Fable_5_1, label: "Claude Fable 5.1 (OR)" }, { value: OpenRouterModel.Claude_Fable_5, label: "Claude Fable 5 (OR)" }, + { value: OpenRouterModel.Claude_Opus_5_5, label: "Claude Opus 5.5 (OR)" }, { value: OpenRouterModel.Claude_Opus_5, label: "Claude Opus 5 (OR)" }, { value: OpenRouterModel.Claude_Opus_4_5, label: "Claude Opus 4.5 (OR)" }, { value: OpenRouterModel.Claude_Sonnet_5, label: "Claude Sonnet 5 (OR)" }, @@ -101,6 +111,8 @@ export const MODEL_OPTIONS_BY_AGENT: Record< { value: OpenRouterModel.Gemini_2_5_Pro, label: "Gemini 2.5 Pro (OR)" }, { value: OpenRouterModel.Gemini_2_5_Flash, label: "Gemini 2.5 Flash (OR)" }, { value: OpenRouterModel.GPT_6_Astra, label: "GPT-6 Astra (OR)" }, + { value: OpenRouterModel.GPT_6_Sol, label: "GPT-6 Sol (OR)" }, + { value: OpenRouterModel.GPT_6_Luna, label: "GPT-6 Luna (OR)" }, { value: OpenRouterModel.GPT_5_6_Sol, label: "GPT-5.6 Sol (OR)" }, { value: OpenRouterModel.GPT_5_6_Terra, label: "GPT-5.6 Terra (OR)" }, { value: OpenRouterModel.GPT_5_6_Luna, label: "GPT-5.6 Luna (OR)" }, @@ -113,6 +125,8 @@ export const MODEL_OPTIONS_BY_AGENT: Record< label: "Vercel AI Gateway", options: [ { value: VercelModel.GPT_6_Astra, label: "GPT-6 Astra (Vercel)" }, + { value: VercelModel.GPT_6_Sol, label: "GPT-6 Sol (Vercel)" }, + { value: VercelModel.GPT_6_Luna, label: "GPT-6 Luna (Vercel)" }, { value: VercelModel.GPT_5_6_Sol, label: "GPT-5.6 Sol (Vercel)" }, { value: VercelModel.GPT_5_6_Terra, label: "GPT-5.6 Terra (Vercel)" }, { value: VercelModel.GPT_5_6_Luna, label: "GPT-5.6 Luna (Vercel)" }, @@ -120,6 +134,7 @@ export const MODEL_OPTIONS_BY_AGENT: Record< { value: VercelModel.GPT_5_5_Pro, label: "GPT-5.5 Pro (Vercel)" }, { value: VercelModel.GPT_5_4, label: "GPT-5.4 (Vercel)" }, { value: VercelModel.GPT_5_4_Mini, label: "GPT-5.4 Mini (Vercel)" }, + { value: VercelModel.Claude_Opus_5_5, label: "Claude Opus 5.5 (Vercel)" }, { value: VercelModel.Claude_Opus_5, label: "Claude Opus 5 (Vercel)" }, { value: VercelModel.Claude_Opus_4_7, label: "Claude Opus 4.7 (Vercel)" }, { value: VercelModel.Claude_Sonnet_4_6, label: "Claude Sonnet 4.6 (Vercel)" }, @@ -138,6 +153,7 @@ export const MODEL_OPTIONS_BY_AGENT: Record< { value: OpenCodeModel.Zen_MiniMax_M2_7, label: "MiniMax M2.7" }, { value: OpenCodeModel.Zen_Claude_Fable_5_1, label: "Claude Fable 5.1" }, { value: OpenCodeModel.Zen_Claude_Fable_5, label: "Claude Fable 5" }, + { value: OpenCodeModel.Zen_Claude_Opus_5_5, label: "Claude Opus 5.5" }, { value: OpenCodeModel.Zen_Claude_Opus_5, label: "Claude Opus 5" }, { value: OpenCodeModel.Zen_Claude_Sonnet_5, label: "Claude Sonnet 5" }, { value: OpenCodeModel.Zen_Claude_Sonnet_4_6, label: "Claude Sonnet 4.6" }, @@ -159,6 +175,7 @@ export const MODEL_OPTIONS_BY_AGENT: Record< options: [ { value: OpenCodeModel.Claude_Fable_5_1, label: "Claude Fable 5.1" }, { value: OpenCodeModel.Claude_Fable_5, label: "Claude Fable 5" }, + { value: OpenCodeModel.Claude_Opus_5_5, label: "Claude Opus 5.5" }, { value: OpenCodeModel.Claude_Opus_5, label: "Claude Opus 5" }, { value: OpenCodeModel.Claude_Opus_4_8, label: "Claude Opus 4.8" }, { value: OpenCodeModel.Claude_Opus_4_7, label: "Claude Opus 4.7" }, @@ -175,6 +192,8 @@ export const MODEL_OPTIONS_BY_AGENT: Record< label: "OpenAI", options: [ { value: OpenCodeModel.GPT_6_Astra, label: "GPT-6 Astra" }, + { value: OpenCodeModel.GPT_6_Sol, label: "GPT-6 Sol" }, + { value: OpenCodeModel.GPT_6_Luna, label: "GPT-6 Luna" }, { value: OpenCodeModel.GPT_5_5, label: "GPT-5.5" }, { value: OpenCodeModel.GPT_5_4_Pro, label: "GPT-5.4 Pro" }, { value: OpenCodeModel.GPT_5_4, label: "GPT-5.4" }, @@ -195,6 +214,7 @@ export const MODEL_OPTIONS_BY_AGENT: Record< options: [ { value: OpenRouterModel.Claude_Fable_5_1, label: "Claude Fable 5.1 (OR)" }, { value: OpenRouterModel.Claude_Fable_5, label: "Claude Fable 5 (OR)" }, + { value: OpenRouterModel.Claude_Opus_5_5, label: "Claude Opus 5.5 (OR)" }, { value: OpenRouterModel.Claude_Opus_5, label: "Claude Opus 5 (OR)" }, { value: OpenRouterModel.Claude_Opus_4_5, label: "Claude Opus 4.5 (OR)" }, { value: OpenRouterModel.Claude_Sonnet_5, label: "Claude Sonnet 5 (OR)" }, @@ -204,6 +224,8 @@ export const MODEL_OPTIONS_BY_AGENT: Record< { value: OpenRouterModel.Gemini_2_5_Pro, label: "Gemini 2.5 Pro (OR)" }, { value: OpenRouterModel.Gemini_2_5_Flash, label: "Gemini 2.5 Flash (OR)" }, { value: OpenRouterModel.GPT_6_Astra, label: "GPT-6 Astra (OR)" }, + { value: OpenRouterModel.GPT_6_Sol, label: "GPT-6 Sol (OR)" }, + { value: OpenRouterModel.GPT_6_Luna, label: "GPT-6 Luna (OR)" }, { value: OpenRouterModel.GPT_5_6_Sol, label: "GPT-5.6 Sol (OR)" }, { value: OpenRouterModel.GPT_5_6_Terra, label: "GPT-5.6 Terra (OR)" }, { value: OpenRouterModel.GPT_5_6_Luna, label: "GPT-5.6 Luna (OR)" }, @@ -217,12 +239,16 @@ export const MODEL_OPTIONS_BY_AGENT: Record< options: [ { value: VercelModel.Claude_Fable_5_1, label: "Claude Fable 5.1 (Vercel)" }, { value: VercelModel.Claude_Fable_5, label: "Claude Fable 5 (Vercel)" }, + { value: VercelModel.Claude_Opus_5_5, label: "Claude Opus 5.5 (Vercel)" }, { value: VercelModel.Claude_Opus_5, label: "Claude Opus 5 (Vercel)" }, { value: VercelModel.Claude_Sonnet_5, label: "Claude Sonnet 5 (Vercel)" }, { value: VercelModel.Claude_Opus_4_7, label: "Claude Opus 4.7 (Vercel)" }, { value: VercelModel.Claude_Sonnet_4_6, label: "Claude Sonnet 4.6 (Vercel)" }, + { value: VercelModel.GPT_6_Sol, label: "GPT-6 Sol (Vercel)" }, { value: VercelModel.GPT_5_5, label: "GPT-5.5 (Vercel)" }, + { value: VercelModel.Gemini_3_8_Flash, label: "Gemini 3.8 Flash (Vercel)" }, { value: VercelModel.Gemini_3_5_Flash, label: "Gemini 3.5 Flash (Vercel)" }, + { value: VercelModel.Grok_4_7, label: "Grok 4.7 (Vercel)" }, { value: VercelModel.Grok_4_3, label: "Grok 4.3 (Vercel)" }, ], }, @@ -238,6 +264,7 @@ export const MODEL_OPTIONS_BY_AGENT: Record< { value: CursorModel.GPT_5_4_Mini, label: "GPT-5.4 Mini" }, { value: CursorModel.GPT_5_3_Codex, label: "GPT-5.3 Codex" }, { value: CursorModel.Claude_Fable_5, label: "Claude Fable 5" }, + { value: CursorModel.Claude_Opus_5_5, label: "Claude Opus 5.5" }, { value: CursorModel.Claude_Opus_5, label: "Claude Opus 5" }, { value: CursorModel.Claude_Opus_4_8, label: "Claude Opus 4.8" }, { value: CursorModel.Claude_Opus_4_7, label: "Claude Opus 4.7" }, diff --git a/packages/python-sdk/CHANGELOG.md b/packages/python-sdk/CHANGELOG.md index bef6cd0..b20716e 100644 --- a/packages/python-sdk/CHANGELOG.md +++ b/packages/python-sdk/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to `upstash-box` (Python) are documented here. ## Unreleased +- Add Claude Opus 5.5 model constants for Claude Code, OpenRouter, Vercel AI + Gateway, OpenCode/Zen, and Cursor, mirroring `@upstash/box`. +- Fix Vercel AI Gateway Grok identifiers: the gateway moved xAI models from the + `xai/` to the `spacexai/` namespace, so `VercelModel.GROK_*` now resolve again. + Add `VercelModel.GROK_4_7`, `GPT_6_SOL`, `GPT_6_LUNA`, and `GEMINI_3_8_FLASH`. +- Add GPT-6 Sol and GPT-6 Luna to `OpenAICodex`, `OpenRouterModel`, and + `OpenCodeModel`. - Fix `delete_boxes(box_ids=[])` deleting every box on the account. The API read an empty id list as "no filter". `delete_boxes` and `delete_snapshots` now raise `BoxError` before any request is made when the list is empty or contains a diff --git a/packages/python-sdk/tests/_async/test_models.py b/packages/python-sdk/tests/_async/test_models.py index 6eafe5d..048400f 100644 --- a/packages/python-sdk/tests/_async/test_models.py +++ b/packages/python-sdk/tests/_async/test_models.py @@ -7,6 +7,7 @@ CursorModel, FinishChunk, FinishUsage, + OpenAICodex, OpenCodeModel, OpenRouterModel, PublicURL, @@ -20,6 +21,44 @@ ) +def test_claude_opus_5_5_model_identifier(): + assert { + ClaudeCode.OPUS_5_5.value, + CursorModel.CLAUDE_OPUS_5_5.value, + OpenCodeModel.CLAUDE_OPUS_5_5.value, + OpenCodeModel.ZEN_CLAUDE_OPUS_5_5.value, + OpenRouterModel.CLAUDE_OPUS_5_5.value, + VercelModel.CLAUDE_OPUS_5_5.value, + } == { + "anthropic/claude-opus-5-5", + "cursor/claude-opus-5-5", + "opencode/claude-opus-5-5", + "openrouter/anthropic/claude-opus-5.5", + "vercel/anthropic/claude-opus-5.5", + } + + +def test_gpt_6_sol_and_luna_model_identifiers(): + assert OpenAICodex.GPT_6_SOL.value == "openai/gpt-6-sol" + assert OpenAICodex.GPT_6_LUNA.value == "openai/gpt-6-luna" + assert OpenRouterModel.GPT_6_SOL.value == "openrouter/openai/gpt-6-sol" + assert OpenRouterModel.GPT_6_LUNA.value == "openrouter/openai/gpt-6-luna" + assert OpenCodeModel.GPT_6_SOL.value == "opencode/gpt-6-sol" + assert OpenCodeModel.GPT_6_LUNA.value == "opencode/gpt-6-luna" + + +def test_vercel_gateway_model_identifiers(): + # xAI models moved from the xai/ to the spacexai/ namespace on the gateway. + assert VercelModel.GROK_BUILD_0_1.value == "vercel/spacexai/grok-build-0.1" + assert VercelModel.GROK_4_7.value == "vercel/spacexai/grok-4.7" + assert VercelModel.GROK_4_3.value == "vercel/spacexai/grok-4.3" + assert VercelModel.GROK_4_20_REASONING.value == "vercel/spacexai/grok-4.20-reasoning" + assert VercelModel.GPT_6_SOL.value == "vercel/openai/gpt-6-sol" + assert VercelModel.GPT_6_LUNA.value == "vercel/openai/gpt-6-luna" + assert VercelModel.GEMINI_3_8_FLASH.value == "vercel/google/gemini-3.8-flash" + assert not any(m.value.startswith("vercel/xai/") for m in VercelModel) + + def test_claude_opus_5_model_identifier(): assert { ClaudeCode.OPUS_5.value, diff --git a/packages/python-sdk/upstash_box/types.py b/packages/python-sdk/upstash_box/types.py index 277afe2..336de3a 100644 --- a/packages/python-sdk/upstash_box/types.py +++ b/packages/python-sdk/upstash_box/types.py @@ -55,6 +55,7 @@ class ClaudeCode(str, Enum): OPUS_4_6 = "anthropic/claude-opus-4-6" OPUS_4_7 = "anthropic/claude-opus-4-7" OPUS_4_8 = "anthropic/claude-opus-4-8" + OPUS_5_5 = "anthropic/claude-opus-5-5" OPUS_5 = "anthropic/claude-opus-5" SONNET_4 = "anthropic/claude-sonnet-4" SONNET_4_5 = "anthropic/claude-sonnet-4-5" @@ -67,6 +68,8 @@ class OpenAICodex(str, Enum): """OpenAI Codex model identifiers.""" GPT_6_ASTRA = "openai/gpt-6-astra" + GPT_6_SOL = "openai/gpt-6-sol" + GPT_6_LUNA = "openai/gpt-6-luna" GPT_5_6 = "openai/gpt-5.6" GPT_5_6_SOL = "openai/gpt-5.6-sol" GPT_5_6_TERRA = "openai/gpt-5.6-terra" @@ -86,6 +89,7 @@ class OpenRouterModel(str, Enum): CLAUDE_FABLE_5_1 = "openrouter/anthropic/claude-fable-5.1" CLAUDE_FABLE_5 = "openrouter/anthropic/claude-fable-5" + CLAUDE_OPUS_5_5 = "openrouter/anthropic/claude-opus-5.5" CLAUDE_OPUS_5 = "openrouter/anthropic/claude-opus-5" CLAUDE_SONNET_5 = "openrouter/anthropic/claude-sonnet-5" CLAUDE_SONNET_4 = "openrouter/anthropic/claude-sonnet-4" @@ -95,6 +99,8 @@ class OpenRouterModel(str, Enum): GEMINI_2_5_PRO = "openrouter/google/gemini-2.5-pro" GEMINI_2_5_FLASH = "openrouter/google/gemini-2.5-flash" GPT_6_ASTRA = "openrouter/openai/gpt-6-astra" + GPT_6_SOL = "openrouter/openai/gpt-6-sol" + GPT_6_LUNA = "openrouter/openai/gpt-6-luna" GPT_5_6_SOL = "openrouter/openai/gpt-5.6-sol" GPT_5_6_TERRA = "openrouter/openai/gpt-5.6-terra" GPT_5_6_LUNA = "openrouter/openai/gpt-5.6-luna" @@ -108,6 +114,7 @@ class VercelModel(str, Enum): CLAUDE_FABLE_5_1 = "vercel/anthropic/claude-fable-5.1" CLAUDE_FABLE_5 = "vercel/anthropic/claude-fable-5" + CLAUDE_OPUS_5_5 = "vercel/anthropic/claude-opus-5.5" CLAUDE_OPUS_5 = "vercel/anthropic/claude-opus-5" CLAUDE_SONNET_5 = "vercel/anthropic/claude-sonnet-5" CLAUDE_OPUS_4_7 = "vercel/anthropic/claude-opus-4.7" @@ -115,6 +122,8 @@ class VercelModel(str, Enum): CLAUDE_OPUS_4_6 = "vercel/anthropic/claude-opus-4.6" CLAUDE_HAIKU_4_5 = "vercel/anthropic/claude-haiku-4.5" GPT_6_ASTRA = "vercel/openai/gpt-6-astra" + GPT_6_SOL = "vercel/openai/gpt-6-sol" + GPT_6_LUNA = "vercel/openai/gpt-6-luna" GPT_5_6_SOL = "vercel/openai/gpt-5.6-sol" GPT_5_6_TERRA = "vercel/openai/gpt-5.6-terra" GPT_5_6_LUNA = "vercel/openai/gpt-5.6-luna" @@ -122,12 +131,15 @@ class VercelModel(str, Enum): GPT_5_5_PRO = "vercel/openai/gpt-5.5-pro" GPT_5_4 = "vercel/openai/gpt-5.4" GPT_5_4_MINI = "vercel/openai/gpt-5.4-mini" + GEMINI_3_8_FLASH = "vercel/google/gemini-3.8-flash" GEMINI_3_5_FLASH = "vercel/google/gemini-3.5-flash" GEMINI_3_1_FLASH_LITE = "vercel/google/gemini-3.1-flash-lite" GEMINI_3_1_PRO_PREVIEW = "vercel/google/gemini-3.1-pro-preview" - GROK_BUILD_0_1 = "vercel/xai/grok-build-0.1" - GROK_4_3 = "vercel/xai/grok-4.3" - GROK_4_20_REASONING = "vercel/xai/grok-4.20-reasoning" + # xAI models moved from the xai/ to the spacexai/ namespace on the gateway. + GROK_BUILD_0_1 = "vercel/spacexai/grok-build-0.1" + GROK_4_7 = "vercel/spacexai/grok-4.7" + GROK_4_3 = "vercel/spacexai/grok-4.3" + GROK_4_20_REASONING = "vercel/spacexai/grok-4.20-reasoning" class OpenCodeModel(str, Enum): @@ -136,6 +148,7 @@ class OpenCodeModel(str, Enum): # Anthropic-backed OpenCode models CLAUDE_FABLE_5_1 = "opencode/claude-fable-5-1" CLAUDE_FABLE_5 = "opencode/claude-fable-5" + CLAUDE_OPUS_5_5 = "opencode/claude-opus-5-5" CLAUDE_OPUS_5 = "opencode/claude-opus-5" CLAUDE_OPUS_4_5 = "opencode/claude-opus-4-5" CLAUDE_OPUS_4_6 = "opencode/claude-opus-4-6" @@ -148,6 +161,8 @@ class OpenCodeModel(str, Enum): CLAUDE_HAIKU_4_5 = "opencode/claude-haiku-4-5" # OpenAI-backed OpenCode models GPT_6_ASTRA = "opencode/gpt-6-astra" + GPT_6_SOL = "opencode/gpt-6-sol" + GPT_6_LUNA = "opencode/gpt-6-luna" GPT_5_5 = "opencode/gpt-5.5" GPT_5_4 = "opencode/gpt-5.4" GPT_5_4_PRO = "opencode/gpt-5.4-pro" @@ -168,6 +183,7 @@ class OpenCodeModel(str, Enum): ZEN_MINIMAX_M2_7 = "opencode/minimax-m2.7" ZEN_CLAUDE_FABLE_5_1 = "opencode/claude-fable-5-1" ZEN_CLAUDE_FABLE_5 = "opencode/claude-fable-5" + ZEN_CLAUDE_OPUS_5_5 = "opencode/claude-opus-5-5" ZEN_CLAUDE_OPUS_5 = "opencode/claude-opus-5" ZEN_CLAUDE_SONNET_4_6 = "opencode/claude-sonnet-4-6" ZEN_CLAUDE_SONNET_4_5 = "opencode/claude-sonnet-4-5" @@ -202,6 +218,7 @@ class CursorModel(str, Enum): GPT_5_1_CODEX_MINI = "cursor/gpt-5.1-codex-mini" GPT_5_MINI = "cursor/gpt-5-mini" CLAUDE_FABLE_5 = "cursor/claude-fable-5" + CLAUDE_OPUS_5_5 = "cursor/claude-opus-5-5" CLAUDE_OPUS_5 = "cursor/claude-opus-5" CLAUDE_OPUS_4_8 = "cursor/claude-opus-4-8" CLAUDE_OPUS_4_7 = "cursor/claude-opus-4-7" diff --git a/packages/sdk/README.md b/packages/sdk/README.md index f35a7e4..48df886 100644 --- a/packages/sdk/README.md +++ b/packages/sdk/README.md @@ -387,6 +387,7 @@ The preferred field in agent config is `harness`, and it is required. Deprecated | ----------------------- | ----------------------------- | | `ClaudeCode.Fable_5_1` | `anthropic/claude-fable-5-1` | | `ClaudeCode.Fable_5` | `anthropic/claude-fable-5` | +| `ClaudeCode.Opus_5_5` | `anthropic/claude-opus-5-5` | | `ClaudeCode.Opus_5` | `anthropic/claude-opus-5` | | `ClaudeCode.Opus_4_8` | `anthropic/claude-opus-4-8` | | `ClaudeCode.Opus_4_7` | `anthropic/claude-opus-4-7` | @@ -403,6 +404,8 @@ The preferred field in agent config is `harness`, and it is required. Deprecated | Enum | Value | | --------------------------------- | ------------------------------ | | `OpenAICodex.GPT_6_Astra` | `openai/gpt-6-astra` | +| `OpenAICodex.GPT_6_Sol` | `openai/gpt-6-sol` | +| `OpenAICodex.GPT_6_Luna` | `openai/gpt-6-luna` | | `OpenAICodex.GPT_5_6` | `openai/gpt-5.6` (alias → Sol) | | `OpenAICodex.GPT_5_6_Sol` | `openai/gpt-5.6-sol` | | `OpenAICodex.GPT_5_6_Terra` | `openai/gpt-5.6-terra` | @@ -421,6 +424,7 @@ The preferred field in agent config is `harness`, and it is required. Deprecated | ---------------------------------- | --------------------------------------- | | `OpenRouterModel.Claude_Fable_5_1` | `openrouter/anthropic/claude-fable-5.1` | | `OpenRouterModel.Claude_Fable_5` | `openrouter/anthropic/claude-fable-5` | +| `OpenRouterModel.Claude_Opus_5_5` | `openrouter/anthropic/claude-opus-5.5` | | `OpenRouterModel.Claude_Opus_5` | `openrouter/anthropic/claude-opus-5` | | `OpenRouterModel.Claude_Sonnet_5` | `openrouter/anthropic/claude-sonnet-5` | | `OpenRouterModel.Claude_Opus_4_5` | `openrouter/anthropic/claude-opus-4-5` | diff --git a/packages/sdk/src/__tests__/types.test.ts b/packages/sdk/src/__tests__/types.test.ts index f299a94..c7efff2 100644 --- a/packages/sdk/src/__tests__/types.test.ts +++ b/packages/sdk/src/__tests__/types.test.ts @@ -1,5 +1,58 @@ import { describe, expect, it } from "vitest"; -import { ClaudeCode, CursorModel, OpenCodeModel, OpenRouterModel, VercelModel } from "../types.js"; +import { + ClaudeCode, + CursorModel, + OpenAICodex, + OpenCodeModel, + OpenRouterModel, + VercelModel, +} from "../types.js"; + +describe("Claude Opus 5.5 model identifiers", () => { + it.each([ + ["Claude Code", ClaudeCode.Opus_5_5, "anthropic/claude-opus-5-5"], + ["OpenRouter", OpenRouterModel.Claude_Opus_5_5, "openrouter/anthropic/claude-opus-5.5"], + ["Vercel", VercelModel.Claude_Opus_5_5, "vercel/anthropic/claude-opus-5.5"], + ["OpenCode Anthropic", OpenCodeModel.Claude_Opus_5_5, "opencode/claude-opus-5-5"], + ["OpenCode Zen", OpenCodeModel.Zen_Claude_Opus_5_5, "opencode/claude-opus-5-5"], + ["Cursor", CursorModel.Claude_Opus_5_5, "cursor/claude-opus-5-5"], + ])("exposes the %s model", (_provider, model, expected) => { + expect(model).toBe(expected); + }); +}); + +describe("GPT-6 Sol and Luna model identifiers", () => { + it.each([ + ["OpenAI Sol", OpenAICodex.GPT_6_Sol, "openai/gpt-6-sol"], + ["OpenAI Luna", OpenAICodex.GPT_6_Luna, "openai/gpt-6-luna"], + ["OpenRouter Sol", OpenRouterModel.GPT_6_Sol, "openrouter/openai/gpt-6-sol"], + ["OpenRouter Luna", OpenRouterModel.GPT_6_Luna, "openrouter/openai/gpt-6-luna"], + ["OpenCode Sol", OpenCodeModel.GPT_6_Sol, "opencode/gpt-6-sol"], + ["OpenCode Luna", OpenCodeModel.GPT_6_Luna, "opencode/gpt-6-luna"], + ])("exposes the %s model", (_provider, model, expected) => { + expect(model).toBe(expected); + }); +}); + +describe("Vercel AI Gateway model identifiers", () => { + it.each([ + ["Grok Build 0.1", VercelModel.Grok_Build_0_1, "vercel/spacexai/grok-build-0.1"], + ["Grok 4.7", VercelModel.Grok_4_7, "vercel/spacexai/grok-4.7"], + ["Grok 4.3", VercelModel.Grok_4_3, "vercel/spacexai/grok-4.3"], + ["Grok 4.20 Reasoning", VercelModel.Grok_4_20_Reasoning, "vercel/spacexai/grok-4.20-reasoning"], + ["GPT-6 Sol", VercelModel.GPT_6_Sol, "vercel/openai/gpt-6-sol"], + ["GPT-6 Luna", VercelModel.GPT_6_Luna, "vercel/openai/gpt-6-luna"], + ["Gemini 3.8 Flash", VercelModel.Gemini_3_8_Flash, "vercel/google/gemini-3.8-flash"], + ])("exposes the %s model under the gateway's current namespace", (_name, model, expected) => { + expect(model).toBe(expected); + }); + + it("does not use the retired xai/ namespace", () => { + for (const value of Object.values(VercelModel)) { + expect(value.startsWith("vercel/xai/")).toBe(false); + } + }); +}); describe("Claude Opus 5 model identifiers", () => { it.each([ diff --git a/packages/sdk/src/types.ts b/packages/sdk/src/types.ts index 7ee14c1..f6e7956 100644 --- a/packages/sdk/src/types.ts +++ b/packages/sdk/src/types.ts @@ -50,6 +50,7 @@ export enum ClaudeCode { Opus_4_6 = "anthropic/claude-opus-4-6", Opus_4_7 = "anthropic/claude-opus-4-7", Opus_4_8 = "anthropic/claude-opus-4-8", + Opus_5_5 = "anthropic/claude-opus-5-5", Opus_5 = "anthropic/claude-opus-5", Sonnet_4 = "anthropic/claude-sonnet-4", Sonnet_4_5 = "anthropic/claude-sonnet-4-5", @@ -63,6 +64,8 @@ export enum ClaudeCode { */ export enum OpenAICodex { GPT_6_Astra = "openai/gpt-6-astra", + GPT_6_Sol = "openai/gpt-6-sol", + GPT_6_Luna = "openai/gpt-6-luna", GPT_5_6 = "openai/gpt-5.6", GPT_5_6_Sol = "openai/gpt-5.6-sol", GPT_5_6_Terra = "openai/gpt-5.6-terra", @@ -83,6 +86,7 @@ export enum OpenAICodex { export enum OpenRouterModel { Claude_Fable_5_1 = "openrouter/anthropic/claude-fable-5.1", Claude_Fable_5 = "openrouter/anthropic/claude-fable-5", + Claude_Opus_5_5 = "openrouter/anthropic/claude-opus-5.5", Claude_Opus_5 = "openrouter/anthropic/claude-opus-5", Claude_Sonnet_5 = "openrouter/anthropic/claude-sonnet-5", Claude_Sonnet_4 = "openrouter/anthropic/claude-sonnet-4", @@ -92,6 +96,8 @@ export enum OpenRouterModel { Gemini_2_5_Pro = "openrouter/google/gemini-2.5-pro", Gemini_2_5_Flash = "openrouter/google/gemini-2.5-flash", GPT_6_Astra = "openrouter/openai/gpt-6-astra", + GPT_6_Sol = "openrouter/openai/gpt-6-sol", + GPT_6_Luna = "openrouter/openai/gpt-6-luna", GPT_5_6_Sol = "openrouter/openai/gpt-5.6-sol", GPT_5_6_Terra = "openrouter/openai/gpt-5.6-terra", GPT_5_6_Luna = "openrouter/openai/gpt-5.6-luna", @@ -106,6 +112,7 @@ export enum OpenRouterModel { export enum VercelModel { Claude_Fable_5_1 = "vercel/anthropic/claude-fable-5.1", Claude_Fable_5 = "vercel/anthropic/claude-fable-5", + Claude_Opus_5_5 = "vercel/anthropic/claude-opus-5.5", Claude_Opus_5 = "vercel/anthropic/claude-opus-5", Claude_Sonnet_5 = "vercel/anthropic/claude-sonnet-5", Claude_Opus_4_7 = "vercel/anthropic/claude-opus-4.7", @@ -113,6 +120,8 @@ export enum VercelModel { Claude_Opus_4_6 = "vercel/anthropic/claude-opus-4.6", Claude_Haiku_4_5 = "vercel/anthropic/claude-haiku-4.5", GPT_6_Astra = "vercel/openai/gpt-6-astra", + GPT_6_Sol = "vercel/openai/gpt-6-sol", + GPT_6_Luna = "vercel/openai/gpt-6-luna", GPT_5_6_Sol = "vercel/openai/gpt-5.6-sol", GPT_5_6_Terra = "vercel/openai/gpt-5.6-terra", GPT_5_6_Luna = "vercel/openai/gpt-5.6-luna", @@ -120,12 +129,15 @@ export enum VercelModel { GPT_5_5_Pro = "vercel/openai/gpt-5.5-pro", GPT_5_4 = "vercel/openai/gpt-5.4", GPT_5_4_Mini = "vercel/openai/gpt-5.4-mini", + Gemini_3_8_Flash = "vercel/google/gemini-3.8-flash", Gemini_3_5_Flash = "vercel/google/gemini-3.5-flash", Gemini_3_1_Flash_Lite = "vercel/google/gemini-3.1-flash-lite", Gemini_3_1_Pro_Preview = "vercel/google/gemini-3.1-pro-preview", - Grok_Build_0_1 = "vercel/xai/grok-build-0.1", - Grok_4_3 = "vercel/xai/grok-4.3", - Grok_4_20_Reasoning = "vercel/xai/grok-4.20-reasoning", + // xAI models moved from the xai/ to the spacexai/ namespace on the gateway. + Grok_Build_0_1 = "vercel/spacexai/grok-build-0.1", + Grok_4_7 = "vercel/spacexai/grok-4.7", + Grok_4_3 = "vercel/spacexai/grok-4.3", + Grok_4_20_Reasoning = "vercel/spacexai/grok-4.20-reasoning", } /** @@ -135,6 +147,7 @@ export enum OpenCodeModel { // Anthropic-backed OpenCode models Claude_Fable_5_1 = "opencode/claude-fable-5-1", Claude_Fable_5 = "opencode/claude-fable-5", + Claude_Opus_5_5 = "opencode/claude-opus-5-5", Claude_Opus_5 = "opencode/claude-opus-5", Claude_Opus_4_5 = "opencode/claude-opus-4-5", Claude_Opus_4_6 = "opencode/claude-opus-4-6", @@ -147,6 +160,8 @@ export enum OpenCodeModel { Claude_Haiku_4_5 = "opencode/claude-haiku-4-5", // OpenAI-backed OpenCode models GPT_6_Astra = "opencode/gpt-6-astra", + GPT_6_Sol = "opencode/gpt-6-sol", + GPT_6_Luna = "opencode/gpt-6-luna", GPT_5_5 = "opencode/gpt-5.5", GPT_5_4 = "opencode/gpt-5.4", GPT_5_4_Pro = "opencode/gpt-5.4-pro", @@ -167,6 +182,7 @@ export enum OpenCodeModel { Zen_MiniMax_M2_7 = "opencode/minimax-m2.7", Zen_Claude_Fable_5_1 = "opencode/claude-fable-5-1", Zen_Claude_Fable_5 = "opencode/claude-fable-5", + Zen_Claude_Opus_5_5 = "opencode/claude-opus-5-5", Zen_Claude_Opus_5 = "opencode/claude-opus-5", Zen_Claude_Sonnet_4_6 = "opencode/claude-sonnet-4-6", Zen_Claude_Sonnet_4_5 = "opencode/claude-sonnet-4-5", @@ -202,6 +218,7 @@ export enum CursorModel { GPT_5_1_Codex_Mini = "cursor/gpt-5.1-codex-mini", GPT_5_Mini = "cursor/gpt-5-mini", Claude_Fable_5 = "cursor/claude-fable-5", + Claude_Opus_5_5 = "cursor/claude-opus-5-5", Claude_Opus_5 = "cursor/claude-opus-5", Claude_Opus_4_8 = "cursor/claude-opus-4-8", Claude_Opus_4_7 = "cursor/claude-opus-4-7",