Skip to content

Fix anthropic xiangyu#4004

Open
Zephyroam wants to merge 2 commits intofix_anthropicfrom
fix-anthropic-xiangyu
Open

Fix anthropic xiangyu#4004
Zephyroam wants to merge 2 commits intofix_anthropicfrom
fix-anthropic-xiangyu

Conversation

@Zephyroam
Copy link
Copy Markdown
Collaborator

@Zephyroam Zephyroam commented Apr 13, 2026

Related Issue

Closes #

Description

Simplify Anthropic schema normalization by using the SDK's built-in transform_schema.
The previous implementation manually handled JSON Schema constraints. But the Anthropic Python SDK already provides anthropic.transform_schema that does all of this correctly.

Fix output_config + tools conflict.
When both output_config (structured output) and tools are present in a request, output_config constrains ALL text output to the JSON schema, which prevents the model from emitting tool_use blocks. This PR
moves tool conversion before output_config setup and skips output_config when tools are present.

Fix precommit / type-check issues in vlm_embedding.py, internal_python_interpreter.py, mistral_model.py, and hybrid_retrival.py.

REMOVE normalize_schema for output as it is not needed.

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Checklist

  • I have read and agree to the AI-Generated Code Policy (required)
  • I have linked this PR to an issue (required)
  • I have checked if any dependencies need to be added or updated in pyproject.toml and run uv lock
  • I have updated the tests accordingly (required for a bug fix or a new feature)
  • I have updated the documentation if needed
  • I have added examples if this is a new feature

If you are unsure about any of these, don't hesitate to ask. We are here to help!

Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

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

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.

Once credits are available, reopen this pull request to trigger a review.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 13, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: be15e7a0-3292-4308-85a6-412335d6a314

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-anthropic-xiangyu

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the Review Required PR need to be reviewed label Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Review Required PR need to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant