fix(proxy): retry Anthropic tools without strict - #6121
Open
kense-lab wants to merge 2 commits into
Open
Conversation
kense-lab
force-pushed
the
fix/6118-bedrock-tool-strict
branch
from
August 4, 2026 10:14
83bde0a to
b00ce95
Compare
Owner
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b00ce95ad1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
kense-lab
force-pushed
the
fix/6118-bedrock-tool-strict
branch
from
August 10, 2026 06:37
9c14fb1 to
0faac87
Compare
Author
|
@farion1231 CI is green and the Codex review feedback has been addressed. Could you please take a look when you have time? Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / 概述
Fixes Bedrock-backed Anthropic gateways rejecting Codex tool declarations with:
stricton the first request so native Anthropic keeps structured tool guaranteesstricttool_search_outputtool shapesparametersorinput_schema, so a business schema property namedstrictis preservedThis is error-driven rather than model- or URL-driven because custom gateways can hide Bedrock behind an Anthropic-compatible endpoint.
Upstream implementations use the same compatibility behavior:
Related Issue / 关联 Issue
Fixes #6118
Screenshots / 截图
Not applicable; proxy compatibility fix with no UI changes.
Verification / 验证
cargo fmt --checkCARGO_INCREMENTAL=0 CARGO_PROFILE_DEV_DEBUG=0 cargo clippy --lib -- -D warningsCARGO_INCREMENTAL=0 CARGO_PROFILE_TEST_DEBUG=0 cargo test --lib tool_strict_rectifier— 4 passedCARGO_INCREMENTAL=0 CARGO_PROFILE_TEST_DEBUG=0 cargo test --lib anthropic_rectifiers_cover_codex_responses_bridge— 1 passedCARGO_INCREMENTAL=0 CARGO_PROFILE_TEST_DEBUG=0 cargo test --lib test_request_tools_and_filtering— 1 passedoctogw.imocto.cnwith an isolated local relay — first outbound Anthropic request containedtools[0].strict=trueand received the Bedrock 400; the automatic second request omittedstrictand received HTTP 200cargo test --lib— 2319 passed, 1 unrelated existing-environment failure, 2 ignored. The failure wasupdate_current_claude_desktop_provider_syncs_profile_when_proxy_takeover_is_activebecause the local proxy port was already in use.Checklist / 检查清单
cargo fmt --checkpasses / 通过 Rust 格式检查cargo clippy --lib -- -D warningspasses / 通过 Clippy 检查