Skip to content

Annotate createAnthropicChat to improve client type narrowing#411

Merged
threepointone merged 2 commits intocloudflare:mainfrom
baldyeagle:fix/anthropic-text-adapter-return-type
Mar 18, 2026
Merged

Annotate createAnthropicChat to improve client type narrowing#411
threepointone merged 2 commits intocloudflare:mainfrom
baldyeagle:fix/anthropic-text-adapter-return-type

Conversation

@baldyeagle
Copy link
Contributor

Currently createAnthropicChat specifies AnyTextAdapter as the return type, meaning uses of this do not get type narrowing with @tanstack/ai chat options with createChatOptions or chat, e.g. modelOptions.

This change specifies the correct return type from @tanstack/ai-anthropic.

@changeset-bot
Copy link

changeset-bot bot commented Feb 24, 2026

🦋 Changeset detected

Latest commit: c4f721e

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

Copy link
Collaborator

@threepointone threepointone left a comment

Choose a reason for hiding this comment

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

lgtm, let's see what ci says

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 18, 2026

Open in StackBlitz

npx https://pkg.pr.new/cloudflare/ai/ai-gateway-provider@411
npx https://pkg.pr.new/cloudflare/ai/@cloudflare/tanstack-ai@411
npx https://pkg.pr.new/cloudflare/ai/workers-ai-provider@411

commit: c4f721e

@threepointone threepointone merged commit 813b10a into cloudflare:main Mar 18, 2026
3 checks passed
@github-actions github-actions bot mentioned this pull request Mar 18, 2026
@baldyeagle baldyeagle deleted the fix/anthropic-text-adapter-return-type branch March 18, 2026 21:54
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.

2 participants