Skip to content

Conversation

@bbartels
Copy link
Contributor

@bbartels bbartels commented Dec 8, 2025

Purpose

Fixes anthropic streaming message_start usage nesting. Follow up to: #29971

Test Plan

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly adjusts the nesting of the usage field within the message_start event for Anthropic API streaming responses. The change moves the usage object to be a child of the message object, which aligns the server's output with the official Anthropic API specification. The corresponding test case has also been updated to reflect this structural change. The implementation is correct and effectively resolves the issue.

Signed-off-by: bbartels <benjamin@bartels.dev>
@DarkLight1337 DarkLight1337 enabled auto-merge (squash) December 8, 2025 16:13
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Dec 8, 2025
@mergify
Copy link

mergify bot commented Dec 8, 2025

Hi @bbartels, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants