Update anthropic provider types#346
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2dab554434
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "Codex (@codex) address that feedback".
| pub enum MessageContent { | ||
| InputContentBlockArray(Vec<InputContentBlock>), | ||
| String(String), | ||
| PurpleString(String), |
There was a problem hiding this comment.
Keep generated variants compatible with Anthropic callers
Renaming the string arm here breaks the existing Anthropic converter, which still constructs and matches generated::MessageContent::String in multiple paths (for example crates/lingua/src/providers/anthropic/convert.rs:872, :1128, and :1491). Any build that includes the Anthropic provider will fail with missing String variants, so the generation/post-processing needs to preserve the old variant name or update all callers in the same change.
Useful? React with 👍 / 👎.
| #[serde(rename = "web_search_20260318")] | ||
| WebSearch20260318(WebSearchTool20260318), | ||
|
|
||
| #[serde(untagged)] |
There was a problem hiding this comment.
Restore tool_search variants in Tool
The Tool enum now jumps from the web search variants straight to Custom, so tool_search_tool_bm25/tool_search_tool_regex requests no longer have typed variants even though ToolSearchTool and the Type enum still contain those tool types. For tool-search payloads that only include name, deserialization falls through to CustomTool, which requires input_schema, so previously supported Anthropic tool-search requests will be rejected or misclassified.
Useful? React with 👍 / 👎.
Automated update of Lingua provider types.
Provider:
anthropicFeedback: comment
/bt goodor/bt badto log review feedback to the Braintrust trace.Validation
./pipelines/generate-provider-types.sh anthropic: failure./pipelines/generate-provider-types.sh anthropic: failuremake generate-types: failuremake generate-types: failurecargo fmt --all: successcargo build --all-features: failurecargo clippy --all-targets --all-features -- -D warnings: failuremake typed-boundary-check: successcargo test -p coverage-report --test cross_provider_test cross_provider_transformations_have_no_unexpected_failures: failureThis PR is created even when validation fails so the generated update and repair attempt are available for manual follow-up.