@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,372 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/ailib-official/ai-protocol/main/schemas/v2/provider.json",
|
|
3
|
+
"id": "anthropic",
|
|
4
|
+
"protocol_version": "2.0",
|
|
5
|
+
"name": "Anthropic",
|
|
6
|
+
"version": "4.6.0",
|
|
7
|
+
"status": "stable",
|
|
8
|
+
"category": "ai_provider",
|
|
9
|
+
"official_url": "https://docs.anthropic.com",
|
|
10
|
+
"support_contact": "https://support.anthropic.com",
|
|
11
|
+
"endpoint": {
|
|
12
|
+
"base_url": "https://api.anthropic.com/v1",
|
|
13
|
+
"chat": "/messages",
|
|
14
|
+
"auth": {
|
|
15
|
+
"type": "custom_header",
|
|
16
|
+
"header": "x-api-key",
|
|
17
|
+
"token_env": "ANTHROPIC_API_KEY",
|
|
18
|
+
"extra_headers": [
|
|
19
|
+
{
|
|
20
|
+
"name": "anthropic-version",
|
|
21
|
+
"value": "2023-06-01"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
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
|
+
"529": "overloaded"
|
|
36
|
+
},
|
|
37
|
+
"by_error_code": {
|
|
38
|
+
"invalid_request_error": "invalid_request",
|
|
39
|
+
"authentication_error": "authentication",
|
|
40
|
+
"permission_error": "permission_denied",
|
|
41
|
+
"not_found_error": "not_found",
|
|
42
|
+
"request_too_large": "request_too_large",
|
|
43
|
+
"rate_limit_error": "rate_limited",
|
|
44
|
+
"api_error": "server_error",
|
|
45
|
+
"overloaded_error": "overloaded"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"capabilities": {
|
|
49
|
+
"required": [
|
|
50
|
+
"text",
|
|
51
|
+
"streaming",
|
|
52
|
+
"tools"
|
|
53
|
+
],
|
|
54
|
+
"optional": [
|
|
55
|
+
"vision",
|
|
56
|
+
"parallel_tools",
|
|
57
|
+
"agentic",
|
|
58
|
+
"reasoning",
|
|
59
|
+
"structured_output",
|
|
60
|
+
"batch",
|
|
61
|
+
"computer_use",
|
|
62
|
+
"mcp_client"
|
|
63
|
+
],
|
|
64
|
+
"feature_flags": {
|
|
65
|
+
"structured_output": true,
|
|
66
|
+
"parallel_tool_calls": true,
|
|
67
|
+
"extended_thinking": true,
|
|
68
|
+
"streaming_usage": true,
|
|
69
|
+
"system_messages": true
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"capability_profile": {
|
|
73
|
+
"phase": "ios_v1",
|
|
74
|
+
"inputs": {
|
|
75
|
+
"modalities": [
|
|
76
|
+
"text",
|
|
77
|
+
"image"
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"outcomes": {
|
|
81
|
+
"types": [
|
|
82
|
+
"text_completion",
|
|
83
|
+
"structured_json",
|
|
84
|
+
"tool_call_sequence"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"systems": {
|
|
88
|
+
"requires": [
|
|
89
|
+
"mcp",
|
|
90
|
+
"search"
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"parameters": {
|
|
95
|
+
"temperature": {
|
|
96
|
+
"type": "float",
|
|
97
|
+
"range": [
|
|
98
|
+
0,
|
|
99
|
+
1
|
|
100
|
+
],
|
|
101
|
+
"default": 1
|
|
102
|
+
},
|
|
103
|
+
"max_tokens": {
|
|
104
|
+
"type": "integer",
|
|
105
|
+
"min": 1,
|
|
106
|
+
"max": 8192,
|
|
107
|
+
"required": true
|
|
108
|
+
},
|
|
109
|
+
"top_p": {
|
|
110
|
+
"type": "float",
|
|
111
|
+
"range": [
|
|
112
|
+
0,
|
|
113
|
+
1
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
"top_k": {
|
|
117
|
+
"type": "integer",
|
|
118
|
+
"min": 0
|
|
119
|
+
},
|
|
120
|
+
"stream": {
|
|
121
|
+
"type": "boolean"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"streaming": {
|
|
125
|
+
"decoder": {
|
|
126
|
+
"format": "anthropic_sse",
|
|
127
|
+
"strategy": "anthropic_event_stream"
|
|
128
|
+
},
|
|
129
|
+
"event_map": [
|
|
130
|
+
{
|
|
131
|
+
"match": "$.type == 'content_block_delta' && $.delta.type == 'text_delta'",
|
|
132
|
+
"emit": "PartialContentDelta",
|
|
133
|
+
"extract": {
|
|
134
|
+
"content": "$.delta.text"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"match": "$.type == 'content_block_delta' && $.delta.type == 'input_json_delta'",
|
|
139
|
+
"emit": "PartialToolCall",
|
|
140
|
+
"extract": {
|
|
141
|
+
"partial_json": "$.delta.partial_json"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"match": "$.type == 'content_block_delta' && $.delta.type == 'thinking_delta'",
|
|
146
|
+
"emit": "ThinkingDelta",
|
|
147
|
+
"extract": {
|
|
148
|
+
"thinking": "$.delta.thinking"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"match": "$.type == 'message_delta'",
|
|
153
|
+
"emit": "StreamEnd",
|
|
154
|
+
"extract": {
|
|
155
|
+
"finish_reason": "$.delta.stop_reason",
|
|
156
|
+
"usage": "$.usage"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
"accumulator": {
|
|
161
|
+
"stateful_tool_parsing": true,
|
|
162
|
+
"key_path": "$.delta.partial_json",
|
|
163
|
+
"flush_on": "$.type == 'content_block_stop'"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"multimodal": {
|
|
167
|
+
"input": {
|
|
168
|
+
"vision": {
|
|
169
|
+
"supported": true,
|
|
170
|
+
"formats": [
|
|
171
|
+
"jpeg",
|
|
172
|
+
"png",
|
|
173
|
+
"gif",
|
|
174
|
+
"webp"
|
|
175
|
+
],
|
|
176
|
+
"max_file_size": "20MB",
|
|
177
|
+
"encoding_methods": [
|
|
178
|
+
"base64_inline",
|
|
179
|
+
"url"
|
|
180
|
+
],
|
|
181
|
+
"document_understanding": true
|
|
182
|
+
},
|
|
183
|
+
"audio": {
|
|
184
|
+
"supported": false
|
|
185
|
+
},
|
|
186
|
+
"video": {
|
|
187
|
+
"supported": false
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"output": {
|
|
191
|
+
"text": true,
|
|
192
|
+
"audio": {
|
|
193
|
+
"supported": false
|
|
194
|
+
},
|
|
195
|
+
"image": {
|
|
196
|
+
"supported": false
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"computer_use": {
|
|
201
|
+
"supported": true,
|
|
202
|
+
"status": "beta",
|
|
203
|
+
"implementation": "screen_based",
|
|
204
|
+
"actions": {
|
|
205
|
+
"screenshot": {
|
|
206
|
+
"supported": true,
|
|
207
|
+
"formats": [
|
|
208
|
+
"png",
|
|
209
|
+
"jpeg"
|
|
210
|
+
]
|
|
211
|
+
},
|
|
212
|
+
"mouse": {
|
|
213
|
+
"supported": true,
|
|
214
|
+
"operations": [
|
|
215
|
+
"click",
|
|
216
|
+
"double_click",
|
|
217
|
+
"right_click",
|
|
218
|
+
"drag",
|
|
219
|
+
"move",
|
|
220
|
+
"scroll"
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
"keyboard": {
|
|
224
|
+
"supported": true,
|
|
225
|
+
"operations": [
|
|
226
|
+
"type",
|
|
227
|
+
"key_press",
|
|
228
|
+
"shortcut"
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
"browser": {
|
|
232
|
+
"supported": false
|
|
233
|
+
},
|
|
234
|
+
"zoom": {
|
|
235
|
+
"supported": true,
|
|
236
|
+
"description": "Screen region zoom for detailed inspection (computer_20251124)"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"safety": {
|
|
240
|
+
"confirmation_required": true,
|
|
241
|
+
"sandbox_mode": "recommended",
|
|
242
|
+
"action_logging": true,
|
|
243
|
+
"domain_allowlist": true,
|
|
244
|
+
"sensitive_data_protection": true
|
|
245
|
+
},
|
|
246
|
+
"environment": {
|
|
247
|
+
"browser": true,
|
|
248
|
+
"desktop": true
|
|
249
|
+
},
|
|
250
|
+
"provider_mapping": {
|
|
251
|
+
"tool_type": "computer_20251124",
|
|
252
|
+
"beta_header": "computer-use-2025-11-24"
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"mcp": {
|
|
256
|
+
"client": {
|
|
257
|
+
"supported": true,
|
|
258
|
+
"protocol_version": "2025-11-25",
|
|
259
|
+
"transports": [
|
|
260
|
+
"sse"
|
|
261
|
+
],
|
|
262
|
+
"auth_methods": [
|
|
263
|
+
"bearer",
|
|
264
|
+
"oauth2"
|
|
265
|
+
],
|
|
266
|
+
"capabilities": {
|
|
267
|
+
"tools": true,
|
|
268
|
+
"resources": false,
|
|
269
|
+
"prompts": false,
|
|
270
|
+
"sampling": false
|
|
271
|
+
},
|
|
272
|
+
"tool_filtering": {
|
|
273
|
+
"allowed_tools": true,
|
|
274
|
+
"denied_tools": true
|
|
275
|
+
},
|
|
276
|
+
"approval_modes": [
|
|
277
|
+
"never",
|
|
278
|
+
"always",
|
|
279
|
+
"auto"
|
|
280
|
+
],
|
|
281
|
+
"provider_mapping": {
|
|
282
|
+
"beta_header": "mcp-client-2025-11-20",
|
|
283
|
+
"api_endpoint": "/v1/messages",
|
|
284
|
+
"config_method": "tool_parameter"
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"api_families": [
|
|
289
|
+
"messages"
|
|
290
|
+
],
|
|
291
|
+
"default_api_family": "messages",
|
|
292
|
+
"endpoints": {
|
|
293
|
+
"chat": {
|
|
294
|
+
"path": "/messages",
|
|
295
|
+
"method": "POST",
|
|
296
|
+
"adapter": "anthropic"
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"rate_limit_headers": {
|
|
300
|
+
"retry_after": "retry-after",
|
|
301
|
+
"requests_limit": "anthropic-ratelimit-requests-limit",
|
|
302
|
+
"requests_remaining": "anthropic-ratelimit-requests-remaining",
|
|
303
|
+
"tokens_limit": "anthropic-ratelimit-tokens-limit",
|
|
304
|
+
"tokens_remaining": "anthropic-ratelimit-tokens-remaining"
|
|
305
|
+
},
|
|
306
|
+
"retry_policy": {
|
|
307
|
+
"strategy": "exponential_backoff",
|
|
308
|
+
"max_retries": 3,
|
|
309
|
+
"min_delay_ms": 1000,
|
|
310
|
+
"max_delay_ms": 60000,
|
|
311
|
+
"jitter": "full",
|
|
312
|
+
"retry_on_http_status": [
|
|
313
|
+
408,
|
|
314
|
+
409,
|
|
315
|
+
429,
|
|
316
|
+
500,
|
|
317
|
+
529
|
|
318
|
+
]
|
|
319
|
+
},
|
|
320
|
+
"termination": {
|
|
321
|
+
"source_field": "stop_reason",
|
|
322
|
+
"mapping": {
|
|
323
|
+
"end_turn": "end_turn",
|
|
324
|
+
"max_tokens": "max_tokens",
|
|
325
|
+
"stop_sequence": "stop_sequence",
|
|
326
|
+
"tool_use": "tool_use"
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"metadata": {
|
|
330
|
+
"models": {
|
|
331
|
+
"claude-opus-4-6": {
|
|
332
|
+
"context_window": 1000000,
|
|
333
|
+
"max_output_tokens": 8192,
|
|
334
|
+
"release_date": "2026-02-05",
|
|
335
|
+
"pricing": {
|
|
336
|
+
"input_per_1m": 5,
|
|
337
|
+
"output_per_1m": 25
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"claude-sonnet-4-5": {
|
|
341
|
+
"context_window": 200000,
|
|
342
|
+
"max_output_tokens": 8192,
|
|
343
|
+
"release_date": "2025-11-24",
|
|
344
|
+
"pricing": {
|
|
345
|
+
"input_per_1m": 3,
|
|
346
|
+
"output_per_1m": 15
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"context_management": {
|
|
351
|
+
"long_context_beta": "context-1m-2025-08-07",
|
|
352
|
+
"compaction_api": true
|
|
353
|
+
},
|
|
354
|
+
"fast_mode": {
|
|
355
|
+
"supported": true,
|
|
356
|
+
"beta_header": "fast-mode-2026-02-01",
|
|
357
|
+
"speedup": "2.5x"
|
|
358
|
+
},
|
|
359
|
+
"data_residency": {
|
|
360
|
+
"parameter": "inference_geo",
|
|
361
|
+
"options": [
|
|
362
|
+
"us",
|
|
363
|
+
"eu"
|
|
364
|
+
]
|
|
365
|
+
},
|
|
366
|
+
"sdk": {
|
|
367
|
+
"python": "anthropic",
|
|
368
|
+
"typescript": "@anthropic-ai/sdk",
|
|
369
|
+
"go": "github.com/anthropics/anthropic-sdk-go"
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/ailib-official/ai-protocol/main/schemas/v2/provider.json",
|
|
3
|
+
"id": "cohere",
|
|
4
|
+
"protocol_version": "2.0",
|
|
5
|
+
"name": "Cohere",
|
|
6
|
+
"version": "v2",
|
|
7
|
+
"status": "stable",
|
|
8
|
+
"category": "ai_provider",
|
|
9
|
+
"official_url": "https://docs.cohere.com",
|
|
10
|
+
"support_contact": "https://cohere.com/contact",
|
|
11
|
+
"endpoint": {
|
|
12
|
+
"base_url": "https://api.cohere.com/v2",
|
|
13
|
+
"chat": "/chat",
|
|
14
|
+
"rerank": "/rerank",
|
|
15
|
+
"auth": {
|
|
16
|
+
"type": "bearer",
|
|
17
|
+
"header": "Authorization",
|
|
18
|
+
"prefix": "Bearer",
|
|
19
|
+
"token_env": "COHERE_API_KEY"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"error_classification": {
|
|
23
|
+
"by_http_status": {
|
|
24
|
+
"400": "invalid_request",
|
|
25
|
+
"401": "authentication",
|
|
26
|
+
"403": "permission_denied",
|
|
27
|
+
"404": "not_found",
|
|
28
|
+
"422": "invalid_request",
|
|
29
|
+
"429": "rate_limited",
|
|
30
|
+
"500": "server_error",
|
|
31
|
+
"503": "overloaded"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"capabilities": {
|
|
35
|
+
"required": [
|
|
36
|
+
"text",
|
|
37
|
+
"streaming",
|
|
38
|
+
"tools"
|
|
39
|
+
],
|
|
40
|
+
"optional": [
|
|
41
|
+
"agentic",
|
|
42
|
+
"rerank"
|
|
43
|
+
],
|
|
44
|
+
"feature_flags": {
|
|
45
|
+
"structured_output": true,
|
|
46
|
+
"system_messages": true
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"capability_profile": {
|
|
50
|
+
"phase": "ios_v1",
|
|
51
|
+
"inputs": {
|
|
52
|
+
"modalities": [
|
|
53
|
+
"text"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"outcomes": {
|
|
57
|
+
"types": [
|
|
58
|
+
"text_completion",
|
|
59
|
+
"structured_json",
|
|
60
|
+
"tool_call_sequence"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"systems": {
|
|
64
|
+
"requires": [
|
|
65
|
+
"mcp",
|
|
66
|
+
"search"
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"parameters": {
|
|
71
|
+
"temperature": {
|
|
72
|
+
"type": "float",
|
|
73
|
+
"range": [
|
|
74
|
+
0,
|
|
75
|
+
1
|
|
76
|
+
],
|
|
77
|
+
"default": 0.3
|
|
78
|
+
},
|
|
79
|
+
"max_tokens": {
|
|
80
|
+
"type": "integer",
|
|
81
|
+
"min": 1
|
|
82
|
+
},
|
|
83
|
+
"stream": {
|
|
84
|
+
"type": "boolean"
|
|
85
|
+
},
|
|
86
|
+
"top_n": {
|
|
87
|
+
"type": "integer",
|
|
88
|
+
"min": 1
|
|
89
|
+
},
|
|
90
|
+
"max_tokens_per_doc": {
|
|
91
|
+
"type": "integer",
|
|
92
|
+
"default": 4096
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"streaming": {
|
|
96
|
+
"decoder": {
|
|
97
|
+
"format": "sse",
|
|
98
|
+
"strategy": "cohere_v2"
|
|
99
|
+
},
|
|
100
|
+
"event_map": []
|
|
101
|
+
},
|
|
102
|
+
"metadata": {
|
|
103
|
+
"rerank_models": [
|
|
104
|
+
"rerank-v3.5",
|
|
105
|
+
"rerank-english-v3.0",
|
|
106
|
+
"rerank-multilingual-v3.0"
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
}
|