Skip to content

Conversation

@Mark-Life
Copy link
Contributor

Fix reasoning token streaming for gpt-5-mini and gpt-5-nano models

Fixes #92

🎯 Changes

Type definitions:

  • Added OpenAIReasoningOptions to gpt-5-mini and gpt-5-nano model type definitions in model-meta.ts
  • Fixed summary option placement in OpenAIReasoningOptions - moved inside reasoning object to match OpenAI SDK structure

Runtime streaming:

  • Added handler for response.reasoning_summary_text.delta events in openai-adapter.ts to stream reasoning summaries

Tests:

  • Updated model-meta.test.ts to expect reasoning support for gpt-5-mini and gpt-5-nano

Docs:

  • Updated docs/adapters/openai.md to include gpt-5-mini and gpt-5-nano in supported reasoning models

✅ Checklist

  • I have followed the steps in the Contributing guide. (Note: CONTRIBUTING.md not found in repo)
  • I have tested this code locally with pnpm run test:pr.
  • I have tested this code locally with pnpm run test:lib.

🚀 Release Impact

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

@nx-cloud
Copy link

nx-cloud bot commented Dec 5, 2025

View your CI Pipeline Execution ↗ for commit 99f2aba

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 1m 9s View ↗
nx run-many --targets=build --exclude=examples/** ✅ Succeeded 12s View ↗

☁️ Nx Cloud last updated this comment at 2025-12-09 11:04:14 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 5, 2025

Open in StackBlitz

@tanstack/ai

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

@tanstack/ai-anthropic

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

@tanstack/ai-client

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

@tanstack/ai-devtools-core

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

@tanstack/ai-gemini

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

@tanstack/ai-ollama

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

@tanstack/ai-openai

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

@tanstack/ai-react

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

@tanstack/ai-react-ui

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

@tanstack/ai-solid

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

@tanstack/ai-solid-ui

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

@tanstack/ai-svelte

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

@tanstack/ai-vue

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

@tanstack/ai-vue-ui

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

@tanstack/react-ai-devtools

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

@tanstack/solid-ai-devtools

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

commit: 99f2aba

@AlemTuzlak AlemTuzlak requested a review from jherr December 5, 2025 15:13
@AlemTuzlak AlemTuzlak merged commit 78f15fe into TanStack:main Dec 9, 2025
5 checks passed
@github-actions github-actions bot mentioned this pull request Dec 9, 2025
Sign up for free to 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.

Bug: gpt-5-nano and gpt-5-mini missing OpenAIReasoningOptions in type definitions

2 participants