Skip to content

fix(ai): move @standard-schema/spec to dependencies#428

Open
AlemTuzlak wants to merge 2 commits intomainfrom
fix/standard-schema-dependency
Open

fix(ai): move @standard-schema/spec to dependencies#428
AlemTuzlak wants to merge 2 commits intomainfrom
fix/standard-schema-dependency

Conversation

@AlemTuzlak
Copy link
Copy Markdown
Contributor

@AlemTuzlak AlemTuzlak commented Apr 8, 2026

Summary

  • Move @standard-schema/spec from devDependencies to dependencies in @tanstack/ai
  • Without this package installed by consumers, all types that depend on StandardJSONSchemaV1 silently degrade to any — tool definitions lose type inference, chat() return types become any
  • This is a zero-runtime-cost fix (types-only package) that ensures consumers get correct type resolution transitively

Fixes #235

Test plan

  • pnpm test:types passes
  • pnpm test:lib — all 631 tests pass
  • pnpm build succeeds

Summary by CodeRabbit

  • Chores
    • Moved standard schema support to runtime dependencies so consumers receive full type information and tool inference, preventing degraded types and loss of inferred return/response types.
    • Added a changeset to record this adjustment and trigger a patch release.

Without this package installed, all types that depend on StandardJSONSchemaV1
silently degrade to any. Moving from devDependencies to dependencies ensures
consumers get it transitively.

Fixes #235
@AlemTuzlak AlemTuzlak requested a review from a team April 8, 2026 11:36
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d523dd7a-5cc4-45b3-9012-46f56567628c

📥 Commits

Reviewing files that changed from the base of the PR and between 854d63c and 3d280d7.

📒 Files selected for processing (1)
  • .changeset/fix-standard-schema-dependency.md
✅ Files skipped from review due to trivial changes (1)
  • .changeset/fix-standard-schema-dependency.md

📝 Walkthrough

Walkthrough

Moved @standard-schema/spec from devDependencies to dependencies in the TypeScript AI package and added a changeset recording that dependency adjustment.

Changes

Cohort / File(s) Summary
Dependency Classification
packages/typescript/ai/package.json
Moved @standard-schema/spec from devDependencies to dependencies so consumers install the schema types.
Release Notes / Changeset
.changeset/fix-standard-schema-dependency.md
Added a changeset marking a patch release that documents the dependency change and its impact on inferred types.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through code with twitchy glee,
The spec moved home where all can see,
Types now travel, neat and free,
Tools hum true — a rabbit's tea! ☕✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: moving @standard-schema/spec to dependencies in the AI package.
Description check ✅ Passed The description covers the main changes and includes a test plan, but omits the required checklist sections from the template.
Linked Issues check ✅ Passed The PR fully addresses issue #235 by moving @standard-schema/spec to dependencies, which ensures tool definition types correctly infer without degrading to any.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the type inference issue; only package.json and changeset file were modified.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/standard-schema-dependency

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 and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

🚀 Changeset Version Preview

1 package(s) bumped directly, 25 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/ai 0.10.0 → 0.10.1 Changeset
@tanstack/ai-client 0.7.7 → 0.7.8 Dependent
@tanstack/ai-code-mode 0.1.0 → 0.1.1 Dependent
@tanstack/ai-code-mode-models-eval 0.0.1 → 0.0.2 Dependent
@tanstack/ai-code-mode-skills 0.1.0 → 0.1.1 Dependent
@tanstack/ai-devtools-core 0.3.17 → 0.3.18 Dependent
@tanstack/ai-event-client 0.2.0 → 0.2.1 Dependent
@tanstack/ai-fal 0.6.10 → 0.6.11 Dependent
@tanstack/ai-isolate-cloudflare 0.1.0 → 0.1.1 Dependent
@tanstack/ai-isolate-node 0.1.0 → 0.1.1 Dependent
@tanstack/ai-isolate-quickjs 0.1.0 → 0.1.1 Dependent
@tanstack/ai-openrouter 0.7.1 → 0.7.2 Dependent
@tanstack/ai-preact 0.6.12 → 0.6.13 Dependent
@tanstack/ai-react 0.7.8 → 0.7.9 Dependent
@tanstack/ai-solid 0.6.12 → 0.6.13 Dependent
@tanstack/ai-svelte 0.6.12 → 0.6.13 Dependent
@tanstack/ai-vue 0.6.12 → 0.6.13 Dependent
@tanstack/ai-vue-ui 0.1.23 → 0.1.24 Dependent
@tanstack/preact-ai-devtools 0.1.21 → 0.1.22 Dependent
@tanstack/react-ai-devtools 0.2.21 → 0.2.22 Dependent
@tanstack/smoke-tests-e2e 0.0.33 → 0.0.34 Dependent
@tanstack/solid-ai-devtools 0.2.21 → 0.2.22 Dependent
@tanstack/tests-adapters 0.1.26 → 0.1.27 Dependent
ts-svelte-chat 0.1.27 → 0.1.28 Dependent
ts-vue-chat 0.1.27 → 0.1.28 Dependent
vanilla-chat 0.0.27 → 0.0.28 Dependent

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Apr 8, 2026

View your CI Pipeline Execution ↗ for commit 3d280d7

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

☁️ Nx Cloud last updated this comment at 2026-04-08 11:53:17 UTC

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 8, 2026

Open in StackBlitz

@tanstack/ai

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

@tanstack/ai-anthropic

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

@tanstack/ai-client

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

@tanstack/ai-code-mode

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

@tanstack/ai-code-mode-skills

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

@tanstack/ai-devtools-core

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

@tanstack/ai-elevenlabs

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

@tanstack/ai-event-client

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

@tanstack/ai-fal

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

@tanstack/ai-gemini

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

@tanstack/ai-grok

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

@tanstack/ai-groq

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

@tanstack/ai-isolate-cloudflare

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

@tanstack/ai-isolate-node

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

@tanstack/ai-isolate-quickjs

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

@tanstack/ai-ollama

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

@tanstack/ai-openai

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

@tanstack/ai-openrouter

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

@tanstack/ai-preact

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

@tanstack/ai-react

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

@tanstack/ai-react-ui

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

@tanstack/ai-solid

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

@tanstack/ai-solid-ui

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

@tanstack/ai-svelte

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

@tanstack/ai-vue

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

@tanstack/ai-vue-ui

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

@tanstack/preact-ai-devtools

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

@tanstack/react-ai-devtools

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

@tanstack/solid-ai-devtools

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

commit: 3d280d7

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.

tool definition does not infer types in .server and .client

1 participant