Skip to content

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

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

fix(ai): move @standard-schema/spec to dependencies#428
AlemTuzlak wants to merge 3 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 from development-only to runtime dependencies so consumers receive full type information, preserving inferred tool types and chat return/response types.
    • Added a changeset to record this dependency 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: 8050c31c-f7e1-4234-bbc8-168a8b4f105e

📥 Commits

Reviewing files that changed from the base of the PR and between 3d280d7 and 62e6f45.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • packages/typescript/ai/package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/typescript/ai/package.json

📝 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 receive the schema package at install time.
Release Notes / Changeset
.changeset/fix-standard-schema-dependency.md
Added a changeset (patch) documenting the dependency move and noting its effect on inferred types and related tooling.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through code with twitchy glee,
The spec found home where all can see,
Types travel safe, no mystery,
A tiny change, a tidy spree,
Puff of carrots, coffee tea.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description covers changes, test results, and rationale, but is missing the required checklist items from the template (Contributing guide acknowledgment and test attestation checkboxes). Include the checklist items from the template to formally confirm testing steps and adherence to contributing guidelines.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: moving @standard-schema/spec from devDependencies to dependencies, which is exactly what the PR does.
Linked Issues check ✅ Passed The PR correctly addresses issue #235 by moving @standard-schema/spec to dependencies, which ensures types like StandardJSONSchemaV1 no longer degrade to any, fixing tool definition type inference for .server and .client usages.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the dependency issue in issue #235; no unrelated code modifications are present.
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

7 package(s) bumped directly, 22 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/ai 0.10.1 → 0.10.2 Changeset
@tanstack/ai-anthropic 0.7.2 → 0.7.3 Changeset
@tanstack/ai-gemini 0.8.5 → 0.8.6 Changeset
@tanstack/ai-grok 0.6.4 → 0.6.5 Changeset
@tanstack/ai-ollama 0.6.4 → 0.6.5 Changeset
@tanstack/ai-openai 0.7.3 → 0.7.4 Changeset
@tanstack/ai-openrouter 0.7.2 → 0.7.3 Changeset
@tanstack/ai-client 0.7.8 → 0.7.9 Dependent
@tanstack/ai-code-mode 0.1.1 → 0.1.2 Dependent
@tanstack/ai-code-mode-models-eval 0.0.2 → 0.0.3 Dependent
@tanstack/ai-code-mode-skills 0.1.1 → 0.1.2 Dependent
@tanstack/ai-devtools-core 0.3.18 → 0.3.19 Dependent
@tanstack/ai-event-client 0.2.1 → 0.2.2 Dependent
@tanstack/ai-fal 0.6.11 → 0.6.12 Dependent
@tanstack/ai-isolate-cloudflare 0.1.1 → 0.1.2 Dependent
@tanstack/ai-isolate-node 0.1.1 → 0.1.2 Dependent
@tanstack/ai-isolate-quickjs 0.1.1 → 0.1.2 Dependent
@tanstack/ai-preact 0.6.13 → 0.6.14 Dependent
@tanstack/ai-react 0.7.9 → 0.7.10 Dependent
@tanstack/ai-solid 0.6.13 → 0.6.14 Dependent
@tanstack/ai-svelte 0.6.13 → 0.6.14 Dependent
@tanstack/ai-vue 0.6.13 → 0.6.14 Dependent
@tanstack/ai-vue-ui 0.1.24 → 0.1.25 Dependent
@tanstack/preact-ai-devtools 0.1.22 → 0.1.23 Dependent
@tanstack/react-ai-devtools 0.2.22 → 0.2.23 Dependent
@tanstack/solid-ai-devtools 0.2.22 → 0.2.23 Dependent
ts-svelte-chat 0.1.28 → 0.1.29 Dependent
ts-vue-chat 0.1.28 → 0.1.29 Dependent
vanilla-chat 0.0.28 → 0.0.29 Dependent

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Apr 8, 2026

View your CI Pipeline Execution ↗ for commit 62e6f45

Command Status Duration Result
nx run-many --targets=build --exclude=examples/** ✅ Succeeded 1m 42s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-10 20:01:23 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: 62e6f45

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