agent: Add Anthropic-compatible provider - #55351
Conversation
Extends the Add Provider modal to support adding Anthropic-compatible API endpoints alongside the existing OpenAI-compatible option. Uses native Anthropic /v1/messages endpoint format with support for: - Extended thinking (budget_tokens mode) - Custom beta headers - Cache configuration Release Notes: - Added support for Anthropic-compatible endpoints in Add Provider UI Signed-off-by: Scott-Nx <158021536+Scott-Nx@users.noreply.github.com>
provider The native Anthropic /v1/messages API only uses max_tokens (output tokens), not max_completion_tokens like OpenAI. This removes the unused field from the Anthropic-compatible provider settings and UI. Signed-off-by: Scott-Nx <158021536+Scott-Nx@users.noreply.github.com>
The parallel_tool_calls, prompt_cache_key, and chat_completions capability checkboxes are now conditionally rendered only when the provider is OpenAI, as these are OpenAI-specific features. Signed-off-by: Scott-Nx <158021536+Scott-Nx@users.noreply.github.com>
- Add tool_override field to AnthropicCompatibleAvailableModel to match other model types (AnthropicAvailableModel, ZedDotDevAvailableModel) - Fix test_save_provider_invalid_inputs which incorrectly tested duplicate model detection with a single model Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Allows users to select X-Api-Key or Bearer auth when adding an Anthropic-compatible provider via the UI. Signed-off-by: Scott-Nx <158021536+Scott-Nx@users.noreply.github.com>
wrapper Signed-off-by: Scott-Nx <158021536+Scott-Nx@users.noreply.github.com>
Bearer auth path now reads response body on non-success status for logging. Previously returned empty message string. Signed-off-by: Scott-Nx <158021536+Scott-Nx@users.noreply.github.com>
Enables thread title generation when using Anthropic-compatible provider with default model configuration. Signed-off-by: Scott-Nx <158021536+Scott-Nx@users.noreply.github.com>
Covers validation, XApiKey/Bearer auth selection, and duplicate model detection. Signed-off-by: Scott-Nx <158021536+Scott-Nx@users.noreply.github.com>
|
We require contributors to sign our Contributor License Agreement, and we don't have @Scott-Nx on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
The cla-bot has been summoned, and re-checked this pull request! |
|
This can solve one of issue on #41897
|
Yes, this PR covers the Anthropic-compatible API provider use case from #50381 from my side. I don’t have any remaining feature requirements after this change. The selectable auth style and Anthropic-compatible provider path address the main gap I was trying to solve there. I’m fine with closing #50381 as superseded by this PR. |

Summary
AnthropicCompatibleProvidertype with Bearer/XApiKey auth dispatchdefault_fast_modeldelegationTest plan
cargo check -p language_models -p agent_uiRelease Notes:
Self-Review Checklist:
Closes #52899