Skip to content

Update anthropic provider types#355

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
update-anthropic-provider-types-0709d3c3-29296006372
Open

Update anthropic provider types#355
github-actions[bot] wants to merge 1 commit into
mainfrom
update-anthropic-provider-types-0709d3c3-29296006372

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Automated update of Lingua provider types.

Provider: anthropic

Feedback: comment /bt good or /bt bad to log review feedback to the Braintrust trace.

Validation

  • ./pipelines/generate-provider-types.sh anthropic: failure
  • Claude repair pass: failure
  • Retry ./pipelines/generate-provider-types.sh anthropic: success
  • make generate-types: success
  • Braintrust workflow trace: success
  • Claude integration review: success
  • Post-review make generate-types: success
  • cargo fmt --all: success
  • cargo build --all-features: success
  • cargo clippy --all-targets --all-features -- -D warnings: success
  • make typed-boundary-check: success
  • cargo test -p coverage-report --test cross_provider_test cross_provider_transformations_have_no_unexpected_failures: failure

This PR is created even when validation fails so the generated update and repair attempt are available for manual follow-up.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 451cf7d1f0

ℹ️ 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".

Comment on lines +1717 to +1718
#[serde(rename = "web_search_20260318")]
WebSearch20260318(WebSearchTool20260318),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restore tool_search variants to the Anthropic Tool enum

The checked-in Anthropic spec still includes ToolSearchToolBM25_20251119 and ToolSearchToolRegex_20251119 in the request tools union (specs/anthropic/openapi.yml:33116-33117) and their type enums include values such as tool_search_tool_regex_20251119 (specs/anthropic/openapi.yml:36813-36814), but this enum now goes from web_search directly to Custom. For any valid Anthropic request whose tools contains one of those tool_search tools, CreateMessageParams deserialization/validation now rejects the request, and the adapter still emits that same tool_search type for discovery, so round-trips and existing payload cases break. Please fix the generator or typed adapter so these schema variants remain accepted.

Useful? React with 👍 / 👎.

"text/plain" => {
Some(generated::Base64ImageSourceMediaType::TextPlain)
}
_ => None,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve a media type for text document fallbacks

For non-URL UserContentPart::File values with a media type outside the explicit list, such as application/octet-stream, this now sets anthropic_media_type to None but still emits a document source with source_type: Text. The checked-in OpenAPI schema requires media_type for PlainTextSource (specs/anthropic/openapi.yml:34213-34216), so the generated Anthropic request is invalid; previously the fallback sent text/plain, which satisfied that source shape.

Useful? React with 👍 / 👎.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant