Skip to content

feat(ai-openai): add GPT-5.6 Sol, Terra, and Luna models - #1040

Merged
AlemTuzlak merged 4 commits into
TanStack:mainfrom
NachoVazquez:feat/openai-gpt-5.6-models
Aug 4, 2026
Merged

feat(ai-openai): add GPT-5.6 Sol, Terra, and Luna models#1040
AlemTuzlak merged 4 commits into
TanStack:mainfrom
NachoVazquez:feat/openai-gpt-5.6-models

Conversation

@NachoVazquez

@NachoVazquezNachoVazquez commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

🎯 Changes

OpenAI shipped the GPT-5.6 family (gpt-5.6 / gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna) and @tanstack/ai-openai had no model-meta entries for them. Adapters already accept any string at runtime, but without meta the IDs are missing from OPENAI_CHAT_MODELS, provider-options typing, input-modality maps, and — critically — OpenAIChatModelToolCapabilitiesByName (missing keys resolve to readonly [], so typed provider tools are rejected).

This PR adds the four IDs with pricing/context/tools from the OpenAI model pages, wires every type map (including tool capabilities for the new models and the pre-existing holes on gpt-5.5, gpt-5.5-pro, gpt-5.4-image-2, gpt-chat-latest), and surfaces them in the chat example dropdowns.

ModelRoleContextMax out$/1M in · cached · outCutoff
gpt-5.6Alias → Sol1,050,000128,000$5 / $0.50 / $302026-02-16
gpt-5.6-solFrontier1,050,000128,000$5 / $0.50 / $302026-02-16
gpt-5.6-terraBalanced1,050,000128,000$2 / $0.20 / $122026-02-16
gpt-5.6-lunaCost-sensitive1,050,000128,000$0.20 / $0.02 / $1.202026-02-16

Files to review (8, +340 / −3):

FileWhy
packages/ai-openai/src/model-meta.ts(start here)Model consts, OPENAI_CHAT_MODELS, provider-options / modalities / tool-capabilities maps
packages/ai-openai/tests/tools-per-model-type-safety.test.tsFull tool-superset cases for 5.6 + 5.5 (catches the map hole)
packages/ai-openai/tests/model-meta.test.tsProvider-options type coverage
packages/ai-openai/tests/model-sampling-support.test.tsConfirms sampling strip via existing gpt-5* rule
examples/ts-*/src/lib/model-selection.tsDropdown entries only
.changeset/openai-gpt-5-6-models.mdminor on @tanstack/ai-openai

Sources:gpt-5.6-sol · terra · luna · pricing

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.
    • Scoped equivalent: pnpm --filter @tanstack/ai-openai test:types · test:lib (252 pass) · test:oxlint (0 errors)

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • New Features

    • Added support for the GPT-5.6 model family, including standard, Sol, Terra, and Luna variants.
    • Added the new models to chat model selection across React, Svelte, and Vue examples.
    • Added model capabilities for reasoning, structured output, tools, streaming, and supported input types.
    • Included GPT-5.5 in the example model selections.
  • Tests

    • Expanded coverage for model capabilities, sampling restrictions, and tool compatibility.

@coderabbitai

coderabbitaiBot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e2de1d4e-4683-46f8-b565-fcd2b1a7c4a0

📥 Commits

Reviewing files that changed from the base of the PR and between f93b8a1 and 13edcec.

📒 Files selected for processing (1)
  • packages/ai-openai/tests/tools-per-model-type-safety.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/ai-openai/tests/tools-per-model-type-safety.test.ts

📝 Walkthrough

Walkthrough

The PR adds four GPT-5.6 models to OpenAI metadata, type mappings, validation tests, and React, Svelte, and Vue chat examples. It also adds sampling restrictions, tool coverage, and a release changeset.

Changes

OpenAI GPT-5.6 support

Layer / File(s)Summary
GPT-5.6 metadata and registry
packages/ai-openai/src/model-meta.ts
Adds metadata, pricing, capabilities, registry entries, provider-option mappings, tool capabilities, and input modalities for four GPT-5.6 models.
Model type and behavior validation
packages/ai-openai/tests/model-meta.test.ts, packages/ai-openai/tests/model-sampling-support.test.ts, packages/ai-openai/tests/tools-per-model-type-safety.test.ts
Adds provider-option completeness checks, sampling-parameter rejection coverage, and provider-tool type coverage for the GPT-5.6 models.
Example model selection and release metadata
examples/ts-react-chat/src/lib/model-selection.ts, examples/ts-svelte-chat/src/lib/model-selection.ts, examples/ts-vue-chat/src/lib/model-selection.ts, .changeset/openai-gpt-5-6-models.md
Adds GPT-5.6 and GPT-5.5 choices to chat examples and records the package release changeset.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Title check✅ PassedThe title clearly identifies the primary change: adding GPT-5.6 model variants to the OpenAI integration.
Description check✅ PassedThe description includes the required changes, checklist, release impact, testing details, changeset, and relevant source links.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
examples/ts-react-chat/src/lib/model-selection.ts (1)

20-28: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Align the supported model selector across examples.

examples/ts-react-chat exposes many OpenAI gpt-5.* models, while examples/ts-svelte-chat and examples/ts-vue-chat expose only gpt-5, the four gpt-5.6 variants, and gpt-4o*. Add gpt-5.5 and the other React-only chat models to both Svelte and Vue model selectors, or remove gpt-5.5 from React so the examples show the same supported models.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@examples/ts-react-chat/src/lib/model-selection.ts` around lines 20 - 28,
Align the model options across the React, Svelte, and Vue chat selectors by
removing the React-only gpt-5.5 and other unsupported gpt-5.* entries, or by
adding the complete React model set to both other selectors. Ensure all three
examples expose the same supported models, including the four gpt-5.6 variants
and gpt-4o* entries.
packages/ai-openai/tests/model-meta.test.ts (1)

124-163: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoff

Co-locate the added test coverage with packages/ai-openai/src/model-meta.ts.

  • packages/ai-openai/tests/model-meta.test.ts#L124-L163: Move this coverage into a source-adjacent *.test.ts file.
  • packages/ai-openai/tests/model-sampling-support.test.ts#L20-L23: Move this coverage into the same source-adjacent test area.

As per coding guidelines, “Test files should be placed alongside source code as *.test.ts files using Vitest with happy-dom for DOM testing.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/ai-openai/tests/model-meta.test.ts` around lines 124 - 163, Move the
gpt-5.6, gpt-5.6-sol, gpt-5.6-terra, and gpt-5.6-luna type coverage from
packages/ai-openai/tests/model-meta.test.ts#L124-L163 into a source-adjacent
*.test.ts file alongside packages/ai-openai/src/model-meta.ts, preserving the
existing assertions. Also move the coverage from
packages/ai-openai/tests/model-sampling-support.test.ts#L20-L23 into that same
source-adjacent test area, with no direct changes required beyond relocating
those tests.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@examples/ts-react-chat/src/lib/model-selection.ts`:
- Around line 20-28: Align the model options across the React, Svelte, and Vue
chat selectors by removing the React-only gpt-5.5 and other unsupported gpt-5.*
entries, or by adding the complete React model set to both other selectors.
Ensure all three examples expose the same supported models, including the four
gpt-5.6 variants and gpt-4o* entries.
In `@packages/ai-openai/tests/model-meta.test.ts`:
- Around line 124-163: Move the gpt-5.6, gpt-5.6-sol, gpt-5.6-terra, and
gpt-5.6-luna type coverage from
packages/ai-openai/tests/model-meta.test.ts#L124-L163 into a source-adjacent
*.test.ts file alongside packages/ai-openai/src/model-meta.ts, preserving the
existing assertions. Also move the coverage from
packages/ai-openai/tests/model-sampling-support.test.ts#L20-L23 into that same
source-adjacent test area, with no direct changes required beyond relocating
those tests.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 471aba73-ff75-4bf5-9882-042496907e75

📥 Commits

Reviewing files that changed from the base of the PR and between 826cfed and fa74725.

📒 Files selected for processing (7)
  • .changeset/openai-gpt-5-6-models.md
  • examples/ts-react-chat/src/lib/model-selection.ts
  • examples/ts-svelte-chat/src/lib/model-selection.ts
  • examples/ts-vue-chat/src/lib/model-selection.ts
  • packages/ai-openai/src/model-meta.ts
  • packages/ai-openai/tests/model-meta.test.ts
  • packages/ai-openai/tests/model-sampling-support.test.ts

OpenAIChatModelToolCapabilitiesByName was missing the new GPT-5.6
family (and pre-existing 5.5 / 5.4-image-2 / gpt-chat-latest), so
typed provider tools resolved to readonly [] for those models.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/ai-openai/tests/tools-per-model-type-safety.test.ts`:
- Around line 76-84: Replace the parameterized it.each test around openaiText
with separate literal it() blocks for each model, or otherwise assert each model
independently. Ensure every model in the table is checked against its own
inferred type so capabilities cannot be validated through the union of all
models.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3adf3d7f-6c59-4f1b-8272-c86c474bd18e

📥 Commits

Reviewing files that changed from the base of the PR and between fa74725 and 809e659.

📒 Files selected for processing (2)
  • packages/ai-openai/src/model-meta.ts
  • packages/ai-openai/tests/tools-per-model-type-safety.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/ai-openai/src/model-meta.ts

Comment threadpackages/ai-openai/tests/tools-per-model-type-safety.test.ts Outdated
Split the it.each tool-superset cases into per-model literal it() blocks
so each openaiText('<id>') is checked alone. Add gpt-5.5 to the Svelte
and Vue chat dropdowns to match the React entry this PR introduced.
@NachoVazquez

Copy link
Copy Markdown
ContributorAuthor

Re: example model selectors (review nit)

Added gpt-5.5 to the Svelte and Vue selectors to match the React entry this PR introduced. Older React-only gpt-5.* rows predate this change and stay as-is.

@NachoVazquez

Copy link
Copy Markdown
ContributorAuthor

Re: co-locating model-meta tests (review nit)

Leaving tests under packages/ai-openai/tests/. That is the package convention (14 files there; only one leftover under src/). Moving would fight the existing layout.

@nx-cloud

nx-cloudBot commented Aug 4, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit f93b8a1

CommandStatusDurationResult
nx run-many --targets=build --exclude=examples/...✅ Succeeded9sView ↗

☁️ Nx Cloud last updated this comment at 2026-08-04 15:51:49 UTC

@pkg-pr-new

pkg-pr-newBot commented Aug 4, 2026

Copy link
Copy Markdown

Open in StackBlitz

@tanstack/ai

npm i https://pkg.pr.new/@tanstack/ai@1040

@tanstack/ai-acp

npm i https://pkg.pr.new/@tanstack/ai-acp@1040

@tanstack/ai-angular

npm i https://pkg.pr.new/@tanstack/ai-angular@1040

@tanstack/ai-anthropic

npm i https://pkg.pr.new/@tanstack/ai-anthropic@1040

@tanstack/ai-bedrock

npm i https://pkg.pr.new/@tanstack/ai-bedrock@1040

@tanstack/ai-byteplus

npm i https://pkg.pr.new/@tanstack/ai-byteplus@1040

@tanstack/ai-claude-code

npm i https://pkg.pr.new/@tanstack/ai-claude-code@1040

@tanstack/ai-client

npm i https://pkg.pr.new/@tanstack/ai-client@1040

@tanstack/ai-code-mode

npm i https://pkg.pr.new/@tanstack/ai-code-mode@1040

@tanstack/ai-code-mode-skills

npm i https://pkg.pr.new/@tanstack/ai-code-mode-skills@1040

@tanstack/ai-codex

npm i https://pkg.pr.new/@tanstack/ai-codex@1040

@tanstack/ai-devtools-core

npm i https://pkg.pr.new/@tanstack/ai-devtools-core@1040

@tanstack/ai-durable-stream

npm i https://pkg.pr.new/@tanstack/ai-durable-stream@1040

@tanstack/ai-elevenlabs

npm i https://pkg.pr.new/@tanstack/ai-elevenlabs@1040

@tanstack/ai-event-client

npm i https://pkg.pr.new/@tanstack/ai-event-client@1040

@tanstack/ai-fal

npm i https://pkg.pr.new/@tanstack/ai-fal@1040

@tanstack/ai-gemini

npm i https://pkg.pr.new/@tanstack/ai-gemini@1040

@tanstack/ai-grok

npm i https://pkg.pr.new/@tanstack/ai-grok@1040

@tanstack/ai-grok-build

npm i https://pkg.pr.new/@tanstack/ai-grok-build@1040

@tanstack/ai-groq

npm i https://pkg.pr.new/@tanstack/ai-groq@1040

@tanstack/ai-isolate-cloudflare

npm i https://pkg.pr.new/@tanstack/ai-isolate-cloudflare@1040

@tanstack/ai-isolate-node

npm i https://pkg.pr.new/@tanstack/ai-isolate-node@1040

@tanstack/ai-isolate-quickjs

npm i https://pkg.pr.new/@tanstack/ai-isolate-quickjs@1040

@tanstack/ai-mcp

npm i https://pkg.pr.new/@tanstack/ai-mcp@1040

@tanstack/ai-memory

npm i https://pkg.pr.new/@tanstack/ai-memory@1040

@tanstack/ai-mistral

npm i https://pkg.pr.new/@tanstack/ai-mistral@1040

@tanstack/ai-ollama

npm i https://pkg.pr.new/@tanstack/ai-ollama@1040

@tanstack/ai-openai

npm i https://pkg.pr.new/@tanstack/ai-openai@1040

@tanstack/ai-opencode

npm i https://pkg.pr.new/@tanstack/ai-opencode@1040

@tanstack/ai-openrouter

npm i https://pkg.pr.new/@tanstack/ai-openrouter@1040

@tanstack/ai-persistence

npm i https://pkg.pr.new/@tanstack/ai-persistence@1040

@tanstack/ai-preact

npm i https://pkg.pr.new/@tanstack/ai-preact@1040

@tanstack/ai-react

npm i https://pkg.pr.new/@tanstack/ai-react@1040

@tanstack/ai-react-ui

npm i https://pkg.pr.new/@tanstack/ai-react-ui@1040

@tanstack/ai-sandbox

npm i https://pkg.pr.new/@tanstack/ai-sandbox@1040

@tanstack/ai-sandbox-cloudflare

npm i https://pkg.pr.new/@tanstack/ai-sandbox-cloudflare@1040

@tanstack/ai-sandbox-daytona

npm i https://pkg.pr.new/@tanstack/ai-sandbox-daytona@1040

@tanstack/ai-sandbox-docker

npm i https://pkg.pr.new/@tanstack/ai-sandbox-docker@1040

@tanstack/ai-sandbox-local-process

npm i https://pkg.pr.new/@tanstack/ai-sandbox-local-process@1040

@tanstack/ai-sandbox-sprites

npm i https://pkg.pr.new/@tanstack/ai-sandbox-sprites@1040

@tanstack/ai-sandbox-vercel

npm i https://pkg.pr.new/@tanstack/ai-sandbox-vercel@1040

@tanstack/ai-solid

npm i https://pkg.pr.new/@tanstack/ai-solid@1040

@tanstack/ai-solid-ui

npm i https://pkg.pr.new/@tanstack/ai-solid-ui@1040

@tanstack/ai-svelte

npm i https://pkg.pr.new/@tanstack/ai-svelte@1040

@tanstack/ai-utils

npm i https://pkg.pr.new/@tanstack/ai-utils@1040

@tanstack/ai-vue

npm i https://pkg.pr.new/@tanstack/ai-vue@1040

@tanstack/ai-vue-ui

npm i https://pkg.pr.new/@tanstack/ai-vue-ui@1040

@tanstack/openai-base

npm i https://pkg.pr.new/@tanstack/openai-base@1040

@tanstack/preact-ai-devtools

npm i https://pkg.pr.new/@tanstack/preact-ai-devtools@1040

@tanstack/react-ai-devtools

npm i https://pkg.pr.new/@tanstack/react-ai-devtools@1040

@tanstack/solid-ai-devtools

npm i https://pkg.pr.new/@tanstack/solid-ai-devtools@1040

commit: 13edcec

@AlemTuzlak
AlemTuzlak merged commit 421439d into TanStack:mainAug 4, 2026
9 checks passed
@github-actionsgithub-actionsBot mentioned this pull request Aug 4, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@NachoVazquez@AlemTuzlak