From b0143d14d52e63797ac3b1515d78a531d561d4de Mon Sep 17 00:00:00 2001 From: alitariksahin Date: Tue, 6 Oct 2026 13:51:35 +0300 Subject: [PATCH] DX-3062: list Neon GPT-5.4 and newer under Codex only Neon refuses tool calls with reasoning for these models on chat completions, which OpenCode needs, so they move out of the CLI's OpenCode Neon group and the SDK docs say so. Co-Authored-By: Claude Opus 5.5 --- .changeset/neon-gpt-codex-only.md | 9 +++++++++ packages/cli/src/__tests__/models.test.ts | 15 +++++++++++++++ packages/cli/src/models.ts | 12 +++--------- packages/python-sdk/CHANGELOG.md | 3 +++ packages/python-sdk/upstash_box/types.py | 7 +++++-- packages/sdk/src/types.ts | 6 ++++-- 6 files changed, 39 insertions(+), 13 deletions(-) create mode 100644 .changeset/neon-gpt-codex-only.md diff --git a/.changeset/neon-gpt-codex-only.md b/.changeset/neon-gpt-codex-only.md new file mode 100644 index 00000000..9773f729 --- /dev/null +++ b/.changeset/neon-gpt-codex-only.md @@ -0,0 +1,9 @@ +--- +"@upstash/box": patch +"@upstash/box-cli": patch +--- + +Neon AI Gateway: GPT-5.4 and newer (GPT-6 Astra, GPT-5.6 Sol/Terra/Luna, GPT-5.5, +GPT-5.4/Mini/Nano) are offered for Codex only. Neon refuses tool calls with reasoning +for these models on chat completions, which OpenCode needs; Codex uses the Responses +API. The CLI picker no longer lists them under OpenCode. diff --git a/packages/cli/src/__tests__/models.test.ts b/packages/cli/src/__tests__/models.test.ts index 61767f40..a524003a 100644 --- a/packages/cli/src/__tests__/models.test.ts +++ b/packages/cli/src/__tests__/models.test.ts @@ -125,6 +125,21 @@ describe("MODEL_OPTIONS_BY_AGENT", () => { expect(values(Agent.OpenCode)).toContain(NeonModel.Claude_Haiku_4_5); expect(values(Agent.OpenCode)).toContain(NeonModel.Claude_Opus_5_5); expect(values(Agent.Codex).some((v) => v.startsWith("neon/claude-"))).toBe(false); + // GPT-5.4 and newer refuse tools with reasoning on Neon chat completions: Codex only. + for (const model of [ + NeonModel.GPT_6_Astra, + NeonModel.GPT_5_6_Sol, + NeonModel.GPT_5_6_Terra, + NeonModel.GPT_5_6_Luna, + NeonModel.GPT_5_5, + NeonModel.GPT_5_4, + NeonModel.GPT_5_4_Mini, + NeonModel.GPT_5_4_Nano, + ]) { + expect(values(Agent.Codex)).toContain(model); + expect(values(Agent.OpenCode)).not.toContain(model); + } + expect(values(Agent.OpenCode)).toContain(NeonModel.GPT_5_Nano); }); it("includes Cursor models", () => { diff --git a/packages/cli/src/models.ts b/packages/cli/src/models.ts index ca09af92..dd0bbe95 100644 --- a/packages/cli/src/models.ts +++ b/packages/cli/src/models.ts @@ -280,17 +280,11 @@ export const MODEL_OPTIONS_BY_AGENT: Record< ], }, { - // Chat-completions models only: GPT-5.5 Pro and GPT-5.3 Codex are Responses-only on Neon. + // Chat-completions models only. GPT-5.5 Pro and GPT-5.3 Codex are Responses-only on + // Neon, and GPT-5.4 and newer refuse tools with reasoning on chat completions, so + // those run on Codex only. label: "Neon AI Gateway", options: [ - { value: NeonModel.GPT_6_Astra, label: "GPT-6 Astra (Neon)" }, - { value: NeonModel.GPT_5_6_Sol, label: "GPT-5.6 Sol (Neon)" }, - { value: NeonModel.GPT_5_6_Terra, label: "GPT-5.6 Terra (Neon)" }, - { value: NeonModel.GPT_5_6_Luna, label: "GPT-5.6 Luna (Neon)" }, - { value: NeonModel.GPT_5_5, label: "GPT-5.5 (Neon)" }, - { value: NeonModel.GPT_5_4, label: "GPT-5.4 (Neon)" }, - { value: NeonModel.GPT_5_4_Mini, label: "GPT-5.4 Mini (Neon)" }, - { value: NeonModel.GPT_5_4_Nano, label: "GPT-5.4 Nano (Neon)" }, { value: NeonModel.GPT_5_Mini, label: "GPT-5 Mini (Neon)" }, { value: NeonModel.GPT_5_Nano, label: "GPT-5 Nano (Neon)" }, { value: NeonModel.GPT_OSS_120B, label: "GPT OSS 120B (Neon)" }, diff --git a/packages/python-sdk/CHANGELOG.md b/packages/python-sdk/CHANGELOG.md index 91580266..fe78e2bb 100644 --- a/packages/python-sdk/CHANGELOG.md +++ b/packages/python-sdk/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to `upstash-box` (Python) are documented here. ## Unreleased +- Document that Neon GPT-5.4 and newer (`GPT_6_ASTRA`, `GPT_5_6_*`, `GPT_5_5`, + `GPT_5_4*`) run on Codex only: Neon refuses tool calls with reasoning for them + on chat completions, which OpenCode needs. - Add `NeonModel` (Neon AI Gateway, `neon/`). `infer_default_provider` routes `neon/gpt-*` to Codex, except `neon/gpt-oss-*`, and every other Neon model (GPT OSS, Claude, Gemini, Llama, Qwen, Kimi, GLM, Grok) to OpenCode. diff --git a/packages/python-sdk/upstash_box/types.py b/packages/python-sdk/upstash_box/types.py index ab70a295..bd79239c 100644 --- a/packages/python-sdk/upstash_box/types.py +++ b/packages/python-sdk/upstash_box/types.py @@ -150,8 +150,11 @@ class NeonModel(str, Enum): These run on the Codex harness (Responses API) or the OpenCode harness (chat completions); Box does not run Claude Code with Neon. - ``GPT_5_5_PRO`` and ``GPT_5_3_CODEX`` are Responses-only (Codex); - the other GPT models and ``GROK_4_6`` run on both; ``GPT_OSS_*``, the + ``GPT_5_5_PRO`` and ``GPT_5_3_CODEX`` are Responses-only (Codex), and + GPT-5.4 and newer (``GPT_6_ASTRA``, ``GPT_5_6_*``, ``GPT_5_5``, + ``GPT_5_4*``) run on Codex only, because Neon refuses tool calls with + reasoning for them on chat completions; ``GPT_5_MINI``, ``GPT_5_NANO`` + and ``GROK_4_6`` run on both; ``GPT_OSS_*``, the ``CLAUDE_*`` models and every other non-OpenAI model except Grok are served through chat completions only (OpenCode). Neon credentials are a token plus a per-branch base URL and must be stored diff --git a/packages/sdk/src/types.ts b/packages/sdk/src/types.ts index 64bbcc2a..69c4a108 100644 --- a/packages/sdk/src/types.ts +++ b/packages/sdk/src/types.ts @@ -148,8 +148,10 @@ export enum VercelModel { * * These models run on the Codex harness (Responses API) or the OpenCode harness * (chat completions). Box does not run Claude Code with Neon. - * Codex-only: `GPT_5_5_Pro`, `GPT_5_3_Codex` (Responses-only on Neon). - * Both: the other GPT models and `Grok_4_6` (Neon serves them on both endpoints). + * Codex-only: `GPT_5_5_Pro`, `GPT_5_3_Codex` (Responses-only on Neon), and GPT-5.4 and + * newer (`GPT_6_Astra`, `GPT_5_6_*`, `GPT_5_5`, `GPT_5_4*`): Neon refuses tool calls with + * reasoning for them on chat completions, which OpenCode needs. + * Both: `GPT_5_Mini`, `GPT_5_Nano` and `Grok_4_6`. * OpenCode-only: `GPT_OSS_120B`, `GPT_OSS_20B`, the Claude models and every other * non-OpenAI model except Grok (Neon serves them through chat completions only). * Neon credentials are a token plus a per-branch base URL and must be stored via the