Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/neon-gpt-codex-only.md
Original file line number Diff line number Diff line change
@@ -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.
15 changes: 15 additions & 0 deletions packages/cli/src/__tests__/models.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down
12 changes: 3 additions & 9 deletions packages/cli/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)" },
Expand Down
3 changes: 3 additions & 0 deletions packages/python-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<neon-short-id>`). `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.
Expand Down
7 changes: 5 additions & 2 deletions packages/python-sdk/upstash_box/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions packages/sdk/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading