@ailib-official/ai-protocol 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +6 -0
- package/README.md +415 -0
- package/dist/index.json +8 -0
- package/dist/v1/models/ai21.json +140 -0
- package/dist/v1/models/baichuan.json +138 -0
- package/dist/v1/models/cerebras.json +147 -0
- package/dist/v1/models/claude.json +114 -0
- package/dist/v1/models/cohere.json +235 -0
- package/dist/v1/models/deepinfra.json +43 -0
- package/dist/v1/models/deepseek-chat.json +55 -0
- package/dist/v1/models/doubao.json +197 -0
- package/dist/v1/models/ernie.json +223 -0
- package/dist/v1/models/fireworks.json +222 -0
- package/dist/v1/models/gemini.json +58 -0
- package/dist/v1/models/gpt.json +166 -0
- package/dist/v1/models/grok.json +138 -0
- package/dist/v1/models/huggingface.json +183 -0
- package/dist/v1/models/hunyuan.json +255 -0
- package/dist/v1/models/jina.json +139 -0
- package/dist/v1/models/lepton.json +188 -0
- package/dist/v1/models/llama.json +143 -0
- package/dist/v1/models/minimax.json +194 -0
- package/dist/v1/models/mistral.json +177 -0
- package/dist/v1/models/moonshot.json +144 -0
- package/dist/v1/models/nvidia.json +212 -0
- package/dist/v1/models/palmyra.json +103 -0
- package/dist/v1/models/perplexity.json +143 -0
- package/dist/v1/models/qwen.json +49 -0
- package/dist/v1/models/replicate.json +206 -0
- package/dist/v1/models/sensenova.json +144 -0
- package/dist/v1/models/siliconflow.json +44 -0
- package/dist/v1/models/spark.json +173 -0
- package/dist/v1/models/stable-diffusion.json +161 -0
- package/dist/v1/models/tiangong.json +169 -0
- package/dist/v1/models/together.json +43 -0
- package/dist/v1/models/yi.json +199 -0
- package/dist/v1/models/zhipu.json +250 -0
- package/dist/v1/providers/ai21.json +215 -0
- package/dist/v1/providers/anthropic.json +253 -0
- package/dist/v1/providers/anyscale.json +115 -0
- package/dist/v1/providers/azure.json +188 -0
- package/dist/v1/providers/baichuan.json +205 -0
- package/dist/v1/providers/baidu.json +205 -0
- package/dist/v1/providers/cerebras.json +216 -0
- package/dist/v1/providers/cohere.json +209 -0
- package/dist/v1/providers/deepinfra.json +196 -0
- package/dist/v1/providers/deepseek.json +221 -0
- package/dist/v1/providers/doubao.json +209 -0
- package/dist/v1/providers/fireworks.json +227 -0
- package/dist/v1/providers/gemini.json +279 -0
- package/dist/v1/providers/groq.json +218 -0
- package/dist/v1/providers/huggingface.json +181 -0
- package/dist/v1/providers/hunyuan.json +198 -0
- package/dist/v1/providers/jina.json +202 -0
- package/dist/v1/providers/lepton.json +221 -0
- package/dist/v1/providers/minimax.json +209 -0
- package/dist/v1/providers/mistral.json +214 -0
- package/dist/v1/providers/moonshot.json +214 -0
- package/dist/v1/providers/nvidia.json +213 -0
- package/dist/v1/providers/openai.json +267 -0
- package/dist/v1/providers/openrouter.json +220 -0
- package/dist/v1/providers/perplexity.json +172 -0
- package/dist/v1/providers/qwen.json +231 -0
- package/dist/v1/providers/replicate.json +192 -0
- package/dist/v1/providers/sensenova.json +185 -0
- package/dist/v1/providers/siliconflow.json +197 -0
- package/dist/v1/providers/spark.json +204 -0
- package/dist/v1/providers/stability.json +221 -0
- package/dist/v1/providers/tiangong.json +207 -0
- package/dist/v1/providers/together.json +196 -0
- package/dist/v1/providers/writer.json +253 -0
- package/dist/v1/providers/xai.json +238 -0
- package/dist/v1/providers/yi.json +205 -0
- package/dist/v1/providers/zhipu.json +208 -0
- package/dist/v1/spec.json +783 -0
- package/dist/v2/providers/anthropic.json +372 -0
- package/dist/v2/providers/cohere.json +109 -0
- package/dist/v2/providers/deepseek.json +272 -0
- package/dist/v2/providers/doubao.json +260 -0
- package/dist/v2/providers/google.json +388 -0
- package/dist/v2/providers/jina.json +71 -0
- package/dist/v2/providers/moonshot.json +284 -0
- package/dist/v2/providers/openai.json +419 -0
- package/dist/v2/providers/qwen.json +274 -0
- package/dist/v2/providers/zhipu.json +257 -0
- package/dist/v2-alpha/providers/anthropic.json +182 -0
- package/dist/v2-alpha/providers/gemini.json +187 -0
- package/dist/v2-alpha/providers/openai.json +215 -0
- package/dist/v2-alpha/spec.json +644 -0
- package/package.json +61 -0
- package/schemas/spec.json +186 -0
- package/schemas/v1.json +1116 -0
- package/schemas/v2/availability.json +66 -0
- package/schemas/v2/capabilities.json +182 -0
- package/schemas/v2/capability-profile.json +174 -0
- package/schemas/v2/computer-use.json +222 -0
- package/schemas/v2/context-policy.json +148 -0
- package/schemas/v2/endpoint.json +2 -0
- package/schemas/v2/error-codes.yaml +225 -0
- package/schemas/v2/errors.json +250 -0
- package/schemas/v2/execution-metadata.json +59 -0
- package/schemas/v2/mcp.json +225 -0
- package/schemas/v2/message-roles.json +10 -0
- package/schemas/v2/multimodal.json +297 -0
- package/schemas/v2/pricing.json +14 -0
- package/schemas/v2/provider-contract.json +317 -0
- package/schemas/v2/provider.json +203 -0
- package/schemas/v2/regions.json +14 -0
- package/v1/models/ai21.yaml +97 -0
- package/v1/models/baichuan.yaml +95 -0
- package/v1/models/cerebras.yaml +99 -0
- package/v1/models/claude.yaml +59 -0
- package/v1/models/cohere.yaml +165 -0
- package/v1/models/deepinfra.yaml +29 -0
- package/v1/models/deepseek-chat.yaml +32 -0
- package/v1/models/doubao.yaml +129 -0
- package/v1/models/ernie.yaml +146 -0
- package/v1/models/fireworks.yaml +145 -0
- package/v1/models/gemini.yaml +32 -0
- package/v1/models/gpt.yaml +90 -0
- package/v1/models/grok.yaml +74 -0
- package/v1/models/huggingface.yaml +110 -0
- package/v1/models/hunyuan.yaml +164 -0
- package/v1/models/jina.yaml +98 -0
- package/v1/models/lepton.yaml +130 -0
- package/v1/models/llama.yaml +91 -0
- package/v1/models/minimax.yaml +132 -0
- package/v1/models/mistral.yaml +100 -0
- package/v1/models/moonshot.yaml +97 -0
- package/v1/models/nvidia.yaml +118 -0
- package/v1/models/palmyra.yaml +59 -0
- package/v1/models/perplexity.yaml +97 -0
- package/v1/models/qwen.yaml +27 -0
- package/v1/models/replicate.yaml +136 -0
- package/v1/models/sensenova.yaml +97 -0
- package/v1/models/siliconflow.yaml +29 -0
- package/v1/models/spark.yaml +114 -0
- package/v1/models/stable-diffusion.yaml +113 -0
- package/v1/models/tiangong.yaml +114 -0
- package/v1/models/together.yaml +29 -0
- package/v1/models/yi.yaml +132 -0
- package/v1/models/zhipu.yaml +163 -0
- package/v1/providers/ai21.yaml +176 -0
- package/v1/providers/anthropic.yaml +209 -0
- package/v1/providers/anyscale.yaml +106 -0
- package/v1/providers/azure.yaml +155 -0
- package/v1/providers/baichuan.yaml +168 -0
- package/v1/providers/baidu.yaml +173 -0
- package/v1/providers/cerebras.yaml +178 -0
- package/v1/providers/cohere.yaml +175 -0
- package/v1/providers/deepinfra.yaml +156 -0
- package/v1/providers/deepseek.yaml +189 -0
- package/v1/providers/doubao.yaml +172 -0
- package/v1/providers/fireworks.yaml +187 -0
- package/v1/providers/gemini.yaml +229 -0
- package/v1/providers/groq.yaml +181 -0
- package/v1/providers/huggingface.yaml +157 -0
- package/v1/providers/hunyuan.yaml +162 -0
- package/v1/providers/jina.yaml +171 -0
- package/v1/providers/lepton.yaml +183 -0
- package/v1/providers/minimax.yaml +172 -0
- package/v1/providers/mistral.yaml +186 -0
- package/v1/providers/moonshot.yaml +176 -0
- package/v1/providers/nvidia.yaml +172 -0
- package/v1/providers/openai.yaml +224 -0
- package/v1/providers/openrouter.yaml +181 -0
- package/v1/providers/perplexity.yaml +144 -0
- package/v1/providers/qwen.yaml +192 -0
- package/v1/providers/replicate.yaml +159 -0
- package/v1/providers/sensenova.yaml +153 -0
- package/v1/providers/siliconflow.yaml +156 -0
- package/v1/providers/spark.yaml +167 -0
- package/v1/providers/stability.yaml +185 -0
- package/v1/providers/tiangong.yaml +170 -0
- package/v1/providers/together.yaml +156 -0
- package/v1/providers/writer.yaml +212 -0
- package/v1/providers/xai.yaml +206 -0
- package/v1/providers/yi.yaml +168 -0
- package/v1/providers/zhipu.yaml +171 -0
- package/v1/spec.yaml +637 -0
- package/v2/providers/anthropic.yaml +244 -0
- package/v2/providers/cohere.yaml +75 -0
- package/v2/providers/deepseek.yaml +176 -0
- package/v2/providers/doubao.yaml +169 -0
- package/v2/providers/google.yaml +245 -0
- package/v2/providers/jina.yaml +55 -0
- package/v2/providers/moonshot.yaml +186 -0
- package/v2/providers/openai.yaml +266 -0
- package/v2/providers/qwen.yaml +174 -0
- package/v2/providers/zhipu.yaml +176 -0
- package/v2-alpha/providers/anthropic.yaml +134 -0
- package/v2-alpha/providers/gemini.yaml +144 -0
- package/v2-alpha/providers/openai.yaml +154 -0
- package/v2-alpha/spec.yaml +512 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# Anthropic V2 正式提供商清单 — MCP 创建者,合并 v2-alpha 结构与审计修正后数据
|
|
2
|
+
# AI-Protocol V2 Provider Manifest
|
|
3
|
+
# Provider: Anthropic | Models: Claude Opus 4.6 / Sonnet 4.5
|
|
4
|
+
# Last Updated: 2026-02-16
|
|
5
|
+
$schema: "https://raw.githubusercontent.com/ailib-official/ai-protocol/main/schemas/v2/provider.json"
|
|
6
|
+
|
|
7
|
+
# === Ring 1: Core Skeleton ===
|
|
8
|
+
id: anthropic
|
|
9
|
+
protocol_version: "2.0"
|
|
10
|
+
name: "Anthropic"
|
|
11
|
+
version: "4.6.0"
|
|
12
|
+
status: stable
|
|
13
|
+
category: ai_provider
|
|
14
|
+
official_url: "https://docs.anthropic.com"
|
|
15
|
+
support_contact: "https://support.anthropic.com"
|
|
16
|
+
|
|
17
|
+
endpoint:
|
|
18
|
+
base_url: "https://api.anthropic.com/v1"
|
|
19
|
+
chat: "/messages"
|
|
20
|
+
auth:
|
|
21
|
+
type: "custom_header"
|
|
22
|
+
header: "x-api-key"
|
|
23
|
+
token_env: "ANTHROPIC_API_KEY"
|
|
24
|
+
extra_headers:
|
|
25
|
+
- name: "anthropic-version"
|
|
26
|
+
value: "2023-06-01"
|
|
27
|
+
|
|
28
|
+
error_classification:
|
|
29
|
+
by_http_status:
|
|
30
|
+
"400": "invalid_request"
|
|
31
|
+
"401": "authentication"
|
|
32
|
+
"403": "permission_denied"
|
|
33
|
+
"404": "not_found"
|
|
34
|
+
"413": "request_too_large"
|
|
35
|
+
"429": "rate_limited"
|
|
36
|
+
"500": "server_error"
|
|
37
|
+
"529": "overloaded"
|
|
38
|
+
by_error_code:
|
|
39
|
+
"invalid_request_error": "invalid_request"
|
|
40
|
+
"authentication_error": "authentication"
|
|
41
|
+
"permission_error": "permission_denied"
|
|
42
|
+
"not_found_error": "not_found"
|
|
43
|
+
"request_too_large": "request_too_large"
|
|
44
|
+
"rate_limit_error": "rate_limited"
|
|
45
|
+
"api_error": "server_error"
|
|
46
|
+
"overloaded_error": "overloaded"
|
|
47
|
+
|
|
48
|
+
# === Ring 2: Capability Mapping ===
|
|
49
|
+
capabilities:
|
|
50
|
+
required:
|
|
51
|
+
- text
|
|
52
|
+
- streaming
|
|
53
|
+
- tools
|
|
54
|
+
optional:
|
|
55
|
+
- vision
|
|
56
|
+
- parallel_tools
|
|
57
|
+
- agentic
|
|
58
|
+
- reasoning
|
|
59
|
+
- structured_output
|
|
60
|
+
- batch
|
|
61
|
+
- computer_use
|
|
62
|
+
- mcp_client
|
|
63
|
+
feature_flags:
|
|
64
|
+
structured_output: true
|
|
65
|
+
parallel_tool_calls: true
|
|
66
|
+
extended_thinking: true
|
|
67
|
+
streaming_usage: true
|
|
68
|
+
system_messages: true
|
|
69
|
+
|
|
70
|
+
capability_profile:
|
|
71
|
+
phase: "ios_v1"
|
|
72
|
+
inputs:
|
|
73
|
+
modalities: ["text", "image"]
|
|
74
|
+
outcomes:
|
|
75
|
+
types: ["text_completion", "structured_json", "tool_call_sequence"]
|
|
76
|
+
systems:
|
|
77
|
+
requires: ["mcp", "search"]
|
|
78
|
+
|
|
79
|
+
parameters:
|
|
80
|
+
temperature: { type: float, range: [0.0, 1.0], default: 1.0 }
|
|
81
|
+
max_tokens: { type: integer, min: 1, max: 8192, required: true }
|
|
82
|
+
top_p: { type: float, range: [0.0, 1.0] }
|
|
83
|
+
top_k: { type: integer, min: 0 }
|
|
84
|
+
stream: { type: boolean }
|
|
85
|
+
|
|
86
|
+
streaming:
|
|
87
|
+
decoder:
|
|
88
|
+
format: "anthropic_sse"
|
|
89
|
+
strategy: "anthropic_event_stream"
|
|
90
|
+
event_map:
|
|
91
|
+
- match: "$.type == 'content_block_delta' && $.delta.type == 'text_delta'"
|
|
92
|
+
emit: "PartialContentDelta"
|
|
93
|
+
extract:
|
|
94
|
+
content: "$.delta.text"
|
|
95
|
+
- match: "$.type == 'content_block_delta' && $.delta.type == 'input_json_delta'"
|
|
96
|
+
emit: "PartialToolCall"
|
|
97
|
+
extract:
|
|
98
|
+
partial_json: "$.delta.partial_json"
|
|
99
|
+
- match: "$.type == 'content_block_delta' && $.delta.type == 'thinking_delta'"
|
|
100
|
+
emit: "ThinkingDelta"
|
|
101
|
+
extract:
|
|
102
|
+
thinking: "$.delta.thinking"
|
|
103
|
+
- match: "$.type == 'message_delta'"
|
|
104
|
+
emit: "StreamEnd"
|
|
105
|
+
extract:
|
|
106
|
+
finish_reason: "$.delta.stop_reason"
|
|
107
|
+
usage: "$.usage"
|
|
108
|
+
accumulator:
|
|
109
|
+
stateful_tool_parsing: true
|
|
110
|
+
key_path: "$.delta.partial_json"
|
|
111
|
+
flush_on: "$.type == 'content_block_stop'"
|
|
112
|
+
|
|
113
|
+
# CORRECTED: Claude Opus 4.6 supports vision (document understanding, images)
|
|
114
|
+
multimodal:
|
|
115
|
+
input:
|
|
116
|
+
vision:
|
|
117
|
+
supported: true
|
|
118
|
+
formats: [jpeg, png, gif, webp]
|
|
119
|
+
max_file_size: "20MB"
|
|
120
|
+
encoding_methods: [base64_inline, url]
|
|
121
|
+
document_understanding: true
|
|
122
|
+
audio:
|
|
123
|
+
supported: false
|
|
124
|
+
video:
|
|
125
|
+
supported: false
|
|
126
|
+
output:
|
|
127
|
+
text: true
|
|
128
|
+
audio:
|
|
129
|
+
supported: false
|
|
130
|
+
image:
|
|
131
|
+
supported: false
|
|
132
|
+
|
|
133
|
+
computer_use:
|
|
134
|
+
supported: true
|
|
135
|
+
status: beta
|
|
136
|
+
implementation: screen_based
|
|
137
|
+
actions:
|
|
138
|
+
screenshot:
|
|
139
|
+
supported: true
|
|
140
|
+
formats: [png, jpeg]
|
|
141
|
+
mouse:
|
|
142
|
+
supported: true
|
|
143
|
+
operations: [click, double_click, right_click, drag, move, scroll]
|
|
144
|
+
keyboard:
|
|
145
|
+
supported: true
|
|
146
|
+
operations: [type, key_press, shortcut]
|
|
147
|
+
browser:
|
|
148
|
+
supported: false
|
|
149
|
+
zoom:
|
|
150
|
+
supported: true
|
|
151
|
+
description: "Screen region zoom for detailed inspection (computer_20251124)"
|
|
152
|
+
safety:
|
|
153
|
+
confirmation_required: true
|
|
154
|
+
sandbox_mode: recommended
|
|
155
|
+
action_logging: true
|
|
156
|
+
domain_allowlist: true
|
|
157
|
+
sensitive_data_protection: true
|
|
158
|
+
environment:
|
|
159
|
+
browser: true
|
|
160
|
+
desktop: true
|
|
161
|
+
provider_mapping:
|
|
162
|
+
tool_type: "computer_20251124"
|
|
163
|
+
beta_header: "computer-use-2025-11-24"
|
|
164
|
+
|
|
165
|
+
# Anthropic is the CREATOR of MCP
|
|
166
|
+
mcp:
|
|
167
|
+
client:
|
|
168
|
+
supported: true
|
|
169
|
+
protocol_version: "2025-11-25"
|
|
170
|
+
transports: [sse]
|
|
171
|
+
auth_methods: [bearer, oauth2]
|
|
172
|
+
capabilities:
|
|
173
|
+
tools: true
|
|
174
|
+
resources: false
|
|
175
|
+
prompts: false
|
|
176
|
+
sampling: false
|
|
177
|
+
tool_filtering:
|
|
178
|
+
allowed_tools: true
|
|
179
|
+
denied_tools: true
|
|
180
|
+
approval_modes: [never, always, auto]
|
|
181
|
+
provider_mapping:
|
|
182
|
+
beta_header: "mcp-client-2025-11-20"
|
|
183
|
+
api_endpoint: "/v1/messages"
|
|
184
|
+
config_method: tool_parameter
|
|
185
|
+
|
|
186
|
+
# === Ring 3: Advanced Extensions ===
|
|
187
|
+
api_families: ["messages"]
|
|
188
|
+
default_api_family: "messages"
|
|
189
|
+
|
|
190
|
+
endpoints:
|
|
191
|
+
chat:
|
|
192
|
+
path: "/messages"
|
|
193
|
+
method: "POST"
|
|
194
|
+
adapter: "anthropic"
|
|
195
|
+
|
|
196
|
+
rate_limit_headers:
|
|
197
|
+
retry_after: "retry-after"
|
|
198
|
+
requests_limit: "anthropic-ratelimit-requests-limit"
|
|
199
|
+
requests_remaining: "anthropic-ratelimit-requests-remaining"
|
|
200
|
+
tokens_limit: "anthropic-ratelimit-tokens-limit"
|
|
201
|
+
tokens_remaining: "anthropic-ratelimit-tokens-remaining"
|
|
202
|
+
|
|
203
|
+
retry_policy:
|
|
204
|
+
strategy: "exponential_backoff"
|
|
205
|
+
max_retries: 3
|
|
206
|
+
min_delay_ms: 1000
|
|
207
|
+
max_delay_ms: 60000
|
|
208
|
+
jitter: "full"
|
|
209
|
+
retry_on_http_status: [408, 409, 429, 500, 529]
|
|
210
|
+
|
|
211
|
+
termination:
|
|
212
|
+
source_field: "stop_reason"
|
|
213
|
+
mapping:
|
|
214
|
+
end_turn: "end_turn"
|
|
215
|
+
max_tokens: "max_tokens"
|
|
216
|
+
stop_sequence: "stop_sequence"
|
|
217
|
+
tool_use: "tool_use"
|
|
218
|
+
|
|
219
|
+
metadata:
|
|
220
|
+
models:
|
|
221
|
+
claude-opus-4-6:
|
|
222
|
+
context_window: 1000000
|
|
223
|
+
max_output_tokens: 8192
|
|
224
|
+
release_date: "2026-02-05"
|
|
225
|
+
pricing: { input_per_1m: 5.00, output_per_1m: 25.00 }
|
|
226
|
+
claude-sonnet-4-5:
|
|
227
|
+
context_window: 200000
|
|
228
|
+
max_output_tokens: 8192
|
|
229
|
+
release_date: "2025-11-24"
|
|
230
|
+
pricing: { input_per_1m: 3.00, output_per_1m: 15.00 }
|
|
231
|
+
context_management:
|
|
232
|
+
long_context_beta: "context-1m-2025-08-07"
|
|
233
|
+
compaction_api: true
|
|
234
|
+
fast_mode:
|
|
235
|
+
supported: true
|
|
236
|
+
beta_header: "fast-mode-2026-02-01"
|
|
237
|
+
speedup: "2.5x"
|
|
238
|
+
data_residency:
|
|
239
|
+
parameter: inference_geo
|
|
240
|
+
options: [us, eu]
|
|
241
|
+
sdk:
|
|
242
|
+
python: anthropic
|
|
243
|
+
typescript: "@anthropic-ai/sdk"
|
|
244
|
+
go: "github.com/anthropics/anthropic-sdk-go"
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Cohere V2 Provider Manifest — Chat + Rerank
|
|
2
|
+
# AI-Protocol V2 Provider Manifest
|
|
3
|
+
# Provider: Cohere | Rerank v3.5/v4, Command R+
|
|
4
|
+
# Last Updated: 2026-02-19
|
|
5
|
+
$schema: "https://raw.githubusercontent.com/ailib-official/ai-protocol/main/schemas/v2/provider.json"
|
|
6
|
+
|
|
7
|
+
# === Ring 1: Core Skeleton ===
|
|
8
|
+
id: cohere
|
|
9
|
+
protocol_version: "2.0"
|
|
10
|
+
name: "Cohere"
|
|
11
|
+
version: "v2"
|
|
12
|
+
status: stable
|
|
13
|
+
category: ai_provider
|
|
14
|
+
official_url: "https://docs.cohere.com"
|
|
15
|
+
support_contact: "https://cohere.com/contact"
|
|
16
|
+
|
|
17
|
+
endpoint:
|
|
18
|
+
base_url: "https://api.cohere.com/v2"
|
|
19
|
+
chat: "/chat"
|
|
20
|
+
rerank: "/rerank"
|
|
21
|
+
auth:
|
|
22
|
+
type: "bearer"
|
|
23
|
+
header: "Authorization"
|
|
24
|
+
prefix: "Bearer"
|
|
25
|
+
token_env: "COHERE_API_KEY"
|
|
26
|
+
|
|
27
|
+
error_classification:
|
|
28
|
+
by_http_status:
|
|
29
|
+
"400": "invalid_request"
|
|
30
|
+
"401": "authentication"
|
|
31
|
+
"403": "permission_denied"
|
|
32
|
+
"404": "not_found"
|
|
33
|
+
"422": "invalid_request"
|
|
34
|
+
"429": "rate_limited"
|
|
35
|
+
"500": "server_error"
|
|
36
|
+
"503": "overloaded"
|
|
37
|
+
|
|
38
|
+
# === Ring 2: Capability Mapping ===
|
|
39
|
+
capabilities:
|
|
40
|
+
required:
|
|
41
|
+
- text
|
|
42
|
+
- streaming
|
|
43
|
+
- tools
|
|
44
|
+
optional:
|
|
45
|
+
- agentic
|
|
46
|
+
- rerank
|
|
47
|
+
feature_flags:
|
|
48
|
+
structured_output: true
|
|
49
|
+
system_messages: true
|
|
50
|
+
|
|
51
|
+
capability_profile:
|
|
52
|
+
phase: "ios_v1"
|
|
53
|
+
inputs:
|
|
54
|
+
modalities: ["text"]
|
|
55
|
+
outcomes:
|
|
56
|
+
types: ["text_completion", "structured_json", "tool_call_sequence"]
|
|
57
|
+
systems:
|
|
58
|
+
requires: ["mcp", "search"]
|
|
59
|
+
|
|
60
|
+
parameters:
|
|
61
|
+
temperature: { type: float, range: [0.0, 1.0], default: 0.3 }
|
|
62
|
+
max_tokens: { type: integer, min: 1 }
|
|
63
|
+
stream: { type: boolean }
|
|
64
|
+
# Rerank-specific (provider mapping)
|
|
65
|
+
top_n: { type: integer, min: 1 }
|
|
66
|
+
max_tokens_per_doc: { type: integer, default: 4096 }
|
|
67
|
+
|
|
68
|
+
streaming:
|
|
69
|
+
decoder:
|
|
70
|
+
format: "sse"
|
|
71
|
+
strategy: "cohere_v2"
|
|
72
|
+
event_map: []
|
|
73
|
+
|
|
74
|
+
metadata:
|
|
75
|
+
rerank_models: [rerank-v3.5, rerank-english-v3.0, rerank-multilingual-v3.0]
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# DeepSeek V2 正式提供商清单 — OpenAI 兼容 API,超高性价比
|
|
2
|
+
# AI-Protocol V2 Provider Manifest
|
|
3
|
+
# Provider: DeepSeek AI | Models: V3.2 / R1
|
|
4
|
+
# Last Updated: 2026-02-16
|
|
5
|
+
$schema: "https://raw.githubusercontent.com/ailib-official/ai-protocol/main/schemas/v2/provider.json"
|
|
6
|
+
|
|
7
|
+
# === Ring 1: Core Skeleton ===
|
|
8
|
+
id: deepseek
|
|
9
|
+
protocol_version: "2.0"
|
|
10
|
+
name: "DeepSeek"
|
|
11
|
+
version: "3.2.0"
|
|
12
|
+
status: stable
|
|
13
|
+
category: ai_provider
|
|
14
|
+
official_url: "https://api-docs.deepseek.com/"
|
|
15
|
+
support_contact: "https://api-docs.deepseek.com/"
|
|
16
|
+
|
|
17
|
+
endpoint:
|
|
18
|
+
base_url: "https://api.deepseek.com/v1"
|
|
19
|
+
chat: "/chat/completions"
|
|
20
|
+
auth:
|
|
21
|
+
type: "bearer"
|
|
22
|
+
header: "Authorization"
|
|
23
|
+
prefix: "Bearer"
|
|
24
|
+
token_env: "DEEPSEEK_API_KEY"
|
|
25
|
+
|
|
26
|
+
error_classification:
|
|
27
|
+
by_http_status:
|
|
28
|
+
"400": "invalid_request"
|
|
29
|
+
"401": "authentication"
|
|
30
|
+
"403": "permission_denied"
|
|
31
|
+
"404": "not_found"
|
|
32
|
+
"413": "request_too_large"
|
|
33
|
+
"429": "rate_limited"
|
|
34
|
+
"500": "server_error"
|
|
35
|
+
"503": "overloaded"
|
|
36
|
+
by_error_code:
|
|
37
|
+
"context_length_exceeded": "request_too_large"
|
|
38
|
+
"model_not_found": "not_found"
|
|
39
|
+
"rate_limit_exceeded": "rate_limited"
|
|
40
|
+
"insufficient_quota": "quota_exhausted"
|
|
41
|
+
|
|
42
|
+
# === Ring 2: Capability Mapping ===
|
|
43
|
+
capabilities:
|
|
44
|
+
required:
|
|
45
|
+
- text
|
|
46
|
+
- streaming
|
|
47
|
+
- tools
|
|
48
|
+
optional:
|
|
49
|
+
- vision
|
|
50
|
+
- parallel_tools
|
|
51
|
+
- agentic
|
|
52
|
+
- reasoning
|
|
53
|
+
- structured_output
|
|
54
|
+
- batch
|
|
55
|
+
feature_flags:
|
|
56
|
+
structured_output: true
|
|
57
|
+
parallel_tool_calls: true
|
|
58
|
+
extended_thinking: true
|
|
59
|
+
streaming_usage: true
|
|
60
|
+
system_messages: true
|
|
61
|
+
|
|
62
|
+
capability_profile:
|
|
63
|
+
phase: "ios_v1"
|
|
64
|
+
inputs:
|
|
65
|
+
modalities: ["text"]
|
|
66
|
+
outcomes:
|
|
67
|
+
types: ["text_completion", "structured_json", "tool_call_sequence"]
|
|
68
|
+
systems:
|
|
69
|
+
requires: ["mcp", "search"]
|
|
70
|
+
|
|
71
|
+
parameters:
|
|
72
|
+
temperature: { type: float, range: [0.0, 2.0], default: 1.0 }
|
|
73
|
+
max_tokens: { type: integer, min: 1, max: 8192 }
|
|
74
|
+
top_p: { type: float, range: [0.0, 1.0] }
|
|
75
|
+
frequency_penalty: { type: float, range: [-2.0, 2.0] }
|
|
76
|
+
presence_penalty: { type: float, range: [-2.0, 2.0] }
|
|
77
|
+
stream: { type: boolean }
|
|
78
|
+
|
|
79
|
+
parameter_mappings:
|
|
80
|
+
temperature: "temperature"
|
|
81
|
+
max_tokens: "max_tokens"
|
|
82
|
+
stream: "stream"
|
|
83
|
+
top_p: "top_p"
|
|
84
|
+
tools: "tools"
|
|
85
|
+
tool_choice: "tool_choice"
|
|
86
|
+
|
|
87
|
+
streaming:
|
|
88
|
+
decoder:
|
|
89
|
+
format: "sse"
|
|
90
|
+
strategy: "openai_chat"
|
|
91
|
+
done_signal: "[DONE]"
|
|
92
|
+
prefix: "data: "
|
|
93
|
+
content_path: "$.choices[0].delta.content"
|
|
94
|
+
tool_call_path: "$.choices[0].delta.tool_calls"
|
|
95
|
+
usage_path: "$.usage"
|
|
96
|
+
event_map:
|
|
97
|
+
- match: "exists($.choices[*].delta.content)"
|
|
98
|
+
emit: "PartialContentDelta"
|
|
99
|
+
fields:
|
|
100
|
+
content: "$.choices[*].delta.content"
|
|
101
|
+
- match: "exists($.choices[*].delta.tool_calls)"
|
|
102
|
+
emit: "PartialToolCall"
|
|
103
|
+
fields:
|
|
104
|
+
tool_calls: "$.choices[*].delta.tool_calls"
|
|
105
|
+
- match: "exists($.usage)"
|
|
106
|
+
emit: "Metadata"
|
|
107
|
+
fields:
|
|
108
|
+
usage: "$.usage"
|
|
109
|
+
- match: "$.choices[*].finish_reason != null"
|
|
110
|
+
emit: "StreamEnd"
|
|
111
|
+
fields:
|
|
112
|
+
finish_reason: "$.choices[*].finish_reason"
|
|
113
|
+
stop_condition: "$.choices[0].finish_reason != null"
|
|
114
|
+
|
|
115
|
+
multimodal:
|
|
116
|
+
input:
|
|
117
|
+
vision:
|
|
118
|
+
supported: true
|
|
119
|
+
formats: [jpeg, png, gif, webp]
|
|
120
|
+
encoding_methods: [base64_inline, url]
|
|
121
|
+
document_understanding: true
|
|
122
|
+
audio:
|
|
123
|
+
supported: false
|
|
124
|
+
video:
|
|
125
|
+
supported: false
|
|
126
|
+
output:
|
|
127
|
+
text: true
|
|
128
|
+
audio:
|
|
129
|
+
supported: false
|
|
130
|
+
image:
|
|
131
|
+
supported: false
|
|
132
|
+
|
|
133
|
+
# === Ring 3: Advanced Extensions ===
|
|
134
|
+
api_families: ["chat_completions"]
|
|
135
|
+
default_api_family: "chat_completions"
|
|
136
|
+
|
|
137
|
+
endpoints:
|
|
138
|
+
chat:
|
|
139
|
+
path: "/chat/completions"
|
|
140
|
+
method: "POST"
|
|
141
|
+
adapter: "openai"
|
|
142
|
+
|
|
143
|
+
retry_policy:
|
|
144
|
+
strategy: "exponential_backoff"
|
|
145
|
+
max_retries: 3
|
|
146
|
+
min_delay_ms: 1000
|
|
147
|
+
max_delay_ms: 30000
|
|
148
|
+
jitter: "full"
|
|
149
|
+
retry_on_http_status: [429, 500, 502, 503]
|
|
150
|
+
|
|
151
|
+
termination:
|
|
152
|
+
source_field: "finish_reason"
|
|
153
|
+
mapping:
|
|
154
|
+
stop: "end_turn"
|
|
155
|
+
length: "max_tokens"
|
|
156
|
+
tool_calls: "tool_use"
|
|
157
|
+
|
|
158
|
+
metadata:
|
|
159
|
+
api_compatibility: openai
|
|
160
|
+
open_source:
|
|
161
|
+
license: MIT
|
|
162
|
+
hugging_face: "https://huggingface.co/deepseek-ai/DeepSeek-V3.2"
|
|
163
|
+
models:
|
|
164
|
+
deepseek-chat:
|
|
165
|
+
context_window: 128000
|
|
166
|
+
max_output_tokens: 8192
|
|
167
|
+
architecture: { type: moe, total: "671B", active: "37B", experts: 256 }
|
|
168
|
+
pricing: { input_per_1m: 0.28, output_per_1m: 0.42 }
|
|
169
|
+
deepseek-reasoner:
|
|
170
|
+
context_window: 128000
|
|
171
|
+
max_output_tokens: 8192
|
|
172
|
+
pricing: { input_per_1m: 0.55, output_per_1m: 2.19 }
|
|
173
|
+
sdk:
|
|
174
|
+
note: "OpenAI-compatible — use openai SDK with base_url override"
|
|
175
|
+
python: openai
|
|
176
|
+
typescript: openai
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# Doubao V2 provider manifest — P0 multimodal generative coverage
|
|
2
|
+
$schema: "https://raw.githubusercontent.com/ailib-official/ai-protocol/main/schemas/v2/provider.json"
|
|
3
|
+
|
|
4
|
+
id: doubao
|
|
5
|
+
protocol_version: "2.0"
|
|
6
|
+
name: "Doubao (Volcengine Ark)"
|
|
7
|
+
version: "3.0.0"
|
|
8
|
+
status: stable
|
|
9
|
+
category: ai_provider
|
|
10
|
+
official_url: "https://www.volcengine.com/docs/82379"
|
|
11
|
+
support_contact: "https://www.volcengine.com/contact"
|
|
12
|
+
|
|
13
|
+
endpoint:
|
|
14
|
+
base_url: "https://ark.cn-beijing.volces.com/api/v3"
|
|
15
|
+
chat: "/chat/completions"
|
|
16
|
+
auth:
|
|
17
|
+
type: "bearer"
|
|
18
|
+
header: "Authorization"
|
|
19
|
+
prefix: "Bearer"
|
|
20
|
+
token_env: "VOLCENGINE_API_KEY"
|
|
21
|
+
|
|
22
|
+
error_classification:
|
|
23
|
+
by_http_status:
|
|
24
|
+
"400": "invalid_request"
|
|
25
|
+
"401": "authentication"
|
|
26
|
+
"403": "permission_denied"
|
|
27
|
+
"404": "not_found"
|
|
28
|
+
"429": "rate_limited"
|
|
29
|
+
"500": "server_error"
|
|
30
|
+
"503": "overloaded"
|
|
31
|
+
|
|
32
|
+
capabilities:
|
|
33
|
+
required:
|
|
34
|
+
- text
|
|
35
|
+
- streaming
|
|
36
|
+
- tools
|
|
37
|
+
optional:
|
|
38
|
+
- vision
|
|
39
|
+
- audio
|
|
40
|
+
- parallel_tools
|
|
41
|
+
- reasoning
|
|
42
|
+
- structured_output
|
|
43
|
+
- image_generation
|
|
44
|
+
- stt
|
|
45
|
+
- tts
|
|
46
|
+
feature_flags:
|
|
47
|
+
structured_output: true
|
|
48
|
+
parallel_tool_calls: true
|
|
49
|
+
streaming_usage: true
|
|
50
|
+
system_messages: true
|
|
51
|
+
image_generation: true
|
|
52
|
+
|
|
53
|
+
capability_profile:
|
|
54
|
+
phase: "ios_v1"
|
|
55
|
+
inputs:
|
|
56
|
+
modalities: ["text", "image", "audio"]
|
|
57
|
+
outcomes:
|
|
58
|
+
types: ["text_completion", "structured_json", "tool_call_sequence"]
|
|
59
|
+
systems:
|
|
60
|
+
requires: ["mcp", "search"]
|
|
61
|
+
|
|
62
|
+
parameters:
|
|
63
|
+
temperature: { type: float, range: [0.0, 2.0], default: 1.0 }
|
|
64
|
+
max_tokens: { type: integer, min: 1, max: 16384 }
|
|
65
|
+
top_p: { type: float, range: [0.0, 1.0] }
|
|
66
|
+
stream: { type: boolean }
|
|
67
|
+
|
|
68
|
+
parameter_mappings:
|
|
69
|
+
temperature: "temperature"
|
|
70
|
+
max_tokens: "max_tokens"
|
|
71
|
+
stream: "stream"
|
|
72
|
+
top_p: "top_p"
|
|
73
|
+
tools: "tools"
|
|
74
|
+
tool_choice: "tool_choice"
|
|
75
|
+
|
|
76
|
+
streaming:
|
|
77
|
+
decoder:
|
|
78
|
+
format: "sse"
|
|
79
|
+
strategy: "openai_chat"
|
|
80
|
+
done_signal: "[DONE]"
|
|
81
|
+
prefix: "data: "
|
|
82
|
+
content_path: "$.choices[0].delta.content"
|
|
83
|
+
tool_call_path: "$.choices[0].delta.tool_calls"
|
|
84
|
+
usage_path: "$.usage"
|
|
85
|
+
event_map:
|
|
86
|
+
- match: "exists($.choices[*].delta.content)"
|
|
87
|
+
emit: "PartialContentDelta"
|
|
88
|
+
fields:
|
|
89
|
+
content: "$.choices[*].delta.content"
|
|
90
|
+
- match: "exists($.choices[*].delta.tool_calls)"
|
|
91
|
+
emit: "PartialToolCall"
|
|
92
|
+
fields:
|
|
93
|
+
tool_calls: "$.choices[*].delta.tool_calls"
|
|
94
|
+
- match: "exists($.usage)"
|
|
95
|
+
emit: "Metadata"
|
|
96
|
+
fields:
|
|
97
|
+
usage: "$.usage"
|
|
98
|
+
- match: "$.choices[*].finish_reason != null"
|
|
99
|
+
emit: "StreamEnd"
|
|
100
|
+
fields:
|
|
101
|
+
finish_reason: "$.choices[*].finish_reason"
|
|
102
|
+
stop_condition: "$.choices[0].finish_reason != null"
|
|
103
|
+
|
|
104
|
+
multimodal:
|
|
105
|
+
input:
|
|
106
|
+
vision:
|
|
107
|
+
supported: true
|
|
108
|
+
formats: [jpeg, png, gif, webp]
|
|
109
|
+
encoding_methods: [base64_inline, url]
|
|
110
|
+
document_understanding: true
|
|
111
|
+
audio:
|
|
112
|
+
supported: true
|
|
113
|
+
formats: [mp3, wav, flac, m4a, ogg]
|
|
114
|
+
speech_recognition: true
|
|
115
|
+
real_time_streaming: true
|
|
116
|
+
video:
|
|
117
|
+
supported: false
|
|
118
|
+
output:
|
|
119
|
+
text: true
|
|
120
|
+
audio:
|
|
121
|
+
supported: true
|
|
122
|
+
formats: [mp3, wav]
|
|
123
|
+
real_time_tts: true
|
|
124
|
+
natural_voice: true
|
|
125
|
+
voice_selection: true
|
|
126
|
+
image:
|
|
127
|
+
supported: true
|
|
128
|
+
formats: [png, jpeg]
|
|
129
|
+
video:
|
|
130
|
+
supported: false
|
|
131
|
+
|
|
132
|
+
api_families: ["chat_completions"]
|
|
133
|
+
default_api_family: "chat_completions"
|
|
134
|
+
|
|
135
|
+
endpoints:
|
|
136
|
+
chat:
|
|
137
|
+
path: "/chat/completions"
|
|
138
|
+
method: "POST"
|
|
139
|
+
adapter: "openai"
|
|
140
|
+
|
|
141
|
+
services:
|
|
142
|
+
list_models:
|
|
143
|
+
path: "/models"
|
|
144
|
+
method: "GET"
|
|
145
|
+
response_binding: "data"
|
|
146
|
+
|
|
147
|
+
retry_policy:
|
|
148
|
+
strategy: "exponential_backoff"
|
|
149
|
+
max_retries: 3
|
|
150
|
+
min_delay_ms: 1000
|
|
151
|
+
max_delay_ms: 30000
|
|
152
|
+
jitter: "full"
|
|
153
|
+
retry_on_http_status: [429, 500, 502, 503]
|
|
154
|
+
|
|
155
|
+
termination:
|
|
156
|
+
source_field: "finish_reason"
|
|
157
|
+
mapping:
|
|
158
|
+
stop: "end_turn"
|
|
159
|
+
length: "max_tokens"
|
|
160
|
+
tool_calls: "tool_use"
|
|
161
|
+
content_filter: "refusal"
|
|
162
|
+
|
|
163
|
+
metadata:
|
|
164
|
+
api_compatibility: openai
|
|
165
|
+
regional:
|
|
166
|
+
primary: china
|
|
167
|
+
sdk:
|
|
168
|
+
python: openai
|
|
169
|
+
typescript: openai
|