Skip to content

fix(llm): accept nullable Anthropic input usage - #44102

Closed
primorLee wants to merge 1 commit into
anomalyco:devfrom
primorLee:anthropic-null-usage
Closed

fix(llm): accept nullable Anthropic input usage#44102
primorLee wants to merge 1 commit into
anomalyco:devfrom
primorLee:anthropic-null-usage

Conversation

@primorLee

@primorLee primorLee commented Aug 22, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #43759

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Accepts null for Anthropic's terminal input_tokens. Normalized usage keeps the earlier count from message_start, while raw provider metadata preserves the terminal null. Adds a regression test for both behaviors.

How did you verify your code works?

  • bun test test/provider/anthropic-messages.test.ts --timeout 30000 from packages/llm — 29 passed
  • bun typecheck from packages/llm — passed
  • Prettier check passed for both changed files
  • git diff --check passed

Screenshots / recordings

Not applicable.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Aug 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • Not all checklist items are checked. Please confirm you have tested locally and have not included unrelated changes.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Aug 22, 2026
@github-actions github-actions Bot closed this Aug 22, 2026
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.

ai: accept nullable Anthropic input usage

1 participant