@psnext/slingcli 2.5.20260623-1 → 2.5.20260629-1
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/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +5 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +2 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +51 -47
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +9 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +9 -6
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare.js +0 -18
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +6 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +6 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +15 -25
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +30 -26
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +189 -204
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +24 -21
- package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +2 -5
- package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +11 -2
- package/node_modules/@earendil-works/pi-ai/dist/auth/helpers.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +19 -4
- package/node_modules/@earendil-works/pi-ai/dist/compat.js +81 -7
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +45 -0
- package/node_modules/@earendil-works/pi-ai/dist/images-models.js +7 -3
- package/node_modules/@earendil-works/pi-ai/dist/index.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/legacy-api-aliases.js +49 -0
- package/node_modules/@earendil-works/pi-ai/dist/models.js +7 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.js +25 -8
- package/node_modules/@earendil-works/pi-ai/dist/providers/ant-ling.models.js +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.js +0 -34
- package/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.js +21 -9
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-auth.js +85 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.models.js +13 -13
- package/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.models.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +1 -20
- package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.js +19 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/huggingface.models.js +72 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/minimax-cn.models.js +4 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/minimax.models.js +4 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.js +19 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.js +11 -11
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.js +15 -15
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js +310 -39
- package/node_modules/@earendil-works/pi-ai/dist/providers/together.models.js +37 -18
- package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.js +349 -77
- package/node_modules/@earendil-works/pi-ai/dist/providers/xai.models.js +7 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.models.js +6 -6
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai.models.js +6 -6
- package/node_modules/@earendil-works/pi-ai/dist/utils/estimate.js +95 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/headers.js +10 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +86 -0
- package/node_modules/@earendil-works/pi-ai/package.json +1 -33
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/file-processor.js +13 -25
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +15 -30
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js +6 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js +5 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js +2 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js +9 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js +11 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/timings.js +24 -14
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js +12 -25
- package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +20 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/assistant-message.js +9 -9
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/extension-editor.js +12 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/session-selector.js +14 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/user-message.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +37 -25
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.js +14 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +16 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/rpc-entry.js +10 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-convert.js +21 -15
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-process.js +83 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/mime.js +41 -0
- package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +12 -12
- package/node_modules/@earendil-works/pi-coding-agent/package.json +8 -5
- package/node_modules/@earendil-works/pi-orchestrator/dist/cli.js +136 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/config.js +55 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/handler.js +105 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/index.js +11 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/ipc/client.js +56 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/ipc/protocol.js +12 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/ipc/server.js +145 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/radius.js +365 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/rpc-process.js +168 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/serve.js +70 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/storage.js +58 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/supervisor.js +290 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/types.js +2 -0
- package/node_modules/@earendil-works/pi-orchestrator/package.json +45 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +3 -0
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/diagnostics_channel.d.ts +17 -20
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/brace-expansion/dist/commonjs/index.js +24 -14
- package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -1
- package/node_modules/brace-expansion/dist/esm/index.js +24 -14
- package/node_modules/brace-expansion/dist/esm/index.js.map +1 -1
- package/node_modules/brace-expansion/package.json +2 -2
- package/node_modules/google-auth-library/build/src/auth/googleauth.js +1 -1
- package/node_modules/google-auth-library/package.json +4 -4
- package/package.json +7 -6
- package/slingshot/index.js +302 -304
- package/node_modules/@earendil-works/pi-ai/dist/api-registry.js +0 -44
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { anthropicMessagesApi } from "../api/anthropic-messages.lazy.js";
|
|
2
2
|
import { openAICompletionsApi } from "../api/openai-completions.lazy.js";
|
|
3
3
|
import { openAIResponsesApi } from "../api/openai-responses.lazy.js";
|
|
4
|
-
import { envApiKeyAuth } from "../auth/helpers.js";
|
|
5
4
|
import { createProvider } from "../models.js";
|
|
6
5
|
import { CLOUDFLARE_AI_GATEWAY_MODELS } from "./cloudflare-ai-gateway.models.js";
|
|
6
|
+
import { cloudflareAIGatewayAuth } from "./cloudflare-auth.js";
|
|
7
7
|
export function cloudflareAIGatewayProvider() {
|
|
8
8
|
return createProvider({
|
|
9
9
|
id: "cloudflare-ai-gateway",
|
|
10
10
|
name: "Cloudflare AI Gateway",
|
|
11
|
-
auth: { apiKey:
|
|
11
|
+
auth: { apiKey: cloudflareAIGatewayAuth() },
|
|
12
12
|
models: Object.values(CLOUDFLARE_AI_GATEWAY_MODELS),
|
|
13
13
|
api: {
|
|
14
14
|
"anthropic-messages": anthropicMessagesApi(),
|
|
@@ -7,6 +7,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
7
7
|
api: "anthropic-messages",
|
|
8
8
|
provider: "cloudflare-ai-gateway",
|
|
9
9
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
|
10
|
+
compat: { "sendSessionAffinityHeaders": true },
|
|
10
11
|
reasoning: false,
|
|
11
12
|
input: ["text", "image"],
|
|
12
13
|
cost: {
|
|
@@ -24,6 +25,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
24
25
|
api: "anthropic-messages",
|
|
25
26
|
provider: "cloudflare-ai-gateway",
|
|
26
27
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
|
28
|
+
compat: { "sendSessionAffinityHeaders": true },
|
|
27
29
|
reasoning: false,
|
|
28
30
|
input: ["text", "image"],
|
|
29
31
|
cost: {
|
|
@@ -41,6 +43,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
41
43
|
api: "anthropic-messages",
|
|
42
44
|
provider: "cloudflare-ai-gateway",
|
|
43
45
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
|
46
|
+
compat: { "sendSessionAffinityHeaders": true },
|
|
44
47
|
reasoning: false,
|
|
45
48
|
input: ["text", "image"],
|
|
46
49
|
cost: {
|
|
@@ -58,6 +61,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
58
61
|
api: "anthropic-messages",
|
|
59
62
|
provider: "cloudflare-ai-gateway",
|
|
60
63
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
|
64
|
+
compat: { "sendSessionAffinityHeaders": true },
|
|
61
65
|
reasoning: false,
|
|
62
66
|
input: ["text", "image"],
|
|
63
67
|
cost: {
|
|
@@ -75,6 +79,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
75
79
|
api: "anthropic-messages",
|
|
76
80
|
provider: "cloudflare-ai-gateway",
|
|
77
81
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
|
82
|
+
compat: { "sendSessionAffinityHeaders": true },
|
|
78
83
|
reasoning: false,
|
|
79
84
|
input: ["text", "image"],
|
|
80
85
|
cost: {
|
|
@@ -92,6 +97,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
92
97
|
api: "anthropic-messages",
|
|
93
98
|
provider: "cloudflare-ai-gateway",
|
|
94
99
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
|
100
|
+
compat: { "sendSessionAffinityHeaders": true },
|
|
95
101
|
reasoning: false,
|
|
96
102
|
input: ["text", "image"],
|
|
97
103
|
cost: {
|
|
@@ -109,7 +115,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
109
115
|
api: "anthropic-messages",
|
|
110
116
|
provider: "cloudflare-ai-gateway",
|
|
111
117
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
|
112
|
-
compat: { "forceAdaptiveThinking": true },
|
|
118
|
+
compat: { "sendSessionAffinityHeaders": true, "forceAdaptiveThinking": true },
|
|
113
119
|
reasoning: true,
|
|
114
120
|
thinkingLevelMap: { "off": null, "xhigh": "xhigh" },
|
|
115
121
|
input: ["text", "image"],
|
|
@@ -128,6 +134,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
128
134
|
api: "anthropic-messages",
|
|
129
135
|
provider: "cloudflare-ai-gateway",
|
|
130
136
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
|
137
|
+
compat: { "sendSessionAffinityHeaders": true },
|
|
131
138
|
reasoning: true,
|
|
132
139
|
input: ["text", "image"],
|
|
133
140
|
cost: {
|
|
@@ -145,6 +152,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
145
152
|
api: "anthropic-messages",
|
|
146
153
|
provider: "cloudflare-ai-gateway",
|
|
147
154
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
|
155
|
+
compat: { "sendSessionAffinityHeaders": true },
|
|
148
156
|
reasoning: true,
|
|
149
157
|
input: ["text", "image"],
|
|
150
158
|
cost: {
|
|
@@ -162,6 +170,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
162
170
|
api: "anthropic-messages",
|
|
163
171
|
provider: "cloudflare-ai-gateway",
|
|
164
172
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
|
173
|
+
compat: { "sendSessionAffinityHeaders": true },
|
|
165
174
|
reasoning: true,
|
|
166
175
|
input: ["text", "image"],
|
|
167
176
|
cost: {
|
|
@@ -179,6 +188,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
179
188
|
api: "anthropic-messages",
|
|
180
189
|
provider: "cloudflare-ai-gateway",
|
|
181
190
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
|
191
|
+
compat: { "sendSessionAffinityHeaders": true },
|
|
182
192
|
reasoning: true,
|
|
183
193
|
input: ["text", "image"],
|
|
184
194
|
cost: {
|
|
@@ -196,7 +206,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
196
206
|
api: "anthropic-messages",
|
|
197
207
|
provider: "cloudflare-ai-gateway",
|
|
198
208
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
|
199
|
-
compat: { "forceAdaptiveThinking": true },
|
|
209
|
+
compat: { "sendSessionAffinityHeaders": true, "forceAdaptiveThinking": true },
|
|
200
210
|
reasoning: true,
|
|
201
211
|
thinkingLevelMap: { "xhigh": "max" },
|
|
202
212
|
input: ["text", "image"],
|
|
@@ -215,7 +225,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
215
225
|
api: "anthropic-messages",
|
|
216
226
|
provider: "cloudflare-ai-gateway",
|
|
217
227
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
|
218
|
-
compat: { "forceAdaptiveThinking": true, "supportsTemperature": false },
|
|
228
|
+
compat: { "sendSessionAffinityHeaders": true, "forceAdaptiveThinking": true, "supportsTemperature": false },
|
|
219
229
|
reasoning: true,
|
|
220
230
|
thinkingLevelMap: { "xhigh": "xhigh" },
|
|
221
231
|
input: ["text", "image"],
|
|
@@ -234,7 +244,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
234
244
|
api: "anthropic-messages",
|
|
235
245
|
provider: "cloudflare-ai-gateway",
|
|
236
246
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
|
237
|
-
compat: { "forceAdaptiveThinking": true, "supportsTemperature": false },
|
|
247
|
+
compat: { "sendSessionAffinityHeaders": true, "forceAdaptiveThinking": true, "supportsTemperature": false },
|
|
238
248
|
reasoning: true,
|
|
239
249
|
thinkingLevelMap: { "xhigh": "xhigh" },
|
|
240
250
|
input: ["text", "image"],
|
|
@@ -253,6 +263,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
253
263
|
api: "anthropic-messages",
|
|
254
264
|
provider: "cloudflare-ai-gateway",
|
|
255
265
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
|
266
|
+
compat: { "sendSessionAffinityHeaders": true },
|
|
256
267
|
reasoning: true,
|
|
257
268
|
input: ["text", "image"],
|
|
258
269
|
cost: {
|
|
@@ -270,6 +281,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
270
281
|
api: "anthropic-messages",
|
|
271
282
|
provider: "cloudflare-ai-gateway",
|
|
272
283
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
|
284
|
+
compat: { "sendSessionAffinityHeaders": true },
|
|
273
285
|
reasoning: true,
|
|
274
286
|
input: ["text", "image"],
|
|
275
287
|
cost: {
|
|
@@ -287,7 +299,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
287
299
|
api: "anthropic-messages",
|
|
288
300
|
provider: "cloudflare-ai-gateway",
|
|
289
301
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",
|
|
290
|
-
compat: { "forceAdaptiveThinking": true },
|
|
302
|
+
compat: { "sendSessionAffinityHeaders": true, "forceAdaptiveThinking": true },
|
|
291
303
|
reasoning: true,
|
|
292
304
|
input: ["text", "image"],
|
|
293
305
|
cost: {
|
|
@@ -584,7 +596,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
584
596
|
api: "openai-completions",
|
|
585
597
|
provider: "cloudflare-ai-gateway",
|
|
586
598
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/compat",
|
|
587
|
-
compat: { "sendSessionAffinityHeaders": true },
|
|
599
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsReasoningEffort": false, "maxTokensField": "max_tokens", "supportsStrictMode": false, "supportsLongCacheRetention": false, "sendSessionAffinityHeaders": true },
|
|
588
600
|
reasoning: true,
|
|
589
601
|
input: ["text", "image"],
|
|
590
602
|
cost: {
|
|
@@ -602,7 +614,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
602
614
|
api: "openai-completions",
|
|
603
615
|
provider: "cloudflare-ai-gateway",
|
|
604
616
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/compat",
|
|
605
|
-
compat: { "sendSessionAffinityHeaders": true },
|
|
617
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsReasoningEffort": false, "maxTokensField": "max_tokens", "supportsStrictMode": false, "supportsLongCacheRetention": false, "sendSessionAffinityHeaders": true },
|
|
606
618
|
reasoning: true,
|
|
607
619
|
input: ["text", "image"],
|
|
608
620
|
cost: {
|
|
@@ -620,7 +632,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
620
632
|
api: "openai-completions",
|
|
621
633
|
provider: "cloudflare-ai-gateway",
|
|
622
634
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/compat",
|
|
623
|
-
compat: { "sendSessionAffinityHeaders": true },
|
|
635
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsReasoningEffort": false, "maxTokensField": "max_tokens", "supportsStrictMode": false, "supportsLongCacheRetention": false, "sendSessionAffinityHeaders": true },
|
|
624
636
|
reasoning: true,
|
|
625
637
|
input: ["text"],
|
|
626
638
|
cost: {
|
|
@@ -638,7 +650,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
|
|
|
638
650
|
api: "openai-completions",
|
|
639
651
|
provider: "cloudflare-ai-gateway",
|
|
640
652
|
baseUrl: "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/compat",
|
|
641
|
-
compat: { "sendSessionAffinityHeaders": true },
|
|
653
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsReasoningEffort": false, "maxTokensField": "max_tokens", "supportsStrictMode": false, "supportsLongCacheRetention": false, "sendSessionAffinityHeaders": true },
|
|
642
654
|
reasoning: true,
|
|
643
655
|
input: ["text"],
|
|
644
656
|
cost: {
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
const CLOUDFLARE_API_KEY = "CLOUDFLARE_API_KEY";
|
|
2
|
+
const CLOUDFLARE_ACCOUNT_ID = "CLOUDFLARE_ACCOUNT_ID";
|
|
3
|
+
const CLOUDFLARE_GATEWAY_ID = "CLOUDFLARE_GATEWAY_ID";
|
|
4
|
+
async function resolveValue(name, ctx, credential) {
|
|
5
|
+
if (credential) {
|
|
6
|
+
if (name === CLOUDFLARE_API_KEY)
|
|
7
|
+
return credential.key;
|
|
8
|
+
return credential.env?.[name];
|
|
9
|
+
}
|
|
10
|
+
return ctx.env(name);
|
|
11
|
+
}
|
|
12
|
+
function resolveCloudflareBaseUrl(model, accountId, gatewayId) {
|
|
13
|
+
return model.baseUrl
|
|
14
|
+
.replaceAll(`{${CLOUDFLARE_ACCOUNT_ID}}`, accountId)
|
|
15
|
+
.replaceAll(`{${CLOUDFLARE_GATEWAY_ID}}`, gatewayId ?? "");
|
|
16
|
+
}
|
|
17
|
+
async function resolveCloudflareEnv(kind, model, ctx, credential) {
|
|
18
|
+
const apiKey = await resolveValue(CLOUDFLARE_API_KEY, ctx, credential);
|
|
19
|
+
const accountId = await resolveValue(CLOUDFLARE_ACCOUNT_ID, ctx, credential);
|
|
20
|
+
const gatewayId = kind === "ai-gateway" ? await resolveValue(CLOUDFLARE_GATEWAY_ID, ctx, credential) : undefined;
|
|
21
|
+
if (!apiKey || !accountId || (kind === "ai-gateway" && !gatewayId))
|
|
22
|
+
return undefined;
|
|
23
|
+
return {
|
|
24
|
+
apiKey,
|
|
25
|
+
env: {
|
|
26
|
+
CLOUDFLARE_ACCOUNT_ID: accountId,
|
|
27
|
+
...(gatewayId ? { CLOUDFLARE_GATEWAY_ID: gatewayId } : {}),
|
|
28
|
+
},
|
|
29
|
+
baseUrl: resolveCloudflareBaseUrl(model, accountId, gatewayId),
|
|
30
|
+
source: credential ? "stored credential" : CLOUDFLARE_API_KEY,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function cloudflareWorkersAIAuth() {
|
|
34
|
+
return {
|
|
35
|
+
name: "Cloudflare API key",
|
|
36
|
+
login: async (callbacks) => {
|
|
37
|
+
const key = await callbacks.prompt({ type: "secret", message: "Enter Cloudflare API key" });
|
|
38
|
+
const accountId = await callbacks.prompt({ type: "text", message: "Enter Cloudflare account ID" });
|
|
39
|
+
return { type: "api_key", key, env: { CLOUDFLARE_ACCOUNT_ID: accountId } };
|
|
40
|
+
},
|
|
41
|
+
resolve: async ({ model, ctx, credential }) => {
|
|
42
|
+
const resolved = await resolveCloudflareEnv("workers-ai", model, ctx, credential);
|
|
43
|
+
if (!resolved)
|
|
44
|
+
return undefined;
|
|
45
|
+
return {
|
|
46
|
+
auth: { apiKey: resolved.apiKey, baseUrl: resolved.baseUrl },
|
|
47
|
+
env: resolved.env,
|
|
48
|
+
source: resolved.source,
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export function cloudflareAIGatewayAuth() {
|
|
54
|
+
return {
|
|
55
|
+
name: "Cloudflare API key",
|
|
56
|
+
login: async (callbacks) => {
|
|
57
|
+
const key = await callbacks.prompt({ type: "secret", message: "Enter Cloudflare API key" });
|
|
58
|
+
const accountId = await callbacks.prompt({ type: "text", message: "Enter Cloudflare account ID" });
|
|
59
|
+
const gatewayId = await callbacks.prompt({ type: "text", message: "Enter Cloudflare AI Gateway ID" });
|
|
60
|
+
return {
|
|
61
|
+
type: "api_key",
|
|
62
|
+
key,
|
|
63
|
+
env: { CLOUDFLARE_ACCOUNT_ID: accountId, CLOUDFLARE_GATEWAY_ID: gatewayId },
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
resolve: async ({ model, ctx, credential }) => {
|
|
67
|
+
const resolved = await resolveCloudflareEnv("ai-gateway", model, ctx, credential);
|
|
68
|
+
if (!resolved)
|
|
69
|
+
return undefined;
|
|
70
|
+
return {
|
|
71
|
+
auth: {
|
|
72
|
+
headers: {
|
|
73
|
+
"cf-aig-authorization": `Bearer ${resolved.apiKey}`,
|
|
74
|
+
Authorization: null,
|
|
75
|
+
"x-api-key": null,
|
|
76
|
+
},
|
|
77
|
+
baseUrl: resolved.baseUrl,
|
|
78
|
+
},
|
|
79
|
+
env: resolved.env,
|
|
80
|
+
source: resolved.source,
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=cloudflare-auth.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { openAICompletionsApi } from "../api/openai-completions.lazy.js";
|
|
2
|
-
import { envApiKeyAuth } from "../auth/helpers.js";
|
|
3
2
|
import { createProvider } from "../models.js";
|
|
3
|
+
import { cloudflareWorkersAIAuth } from "./cloudflare-auth.js";
|
|
4
4
|
import { CLOUDFLARE_WORKERS_AI_MODELS } from "./cloudflare-workers-ai.models.js";
|
|
5
5
|
export function cloudflareWorkersAIProvider() {
|
|
6
6
|
return createProvider({
|
|
7
7
|
id: "cloudflare-workers-ai",
|
|
8
8
|
name: "Cloudflare Workers AI",
|
|
9
|
-
auth: { apiKey:
|
|
9
|
+
auth: { apiKey: cloudflareWorkersAIAuth() },
|
|
10
10
|
models: Object.values(CLOUDFLARE_WORKERS_AI_MODELS),
|
|
11
11
|
api: openAICompletionsApi(),
|
|
12
12
|
});
|
|
@@ -7,7 +7,7 @@ export const CLOUDFLARE_WORKERS_AI_MODELS = {
|
|
|
7
7
|
api: "openai-completions",
|
|
8
8
|
provider: "cloudflare-workers-ai",
|
|
9
9
|
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
|
10
|
-
compat: { "sendSessionAffinityHeaders": true },
|
|
10
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsLongCacheRetention": false, "sendSessionAffinityHeaders": true },
|
|
11
11
|
reasoning: true,
|
|
12
12
|
input: ["text", "image"],
|
|
13
13
|
cost: {
|
|
@@ -25,7 +25,7 @@ export const CLOUDFLARE_WORKERS_AI_MODELS = {
|
|
|
25
25
|
api: "openai-completions",
|
|
26
26
|
provider: "cloudflare-workers-ai",
|
|
27
27
|
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
|
28
|
-
compat: { "sendSessionAffinityHeaders": true },
|
|
28
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsLongCacheRetention": false, "sendSessionAffinityHeaders": true },
|
|
29
29
|
reasoning: false,
|
|
30
30
|
input: ["text"],
|
|
31
31
|
cost: {
|
|
@@ -43,7 +43,7 @@ export const CLOUDFLARE_WORKERS_AI_MODELS = {
|
|
|
43
43
|
api: "openai-completions",
|
|
44
44
|
provider: "cloudflare-workers-ai",
|
|
45
45
|
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
|
46
|
-
compat: { "sendSessionAffinityHeaders": true },
|
|
46
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsLongCacheRetention": false, "sendSessionAffinityHeaders": true },
|
|
47
47
|
reasoning: false,
|
|
48
48
|
input: ["text"],
|
|
49
49
|
cost: {
|
|
@@ -61,7 +61,7 @@ export const CLOUDFLARE_WORKERS_AI_MODELS = {
|
|
|
61
61
|
api: "openai-completions",
|
|
62
62
|
provider: "cloudflare-workers-ai",
|
|
63
63
|
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
|
64
|
-
compat: { "sendSessionAffinityHeaders": true },
|
|
64
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsLongCacheRetention": false, "sendSessionAffinityHeaders": true },
|
|
65
65
|
reasoning: false,
|
|
66
66
|
input: ["text", "image"],
|
|
67
67
|
cost: {
|
|
@@ -79,7 +79,7 @@ export const CLOUDFLARE_WORKERS_AI_MODELS = {
|
|
|
79
79
|
api: "openai-completions",
|
|
80
80
|
provider: "cloudflare-workers-ai",
|
|
81
81
|
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
|
82
|
-
compat: { "sendSessionAffinityHeaders": true },
|
|
82
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsLongCacheRetention": false, "sendSessionAffinityHeaders": true },
|
|
83
83
|
reasoning: false,
|
|
84
84
|
input: ["text"],
|
|
85
85
|
cost: {
|
|
@@ -97,7 +97,7 @@ export const CLOUDFLARE_WORKERS_AI_MODELS = {
|
|
|
97
97
|
api: "openai-completions",
|
|
98
98
|
provider: "cloudflare-workers-ai",
|
|
99
99
|
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
|
100
|
-
compat: { "sendSessionAffinityHeaders": true },
|
|
100
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsLongCacheRetention": false, "sendSessionAffinityHeaders": true },
|
|
101
101
|
reasoning: true,
|
|
102
102
|
input: ["text", "image"],
|
|
103
103
|
cost: {
|
|
@@ -115,7 +115,7 @@ export const CLOUDFLARE_WORKERS_AI_MODELS = {
|
|
|
115
115
|
api: "openai-completions",
|
|
116
116
|
provider: "cloudflare-workers-ai",
|
|
117
117
|
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
|
118
|
-
compat: { "sendSessionAffinityHeaders": true },
|
|
118
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsLongCacheRetention": false, "sendSessionAffinityHeaders": true },
|
|
119
119
|
reasoning: true,
|
|
120
120
|
input: ["text", "image"],
|
|
121
121
|
cost: {
|
|
@@ -133,7 +133,7 @@ export const CLOUDFLARE_WORKERS_AI_MODELS = {
|
|
|
133
133
|
api: "openai-completions",
|
|
134
134
|
provider: "cloudflare-workers-ai",
|
|
135
135
|
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
|
136
|
-
compat: { "sendSessionAffinityHeaders": true },
|
|
136
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsLongCacheRetention": false, "sendSessionAffinityHeaders": true },
|
|
137
137
|
reasoning: true,
|
|
138
138
|
input: ["text"],
|
|
139
139
|
cost: {
|
|
@@ -151,7 +151,7 @@ export const CLOUDFLARE_WORKERS_AI_MODELS = {
|
|
|
151
151
|
api: "openai-completions",
|
|
152
152
|
provider: "cloudflare-workers-ai",
|
|
153
153
|
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
|
154
|
-
compat: { "sendSessionAffinityHeaders": true },
|
|
154
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsLongCacheRetention": false, "sendSessionAffinityHeaders": true },
|
|
155
155
|
reasoning: true,
|
|
156
156
|
input: ["text"],
|
|
157
157
|
cost: {
|
|
@@ -169,7 +169,7 @@ export const CLOUDFLARE_WORKERS_AI_MODELS = {
|
|
|
169
169
|
api: "openai-completions",
|
|
170
170
|
provider: "cloudflare-workers-ai",
|
|
171
171
|
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
|
172
|
-
compat: { "sendSessionAffinityHeaders": true },
|
|
172
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsLongCacheRetention": false, "sendSessionAffinityHeaders": true },
|
|
173
173
|
reasoning: true,
|
|
174
174
|
input: ["text"],
|
|
175
175
|
cost: {
|
|
@@ -187,7 +187,7 @@ export const CLOUDFLARE_WORKERS_AI_MODELS = {
|
|
|
187
187
|
api: "openai-completions",
|
|
188
188
|
provider: "cloudflare-workers-ai",
|
|
189
189
|
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
|
190
|
-
compat: { "sendSessionAffinityHeaders": true },
|
|
190
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsLongCacheRetention": false, "sendSessionAffinityHeaders": true },
|
|
191
191
|
reasoning: true,
|
|
192
192
|
input: ["text"],
|
|
193
193
|
cost: {
|
|
@@ -205,7 +205,7 @@ export const CLOUDFLARE_WORKERS_AI_MODELS = {
|
|
|
205
205
|
api: "openai-completions",
|
|
206
206
|
provider: "cloudflare-workers-ai",
|
|
207
207
|
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
|
208
|
-
compat: { "sendSessionAffinityHeaders": true },
|
|
208
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsLongCacheRetention": false, "sendSessionAffinityHeaders": true },
|
|
209
209
|
reasoning: true,
|
|
210
210
|
input: ["text"],
|
|
211
211
|
cost: {
|
|
@@ -223,7 +223,7 @@ export const CLOUDFLARE_WORKERS_AI_MODELS = {
|
|
|
223
223
|
api: "openai-completions",
|
|
224
224
|
provider: "cloudflare-workers-ai",
|
|
225
225
|
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",
|
|
226
|
-
compat: { "sendSessionAffinityHeaders": true },
|
|
226
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsLongCacheRetention": false, "sendSessionAffinityHeaders": true },
|
|
227
227
|
reasoning: true,
|
|
228
228
|
input: ["text"],
|
|
229
229
|
cost: {
|
|
@@ -7,7 +7,7 @@ export const DEEPSEEK_MODELS = {
|
|
|
7
7
|
api: "openai-completions",
|
|
8
8
|
provider: "deepseek",
|
|
9
9
|
baseUrl: "https://api.deepseek.com",
|
|
10
|
-
compat: { "requiresReasoningContentOnAssistantMessages": true, "thinkingFormat": "deepseek" },
|
|
10
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "requiresReasoningContentOnAssistantMessages": true, "thinkingFormat": "deepseek" },
|
|
11
11
|
reasoning: true,
|
|
12
12
|
thinkingLevelMap: { "minimal": null, "low": null, "medium": null, "high": "high", "xhigh": "max" },
|
|
13
13
|
input: ["text"],
|
|
@@ -26,7 +26,7 @@ export const DEEPSEEK_MODELS = {
|
|
|
26
26
|
api: "openai-completions",
|
|
27
27
|
provider: "deepseek",
|
|
28
28
|
baseUrl: "https://api.deepseek.com",
|
|
29
|
-
compat: { "requiresReasoningContentOnAssistantMessages": true, "thinkingFormat": "deepseek" },
|
|
29
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "requiresReasoningContentOnAssistantMessages": true, "thinkingFormat": "deepseek" },
|
|
30
30
|
reasoning: true,
|
|
31
31
|
thinkingLevelMap: { "minimal": null, "low": null, "medium": null, "high": "high", "xhigh": "max" },
|
|
32
32
|
input: ["text"],
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { registerApiProvider, unregisterApiProviders } from "../api-registry.js";
|
|
2
1
|
import { createProvider } from "../models.js";
|
|
3
2
|
import { createAssistantMessageEventStream } from "../utils/event-stream.js";
|
|
4
3
|
const DEFAULT_API = "faux";
|
|
@@ -277,7 +276,7 @@ async function streamWithDeltas(stream, message, minTokenSize, maxTokenSize, tok
|
|
|
277
276
|
stream.push({ type: "done", reason: message.stopReason, message });
|
|
278
277
|
stream.end(message);
|
|
279
278
|
}
|
|
280
|
-
function createFauxCore(options) {
|
|
279
|
+
export function createFauxCore(options) {
|
|
281
280
|
const api = options.api ?? randomId(DEFAULT_API);
|
|
282
281
|
const provider = options.provider ?? DEFAULT_PROVIDER;
|
|
283
282
|
const minTokenSize = Math.max(1, Math.min(options.tokenSize?.min ?? DEFAULT_MIN_TOKEN_SIZE, options.tokenSize?.max ?? DEFAULT_MAX_TOKEN_SIZE));
|
|
@@ -364,24 +363,6 @@ function createFauxCore(options) {
|
|
|
364
363
|
},
|
|
365
364
|
};
|
|
366
365
|
}
|
|
367
|
-
/** Registers the faux api into the legacy global api-registry. */
|
|
368
|
-
export function registerFauxProvider(options = {}) {
|
|
369
|
-
const core = createFauxCore(options);
|
|
370
|
-
const sourceId = randomId("faux-provider");
|
|
371
|
-
registerApiProvider({ api: core.api, stream: core.stream, streamSimple: core.streamSimple }, sourceId);
|
|
372
|
-
return {
|
|
373
|
-
api: core.api,
|
|
374
|
-
models: core.models,
|
|
375
|
-
getModel: core.getModel,
|
|
376
|
-
state: core.state,
|
|
377
|
-
setResponses: core.setResponses,
|
|
378
|
-
appendResponses: core.appendResponses,
|
|
379
|
-
getPendingResponseCount: core.getPendingResponseCount,
|
|
380
|
-
unregister() {
|
|
381
|
-
unregisterApiProviders(sourceId);
|
|
382
|
-
},
|
|
383
|
-
};
|
|
384
|
-
}
|
|
385
366
|
/**
|
|
386
367
|
* Faux provider for tests built on explicit `Models` collections:
|
|
387
368
|
*
|
|
@@ -71,7 +71,7 @@ export const FIREWORKS_MODELS = {
|
|
|
71
71
|
cacheRead: 0.26,
|
|
72
72
|
cacheWrite: 0,
|
|
73
73
|
},
|
|
74
|
-
contextWindow:
|
|
74
|
+
contextWindow: 1048575,
|
|
75
75
|
maxTokens: 131072,
|
|
76
76
|
},
|
|
77
77
|
"accounts/fireworks/models/gpt-oss-120b": {
|
|
@@ -218,6 +218,24 @@ export const FIREWORKS_MODELS = {
|
|
|
218
218
|
contextWindow: 202800,
|
|
219
219
|
maxTokens: 131072,
|
|
220
220
|
},
|
|
221
|
+
"accounts/fireworks/routers/glm-5p2-fast": {
|
|
222
|
+
id: "accounts/fireworks/routers/glm-5p2-fast",
|
|
223
|
+
name: "GLM 5.2 Fast",
|
|
224
|
+
api: "anthropic-messages",
|
|
225
|
+
provider: "fireworks",
|
|
226
|
+
baseUrl: "https://api.fireworks.ai/inference",
|
|
227
|
+
compat: { "sendSessionAffinityHeaders": true, "supportsEagerToolInputStreaming": false, "supportsCacheControlOnTools": false, "supportsLongCacheRetention": false },
|
|
228
|
+
reasoning: true,
|
|
229
|
+
input: ["text"],
|
|
230
|
+
cost: {
|
|
231
|
+
input: 2.1,
|
|
232
|
+
output: 6.6,
|
|
233
|
+
cacheRead: 0.21,
|
|
234
|
+
cacheWrite: 0,
|
|
235
|
+
},
|
|
236
|
+
contextWindow: 1048575,
|
|
237
|
+
maxTokens: 131072,
|
|
238
|
+
},
|
|
221
239
|
"accounts/fireworks/routers/kimi-k2p6-fast": {
|
|
222
240
|
id: "accounts/fireworks/routers/kimi-k2p6-fast",
|
|
223
241
|
name: "Kimi K2.6 Fast",
|
|
@@ -325,6 +325,24 @@ export const HUGGINGFACE_MODELS = {
|
|
|
325
325
|
contextWindow: 262144,
|
|
326
326
|
maxTokens: 65536,
|
|
327
327
|
},
|
|
328
|
+
"Qwen/Qwen3.6-27B": {
|
|
329
|
+
id: "Qwen/Qwen3.6-27B",
|
|
330
|
+
name: "Qwen3.6 27B",
|
|
331
|
+
api: "openai-completions",
|
|
332
|
+
provider: "huggingface",
|
|
333
|
+
baseUrl: "https://router.huggingface.co/v1",
|
|
334
|
+
compat: { "supportsDeveloperRole": false },
|
|
335
|
+
reasoning: true,
|
|
336
|
+
input: ["text", "image"],
|
|
337
|
+
cost: {
|
|
338
|
+
input: 0.47,
|
|
339
|
+
output: 3.19,
|
|
340
|
+
cacheRead: 0,
|
|
341
|
+
cacheWrite: 0,
|
|
342
|
+
},
|
|
343
|
+
contextWindow: 262144,
|
|
344
|
+
maxTokens: 65536,
|
|
345
|
+
},
|
|
328
346
|
"Qwen/Qwen3.6-35B-A3B": {
|
|
329
347
|
id: "Qwen/Qwen3.6-35B-A3B",
|
|
330
348
|
name: "Qwen3.6 35B-A3B",
|
|
@@ -361,6 +379,24 @@ export const HUGGINGFACE_MODELS = {
|
|
|
361
379
|
contextWindow: 262144,
|
|
362
380
|
maxTokens: 4096,
|
|
363
381
|
},
|
|
382
|
+
"XiaomiMiMo/MiMo-V2.5-Pro": {
|
|
383
|
+
id: "XiaomiMiMo/MiMo-V2.5-Pro",
|
|
384
|
+
name: "MiMo-V2.5-Pro",
|
|
385
|
+
api: "openai-completions",
|
|
386
|
+
provider: "huggingface",
|
|
387
|
+
baseUrl: "https://router.huggingface.co/v1",
|
|
388
|
+
compat: { "supportsDeveloperRole": false },
|
|
389
|
+
reasoning: true,
|
|
390
|
+
input: ["text"],
|
|
391
|
+
cost: {
|
|
392
|
+
input: 1,
|
|
393
|
+
output: 3,
|
|
394
|
+
cacheRead: 0,
|
|
395
|
+
cacheWrite: 0,
|
|
396
|
+
},
|
|
397
|
+
contextWindow: 1048576,
|
|
398
|
+
maxTokens: 131072,
|
|
399
|
+
},
|
|
364
400
|
"deepseek-ai/DeepSeek-R1": {
|
|
365
401
|
id: "deepseek-ai/DeepSeek-R1",
|
|
366
402
|
name: "DeepSeek-R1",
|
|
@@ -613,6 +649,24 @@ export const HUGGINGFACE_MODELS = {
|
|
|
613
649
|
contextWindow: 262144,
|
|
614
650
|
maxTokens: 262144,
|
|
615
651
|
},
|
|
652
|
+
"openai/gpt-oss-120b": {
|
|
653
|
+
id: "openai/gpt-oss-120b",
|
|
654
|
+
name: "GPT OSS 120B",
|
|
655
|
+
api: "openai-completions",
|
|
656
|
+
provider: "huggingface",
|
|
657
|
+
baseUrl: "https://router.huggingface.co/v1",
|
|
658
|
+
compat: { "supportsDeveloperRole": false },
|
|
659
|
+
reasoning: true,
|
|
660
|
+
input: ["text"],
|
|
661
|
+
cost: {
|
|
662
|
+
input: 0.25,
|
|
663
|
+
output: 0.69,
|
|
664
|
+
cacheRead: 0,
|
|
665
|
+
cacheWrite: 0,
|
|
666
|
+
},
|
|
667
|
+
contextWindow: 131072,
|
|
668
|
+
maxTokens: 32768,
|
|
669
|
+
},
|
|
616
670
|
"stepfun-ai/Step-3.5-Flash": {
|
|
617
671
|
id: "stepfun-ai/Step-3.5-Flash",
|
|
618
672
|
name: "Step 3.5 Flash",
|
|
@@ -631,6 +685,24 @@ export const HUGGINGFACE_MODELS = {
|
|
|
631
685
|
contextWindow: 262144,
|
|
632
686
|
maxTokens: 256000,
|
|
633
687
|
},
|
|
688
|
+
"stepfun-ai/Step-3.7-Flash": {
|
|
689
|
+
id: "stepfun-ai/Step-3.7-Flash",
|
|
690
|
+
name: "Step 3.7 Flash",
|
|
691
|
+
api: "openai-completions",
|
|
692
|
+
provider: "huggingface",
|
|
693
|
+
baseUrl: "https://router.huggingface.co/v1",
|
|
694
|
+
compat: { "supportsDeveloperRole": false },
|
|
695
|
+
reasoning: true,
|
|
696
|
+
input: ["text", "image"],
|
|
697
|
+
cost: {
|
|
698
|
+
input: 0.2,
|
|
699
|
+
output: 1.15,
|
|
700
|
+
cacheRead: 0,
|
|
701
|
+
cacheWrite: 0,
|
|
702
|
+
},
|
|
703
|
+
contextWindow: 262144,
|
|
704
|
+
maxTokens: 256000,
|
|
705
|
+
},
|
|
634
706
|
"zai-org/GLM-4.5": {
|
|
635
707
|
id: "zai-org/GLM-4.5",
|
|
636
708
|
name: "GLM-4.5",
|
|
@@ -44,12 +44,12 @@ export const MINIMAX_CN_MODELS = {
|
|
|
44
44
|
reasoning: true,
|
|
45
45
|
input: ["text", "image"],
|
|
46
46
|
cost: {
|
|
47
|
-
input: 0.
|
|
48
|
-
output: 2
|
|
49
|
-
cacheRead: 0.
|
|
47
|
+
input: 0.3,
|
|
48
|
+
output: 1.2,
|
|
49
|
+
cacheRead: 0.06,
|
|
50
50
|
cacheWrite: 0,
|
|
51
51
|
},
|
|
52
|
-
contextWindow:
|
|
52
|
+
contextWindow: 1000000,
|
|
53
53
|
maxTokens: 128000,
|
|
54
54
|
},
|
|
55
55
|
};
|
|
@@ -44,12 +44,12 @@ export const MINIMAX_MODELS = {
|
|
|
44
44
|
reasoning: true,
|
|
45
45
|
input: ["text", "image"],
|
|
46
46
|
cost: {
|
|
47
|
-
input: 0.
|
|
48
|
-
output: 2
|
|
49
|
-
cacheRead: 0.
|
|
47
|
+
input: 0.3,
|
|
48
|
+
output: 1.2,
|
|
49
|
+
cacheRead: 0.06,
|
|
50
50
|
cacheWrite: 0,
|
|
51
51
|
},
|
|
52
|
-
contextWindow:
|
|
52
|
+
contextWindow: 1000000,
|
|
53
53
|
maxTokens: 128000,
|
|
54
54
|
},
|
|
55
55
|
};
|
|
@@ -96,6 +96,25 @@ export const NVIDIA_MODELS = {
|
|
|
96
96
|
contextWindow: 128000,
|
|
97
97
|
maxTokens: 4096,
|
|
98
98
|
},
|
|
99
|
+
"minimaxai/minimax-m3": {
|
|
100
|
+
id: "minimaxai/minimax-m3",
|
|
101
|
+
name: "MiniMax-M3",
|
|
102
|
+
api: "openai-completions",
|
|
103
|
+
provider: "nvidia",
|
|
104
|
+
baseUrl: "https://integrate.api.nvidia.com/v1",
|
|
105
|
+
headers: { "NVCF-POLL-SECONDS": "3600" },
|
|
106
|
+
compat: { "supportsStore": false, "supportsDeveloperRole": false, "supportsReasoningEffort": false, "maxTokensField": "max_tokens", "supportsStrictMode": false, "supportsLongCacheRetention": false },
|
|
107
|
+
reasoning: true,
|
|
108
|
+
input: ["text", "image"],
|
|
109
|
+
cost: {
|
|
110
|
+
input: 0,
|
|
111
|
+
output: 0,
|
|
112
|
+
cacheRead: 0,
|
|
113
|
+
cacheWrite: 0,
|
|
114
|
+
},
|
|
115
|
+
contextWindow: 1000000,
|
|
116
|
+
maxTokens: 16384,
|
|
117
|
+
},
|
|
99
118
|
"mistralai/mistral-large-3-675b-instruct-2512": {
|
|
100
119
|
id: "mistralai/mistral-large-3-675b-instruct-2512",
|
|
101
120
|
name: "Mistral Large 3 675B Instruct 2512",
|