Skip to content

fix: error on unsupported Anthropic tool types instead of silently dropping them - #2467

Open
hustxiayang wants to merge 1 commit into
envoyproxy:mainfrom
hustxiayang:fix-anthropic-tools-silent-drop
Open

fix: error on unsupported Anthropic tool types instead of silently dropping them#2467
hustxiayang wants to merge 1 commit into
envoyproxy:mainfrom
hustxiayang:fix-anthropic-tools-silent-drop

Conversation

@hustxiayang

Copy link
Copy Markdown
Contributor

Description
When translating OpenAI tools to Anthropic, non-function tools (and function tools missing their definition) were silently skipped, so the model never received them and requests failed in confusing, hard-to-debug ways. This now returns a 400 (ErrInvalidRequestBody) with a clear message, matching the existing fail-closed behavior of the Gemini translator

Signed-off-by: yxia216 <yxia216@bloomberg.net>
@hustxiayang
hustxiayang requested a review from a team as a code owner August 1, 2026 02:19
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Aug 1, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.03%. Comparing base (b80bc3e) to head (e75b751).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2467   +/-   ##
=======================================
  Coverage   85.03%   85.03%           
=======================================
  Files         159      159           
  Lines       22634    22638    +4     
=======================================
+ Hits        19247    19251    +4     
  Misses       2219     2219           
  Partials     1168     1168           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hustxiayang

Copy link
Copy Markdown
Contributor Author

/retest

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

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants