Skip to content

Comments

Annotate createAnthropicChat to improve client type narrowing#411

Open
baldyeagle wants to merge 1 commit intocloudflare:mainfrom
baldyeagle:fix/anthropic-text-adapter-return-type
Open

Annotate createAnthropicChat to improve client type narrowing#411
baldyeagle wants to merge 1 commit intocloudflare:mainfrom
baldyeagle:fix/anthropic-text-adapter-return-type

Conversation

@baldyeagle
Copy link

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: af08464

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

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.

1 participant