fix(scripts): retain web_fetch in OpenRouter tool-capability codegen#657
Conversation
generateChatToolCapabilitiesType emitted readonly ['web_search'] only, so regenerating model-meta.ts dropped web_fetch from every chat model's tool capabilities. Emit both web_search and web_fetch to match the committed model-meta.ts, and update the doc comment accordingly.
🚀 Changeset Version Preview8 package(s) bumped directly, 22 bumped as dependents. 🟥 Major bumps
🟨 Minor bumps
🟩 Patch bumps
|
|
View your CI Pipeline Execution ↗ for commit f4c304d
☁️ Nx Cloud last updated this comment at |
@tanstack/ai
@tanstack/ai-anthropic
@tanstack/ai-client
@tanstack/ai-code-mode
@tanstack/ai-code-mode-skills
@tanstack/ai-devtools-core
@tanstack/ai-elevenlabs
@tanstack/ai-event-client
@tanstack/ai-fal
@tanstack/ai-gemini
@tanstack/ai-grok
@tanstack/ai-groq
@tanstack/ai-isolate-cloudflare
@tanstack/ai-isolate-node
@tanstack/ai-isolate-quickjs
@tanstack/ai-ollama
@tanstack/ai-openai
@tanstack/ai-openrouter
@tanstack/ai-preact
@tanstack/ai-react
@tanstack/ai-react-ui
@tanstack/ai-solid
@tanstack/ai-solid-ui
@tanstack/ai-svelte
@tanstack/ai-utils
@tanstack/ai-vue
@tanstack/ai-vue-ui
@tanstack/openai-base
@tanstack/preact-ai-devtools
@tanstack/react-ai-devtools
@tanstack/solid-ai-devtools
commit: |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe pull request updates a TypeScript code generation script to extend OpenRouter chat model tool capabilities. The ChangesOpenRouter Tool Capabilities Expansion
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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
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. Comment |
Problem
generateChatToolCapabilitiesType()inscripts/convert-openrouter-models.tsemitted onlyreadonly ['web_search']for theOpenRouterChatModelToolCapabilitiesByNamemapped type. The committedpackages/ai-openrouter/src/model-meta.tscorrectly declaresreadonly ['web_search', 'web_fetch'], so the next regeneration of the model meta would have silently droppedweb_fetchfrom every chat model's tool capabilities.Both
web_searchandweb_fetchare real OpenRouter gateway tools available across all chat models (seepackages/ai-openrouter/src/tools/web-search-tool.tsandweb-fetch-tool.ts).Fix
readonly ['web_search', 'web_fetch']from the codegen so regeneratingmodel-meta.tsmatches the committed source.Notes
Script-only change — no published package output changes (the committed
model-meta.tsalready has the correct value), so no changeset is needed.🤖 Generated with Claude Code
Summary by CodeRabbit