Skip to content

fix(tanstack-ai): omit empty Workers AI tools arrays - #608

Open
morgan-coded wants to merge 1 commit into
cloudflare:mainfrom
morgan-coded:fix/tanstack-empty-tools-request
Open

fix(tanstack-ai): omit empty Workers AI tools arrays#608
morgan-coded wants to merge 1 commit into
cloudflare:mainfrom
morgan-coded:fix/tanstack-empty-tools-request

Conversation

@morgan-coded

Copy link
Copy Markdown

@cloudflare/tanstack-ai could pass tools: [] to Workers AI, which some vLLM-backed models reject. This omits those empty arrays from the direct binding and Workers AI gateway paths, while non-empty tools and other providers stay unchanged. I checked the red/green cases, then ran the package suite, typecheck, build, lint, format, and the affected targets. Fixes #577

Copilot AI review requested due to automatic review settings July 10, 2026 05:16
@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fd2ee23

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cloudflare/tanstack-ai Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@morgan-coded

Copy link
Copy Markdown
Author

The three workflow runs on fd2ee23 (CI, Prerelease, Semgrep OSS scan) are all
sitting at action_required, so no checks have run on this since it opened.
@cjol — would you mind hitting "Approve and run workflows"? Happy to fix
anything CI turns up.

Scope is one package: @cloudflare/tanstack-ai omits the tools array from the
Workers AI request when it's empty, which is the failure in #577. Changeset is
included. Glad to rebase onto main first if that's easier.

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.

@cloudflare/tanstack-ai adapter fails with "Connection error" on Gemma 4 / Qwen models when tools array is empty

2 participants