Skip to content

fix(apicompat): harden Responses and Anthropic tool bridging#3318

Open
laozuzhen wants to merge 1 commit into
Wei-Shaw:mainfrom
laozuzhen:codex/pr-responses-tools
Open

fix(apicompat): harden Responses and Anthropic tool bridging#3318
laozuzhen wants to merge 1 commit into
Wei-Shaw:mainfrom
laozuzhen:codex/pr-responses-tools

Conversation

@laozuzhen

Copy link
Copy Markdown

Summary

  • Harden Responses API <-> Anthropic Messages conversion for polymorphic input items, tool-call pairing, empty tool inputs, and text/tool output deltas.
  • Add output validation for Anthropic HTTP 200 responses so empty/error/zero-usage bodies fail over instead of being recorded as successful completions.
  • Preserve Anthropic message cache-control transforms and request-body context when forwarding Responses requests upstream.

Tests

  • go test ./internal/pkg/apicompat ./internal/service -run 'Responses|Anthropic|ChatCompletions|Tool|Empty|ForwardAsResponses|ApiKeyPassthrough|MessageCache'

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Before we can merge this PR, we need you to sign our Contributor License Agreement (CLA).

To sign, please reply with the following comment:

I have read the CLA Document and I hereby sign the CLA

You only need to sign once — it will be valid for all your future contributions to this project.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

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