-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdoubao.py
More file actions
27 lines (20 loc) · 862 Bytes
/
Copy pathdoubao.py
File metadata and controls
27 lines (20 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""豆包 Doubao 供应商 — 原生 Anthropic 兼容端点薄透传代理.
端点 (https://ark.cn-beijing.volces.com/api/coding) 已完整支持
Anthropic Messages API 协议,仅做模型名映射和认证头替换。
"""
from __future__ import annotations
from ..config.schema import FailoverConfig
from ..config.vendors import DoubaoConfig
from ..routing.model_mapper import ModelMapper
from .native_anthropic import NativeAnthropicVendor
class DoubaoVendor(NativeAnthropicVendor):
"""豆包 Doubao 原生 Anthropic 兼容端点供应商(薄透传)."""
_vendor_name = "doubao"
_display_name = "Doubao"
def __init__(
self,
config: DoubaoConfig,
model_mapper: ModelMapper,
failover_config: FailoverConfig | None = None,
) -> None:
super().__init__(config, model_mapper, failover_config)