mirror of
https://github.com/aiclientproxy/proxycast.git
synced 2026-09-24 23:10:56 +08:00
feat: add anthropic-compatible provider type
Add a new provider type "anthropic-compatible" to support Anthropic API
variants that use array format for the system field instead of string.
Changes:
- Add AnthropicCompatible to ApiProviderType enum (backend)
- Add AnthropicCompatible to Agent ProviderType enum
- Modify AnthropicProtocol to support array system format
- Add provider type selector in ProviderConfigForm for custom providers
- Update icon mappings to show Claude icon for anthropic-compatible
- Update model registry mappings to show Anthropic models
This allows users to connect to Anthropic-compatible proxies (like One API)
that expect the system field in array format:
{"system": [{"type": "text", "text": "..."}]}
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -703,14 +703,15 @@ mod unit_tests {
|
||||
&ctx.db,
|
||||
&provider.id,
|
||||
Some("Updated Name".to_string()),
|
||||
None,
|
||||
Some(false),
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None, // provider_type
|
||||
None, // api_host
|
||||
Some(false), // enabled
|
||||
None, // sort_order
|
||||
None, // api_version
|
||||
None, // project
|
||||
None, // location
|
||||
None, // region
|
||||
None, // custom_models
|
||||
)
|
||||
.expect("Failed to update provider");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user