@code-yeongyu/senpi-ai 2026.9.30 → 2026.10.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/README.md +189 -19
- package/dist/api/anthropic-messages.js +168 -32
- package/dist/api/azure-openai-responses.js +23 -10
- package/dist/api/bedrock-converse-stream.js +12 -4
- package/dist/api/cloudflare-workers-ai-system-one.d.ts +4 -0
- package/dist/api/cloudflare-workers-ai-system-one.js +43 -0
- package/dist/api/cloudflare-workers-ai-system-one.lazy.d.ts +3 -0
- package/dist/api/cloudflare-workers-ai-system-one.lazy.js +4 -0
- package/dist/api/cloudflare.d.ts +2 -0
- package/dist/api/cloudflare.js +2 -0
- package/dist/api/context-room.d.ts +2 -2
- package/dist/api/cursor-agent.js +19 -10
- package/dist/api/devin-agent/request.d.ts +9 -9
- package/dist/api/devin-agent/request.js +14 -10
- package/dist/api/google-generative-ai.js +20 -80
- package/dist/api/google-shared.d.ts +13 -4
- package/dist/api/google-shared.js +54 -4
- package/dist/api/google-vertex.js +19 -62
- package/dist/api/llama-cpp-classify.d.ts +33 -0
- package/dist/api/llama-cpp-classify.js +365 -0
- package/dist/api/llama-cpp-classify.lazy.d.ts +3 -0
- package/dist/api/llama-cpp-classify.lazy.js +4 -0
- package/dist/api/mistral-conversations.d.ts +1 -1
- package/dist/api/mistral-conversations.js +36 -29
- package/dist/api/openai-codex-responses.d.ts +1 -1
- package/dist/api/openai-codex-responses.js +72 -37
- package/dist/api/openai-completions.d.ts +3 -2
- package/dist/api/openai-completions.js +76 -50
- package/dist/api/openai-images-params.d.ts +2 -2
- package/dist/api/openai-images.d.ts +1 -1
- package/dist/api/openai-responses-shared.d.ts +31 -8
- package/dist/api/openai-responses-shared.js +115 -27
- package/dist/api/openai-responses.d.ts +1 -1
- package/dist/api/openai-responses.js +38 -33
- package/dist/api/openrouter-images.d.ts +2 -1
- package/dist/api/openrouter-images.js +1 -0
- package/dist/api/pi-messages.d.ts +3 -3
- package/dist/api/pi-messages.js +3 -2
- package/dist/api/simple-options.d.ts +2 -2
- package/dist/api/simple-options.js +1 -0
- package/dist/api/system-one-shared.d.ts +23 -0
- package/dist/api/system-one-shared.js +183 -0
- package/dist/api/transform-messages.js +5 -2
- package/dist/api/typesafe-system-one.d.ts +4 -0
- package/dist/api/typesafe-system-one.js +19 -0
- package/dist/api/typesafe-system-one.lazy.d.ts +3 -0
- package/dist/api/typesafe-system-one.lazy.js +4 -0
- package/dist/api-registry.d.ts +3 -3
- package/dist/auth/helpers.js +1 -1
- package/dist/auth/oauth/anthropic-callback-listener.js +1 -1
- package/dist/auth/oauth/callback-server.d.ts +55 -0
- package/dist/auth/oauth/callback-server.js +146 -0
- package/dist/auth/oauth/chatgpt-subscription.d.ts +1 -1
- package/dist/auth/oauth/chatgpt-subscription.js +20 -124
- package/dist/auth/oauth/devin-callback.js +1 -1
- package/dist/auth/oauth/load.d.ts +4 -0
- package/dist/auth/oauth/load.js +10 -0
- package/dist/auth/oauth/meta.d.ts +17 -0
- package/dist/auth/oauth/meta.js +190 -0
- package/dist/auth/oauth/openai-chatgpt.d.ts +9 -0
- package/dist/auth/oauth/openai-chatgpt.js +266 -0
- package/dist/auth/oauth/openrouter.d.ts +1 -1
- package/dist/auth/oauth/openrouter.js +19 -138
- package/dist/auth/oauth/radius.d.ts +1 -1
- package/dist/auth/oauth/radius.js +21 -89
- package/dist/auth/resolve.d.ts +3 -8
- package/dist/auth/resolve.js +3 -18
- package/dist/auth/types.d.ts +10 -1
- package/dist/bun-oauth.js +4 -0
- package/dist/cli.js +3 -1
- package/dist/compat.js +17 -14
- package/dist/env-api-keys.js +2 -0
- package/dist/image-models.d.ts +19 -8
- package/dist/image-models.js +14 -13
- package/dist/images-api-registry.d.ts +8 -8
- package/dist/images.d.ts +7 -2
- package/dist/images.js +5 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/model-catalog.d.ts +27 -9
- package/dist/model-catalog.js +24 -2
- package/dist/model.d.ts +13 -13
- package/dist/models-store.d.ts +3 -2
- package/dist/models.d.ts +106 -36
- package/dist/models.generated.d.ts +142 -42
- package/dist/models.generated.js +142 -42
- package/dist/models.js +174 -36
- package/dist/providers/alibaba-token-plan.models.d.ts +4 -2
- package/dist/providers/alibaba-token-plan.models.js +4 -2
- package/dist/providers/all.d.ts +72 -19
- package/dist/providers/all.js +28 -22
- package/dist/providers/amazon-bedrock.models.d.ts +4 -2
- package/dist/providers/amazon-bedrock.models.js +4 -2
- package/dist/providers/ant-ling.models.d.ts +4 -2
- package/dist/providers/ant-ling.models.js +4 -2
- package/dist/providers/anthropic.models.d.ts +4 -2
- package/dist/providers/anthropic.models.js +4 -2
- package/dist/providers/azure-openai-responses.models.d.ts +4 -2
- package/dist/providers/azure-openai-responses.models.js +4 -2
- package/dist/providers/bai.models.d.ts +4 -2
- package/dist/providers/bai.models.js +4 -2
- package/dist/providers/baseten.models.d.ts +4 -2
- package/dist/providers/baseten.models.js +4 -2
- package/dist/providers/cerebras.models.d.ts +4 -2
- package/dist/providers/cerebras.models.js +4 -2
- package/dist/providers/chatgpt-subscription.models.d.ts +4 -2
- package/dist/providers/chatgpt-subscription.models.js +4 -2
- package/dist/providers/cloudflare-ai-gateway.models.d.ts +4 -2
- package/dist/providers/cloudflare-ai-gateway.models.js +4 -2
- package/dist/providers/cloudflare-stream.d.ts +6 -2
- package/dist/providers/cloudflare-stream.js +6 -0
- package/dist/providers/cloudflare-workers-ai.js +10 -3
- package/dist/providers/cloudflare-workers-ai.models.d.ts +4 -2
- package/dist/providers/cloudflare-workers-ai.models.js +4 -2
- package/dist/providers/data/.manifest.json +1 -1
- package/dist/providers/data/alibaba-token-plan.json +1 -1
- package/dist/providers/data/amazon-bedrock.json +1 -1
- package/dist/providers/data/ant-ling.json +1 -1
- package/dist/providers/data/anthropic.json +1 -1
- package/dist/providers/data/azure-openai-responses.json +1 -1
- package/dist/providers/data/bai.json +1 -1
- package/dist/providers/data/baseten.json +1 -1
- package/dist/providers/data/cerebras.json +1 -1
- package/dist/providers/data/chatgpt-subscription.json +1 -1
- package/dist/providers/data/cloudflare-ai-gateway.json +1 -1
- package/dist/providers/data/cloudflare-workers-ai.json +1 -1
- package/dist/providers/data/deepseek.json +1 -1
- package/dist/providers/data/fireworks.json +1 -1
- package/dist/providers/data/github-copilot.json +1 -1
- package/dist/providers/data/google-vertex.json +1 -1
- package/dist/providers/data/google.json +1 -1
- package/dist/providers/data/groq.json +1 -1
- package/dist/providers/data/huggingface.json +1 -1
- package/dist/providers/data/meta.json +1 -0
- package/dist/providers/data/minimax-cn.json +1 -1
- package/dist/providers/data/minimax.json +1 -1
- package/dist/providers/data/mistral.json +1 -1
- package/dist/providers/data/moonshotai-cn.json +1 -1
- package/dist/providers/data/moonshotai.json +1 -1
- package/dist/providers/data/nvidia.json +1 -1
- package/dist/providers/data/openai.json +1 -1
- package/dist/providers/data/opencode-go.json +1 -1
- package/dist/providers/data/opencode.json +1 -1
- package/dist/providers/data/opengateway.json +1 -1
- package/dist/providers/data/openrouter.json +1 -1
- package/dist/providers/data/qwen-token-plan-cn.json +1 -1
- package/dist/providers/data/qwen-token-plan-individual.json +1 -1
- package/dist/providers/data/qwen-token-plan.json +1 -1
- package/dist/providers/data/radius.json +1 -0
- package/dist/providers/data/together.json +1 -1
- package/dist/providers/data/typesafe.json +1 -0
- package/dist/providers/data/venice.json +1 -1
- package/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/dist/providers/data/xai.json +1 -1
- package/dist/providers/data/xiaomi-token-plan-ams.json +1 -1
- package/dist/providers/data/xiaomi-token-plan-cn.json +1 -1
- package/dist/providers/data/xiaomi-token-plan-sgp.json +1 -1
- package/dist/providers/data/xiaomi.json +1 -1
- package/dist/providers/data/zai-coding-cn.json +1 -1
- package/dist/providers/data/zai.json +1 -1
- package/dist/providers/deepseek.models.d.ts +4 -2
- package/dist/providers/deepseek.models.js +4 -2
- package/dist/providers/faux.d.ts +7 -2
- package/dist/providers/faux.js +31 -22
- package/dist/providers/fireworks.models.d.ts +4 -2
- package/dist/providers/fireworks.models.js +4 -2
- package/dist/providers/github-copilot.models.d.ts +4 -2
- package/dist/providers/github-copilot.models.js +4 -2
- package/dist/providers/google-vertex.models.d.ts +4 -2
- package/dist/providers/google-vertex.models.js +4 -2
- package/dist/providers/google.models.d.ts +4 -2
- package/dist/providers/google.models.js +4 -2
- package/dist/providers/groq.models.d.ts +4 -2
- package/dist/providers/groq.models.js +4 -2
- package/dist/providers/huggingface.models.d.ts +4 -2
- package/dist/providers/huggingface.models.js +4 -2
- package/dist/providers/images/register-builtins.d.ts +2 -2
- package/dist/providers/kimi-coding.models.d.ts +54 -7
- package/dist/providers/kimi-coding.models.js +34 -7
- package/dist/providers/meta.d.ts +3 -0
- package/dist/providers/meta.js +24 -0
- package/dist/providers/meta.models.d.ts +6 -0
- package/dist/providers/meta.models.js +8 -0
- package/dist/providers/minimax-cn.models.d.ts +4 -2
- package/dist/providers/minimax-cn.models.js +4 -2
- package/dist/providers/minimax.models.d.ts +4 -2
- package/dist/providers/minimax.models.js +4 -2
- package/dist/providers/mistral.models.d.ts +4 -2
- package/dist/providers/mistral.models.js +4 -2
- package/dist/providers/moonshotai-cn.models.d.ts +4 -2
- package/dist/providers/moonshotai-cn.models.js +4 -2
- package/dist/providers/moonshotai.models.d.ts +4 -2
- package/dist/providers/moonshotai.models.js +4 -2
- package/dist/providers/nvidia.models.d.ts +4 -2
- package/dist/providers/nvidia.models.js +4 -2
- package/dist/providers/openai.js +4 -2
- package/dist/providers/openai.models.d.ts +4 -2
- package/dist/providers/openai.models.js +4 -2
- package/dist/providers/opencode-go.models.d.ts +4 -2
- package/dist/providers/opencode-go.models.js +4 -2
- package/dist/providers/opencode.d.ts +3 -1
- package/dist/providers/opencode.js +5 -2
- package/dist/providers/opencode.models.d.ts +4 -2
- package/dist/providers/opencode.models.js +4 -2
- package/dist/providers/opengateway.models.d.ts +4 -2
- package/dist/providers/opengateway.models.js +4 -2
- package/dist/providers/openrouter.js +11 -2
- package/dist/providers/openrouter.models.d.ts +4 -2
- package/dist/providers/openrouter.models.js +4 -2
- package/dist/providers/qwen-token-plan-cn.models.d.ts +4 -2
- package/dist/providers/qwen-token-plan-cn.models.js +4 -2
- package/dist/providers/qwen-token-plan-individual.models.d.ts +4 -2
- package/dist/providers/qwen-token-plan-individual.models.js +4 -2
- package/dist/providers/qwen-token-plan.models.d.ts +4 -2
- package/dist/providers/qwen-token-plan.models.js +4 -2
- package/dist/providers/radius.js +19 -5
- package/dist/providers/radius.models.d.ts +6 -0
- package/dist/providers/radius.models.js +8 -0
- package/dist/providers/together.models.d.ts +4 -2
- package/dist/providers/together.models.js +4 -2
- package/dist/providers/typesafe.d.ts +3 -0
- package/dist/providers/typesafe.js +18 -0
- package/dist/providers/typesafe.models.d.ts +6 -0
- package/dist/providers/typesafe.models.js +8 -0
- package/dist/providers/venice.models.d.ts +4 -2
- package/dist/providers/venice.models.js +4 -2
- package/dist/providers/vercel-ai-gateway.js +5 -2
- package/dist/providers/vercel-ai-gateway.models.d.ts +4 -2
- package/dist/providers/vercel-ai-gateway.models.js +4 -2
- package/dist/providers/xai.models.d.ts +4 -2
- package/dist/providers/xai.models.js +4 -2
- package/dist/providers/xiaomi-token-plan-ams.models.d.ts +4 -2
- package/dist/providers/xiaomi-token-plan-ams.models.js +4 -2
- package/dist/providers/xiaomi-token-plan-cn.models.d.ts +4 -2
- package/dist/providers/xiaomi-token-plan-cn.models.js +4 -2
- package/dist/providers/xiaomi-token-plan-sgp.models.d.ts +4 -2
- package/dist/providers/xiaomi-token-plan-sgp.models.js +4 -2
- package/dist/providers/xiaomi.models.d.ts +4 -2
- package/dist/providers/xiaomi.models.js +4 -2
- package/dist/providers/zai-coding-cn.models.d.ts +4 -2
- package/dist/providers/zai-coding-cn.models.js +4 -2
- package/dist/providers/zai.models.d.ts +4 -2
- package/dist/providers/zai.models.js +4 -2
- package/dist/tool-call-middleware/context-transformer.d.ts +8 -5
- package/dist/tool-call-middleware/context-transformer.js +44 -15
- package/dist/types.d.ts +262 -28
- package/dist/utils/diagnostics.d.ts +3 -2
- package/dist/utils/estimate.d.ts +2 -2
- package/dist/utils/estimate.js +22 -30
- package/dist/utils/headers.d.ts +1 -1
- package/dist/utils/headers.js +10 -8
- package/dist/utils/model-operations.d.ts +11 -0
- package/dist/utils/model-operations.js +47 -0
- package/dist/utils/models-error.d.ts +8 -0
- package/dist/utils/models-error.js +18 -0
- package/dist/utils/overflow.d.ts +1 -0
- package/dist/utils/overflow.js +11 -5
- package/dist/utils/prompt-cache-ttl.js +10 -3
- package/dist/utils/retry.js +9 -0
- package/dist/utils/text.d.ts +9 -1
- package/dist/utils/text.js +26 -0
- package/dist/utils/transcript.d.ts +85 -0
- package/dist/utils/transcript.js +205 -0
- package/package.json +3 -4
- package/dist/image-models.generated.d.ts +0 -925
- package/dist/image-models.generated.js +0 -927
- package/dist/images-models.d.ts +0 -95
- package/dist/images-models.js +0 -141
- package/dist/providers/openai-images.d.ts +0 -3
- package/dist/providers/openai-images.js +0 -16
- package/dist/providers/openrouter-images.d.ts +0 -3
- package/dist/providers/openrouter-images.js +0 -22
- /package/dist/{auth/oauth → utils}/oauth-page.d.ts +0 -0
- /package/dist/{auth/oauth → utils}/oauth-page.js +0 -0
package/dist/providers/all.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { MODELS } from "../models.generated.ts";
|
|
1
|
+
import { CLASSIFIER_MODELS, IMAGE_MODELS, MODELS } from "../models.generated.ts";
|
|
3
2
|
import { type CreateModelsOptions, type MutableModels, type Provider } from "../models.ts";
|
|
4
|
-
import type {
|
|
3
|
+
import type { AnyModel, ClassifierModel, ImageModel, Model } from "../types.ts";
|
|
5
4
|
import { ollamaProvider } from "./ollama.ts";
|
|
6
5
|
import { radiusProvider } from "./radius.ts";
|
|
7
6
|
export { ollamaProvider, radiusProvider };
|
|
@@ -13,9 +12,10 @@ export { ollamaProvider, radiusProvider };
|
|
|
13
12
|
* read below must see them exactly like a generated one.
|
|
14
13
|
*/
|
|
15
14
|
declare const FORK_OWNED_CATALOGS: {
|
|
16
|
-
readonly "kimi-coding": import("../model-catalog.ts").
|
|
15
|
+
readonly "kimi-coding": import("../model-catalog.ts").ChatModelCatalog<{
|
|
17
16
|
readonly "anthropic-messages": {
|
|
18
|
-
readonly k3: {
|
|
17
|
+
readonly "chat:k3": {
|
|
18
|
+
readonly type: "chat";
|
|
19
19
|
readonly id: "k3";
|
|
20
20
|
readonly name: "Kimi K3";
|
|
21
21
|
readonly api: "anthropic-messages";
|
|
@@ -36,6 +36,16 @@ declare const FORK_OWNED_CATALOGS: {
|
|
|
36
36
|
readonly max: "max";
|
|
37
37
|
};
|
|
38
38
|
readonly input: readonly ["text", "image", "video"];
|
|
39
|
+
readonly inputLimits: {
|
|
40
|
+
readonly images: {
|
|
41
|
+
readonly resize: {
|
|
42
|
+
readonly maxWidth: 2000;
|
|
43
|
+
readonly maxHeight: 2000;
|
|
44
|
+
readonly maxBytes: 4718592;
|
|
45
|
+
readonly jpegQuality: 80;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
39
49
|
readonly cost: {
|
|
40
50
|
readonly input: 3;
|
|
41
51
|
readonly output: 15;
|
|
@@ -45,7 +55,8 @@ declare const FORK_OWNED_CATALOGS: {
|
|
|
45
55
|
readonly contextWindow: 1048576;
|
|
46
56
|
readonly maxTokens: 131072;
|
|
47
57
|
};
|
|
48
|
-
readonly "k3-256k": {
|
|
58
|
+
readonly "chat:k3-256k": {
|
|
59
|
+
readonly type: "chat";
|
|
49
60
|
readonly id: "k3-256k";
|
|
50
61
|
readonly name: "Kimi K3-256K";
|
|
51
62
|
readonly api: "anthropic-messages";
|
|
@@ -56,6 +67,16 @@ declare const FORK_OWNED_CATALOGS: {
|
|
|
56
67
|
};
|
|
57
68
|
readonly reasoning: true;
|
|
58
69
|
readonly input: readonly ["text", "image"];
|
|
70
|
+
readonly inputLimits: {
|
|
71
|
+
readonly images: {
|
|
72
|
+
readonly resize: {
|
|
73
|
+
readonly maxWidth: 2000;
|
|
74
|
+
readonly maxHeight: 2000;
|
|
75
|
+
readonly maxBytes: 4718592;
|
|
76
|
+
readonly jpegQuality: 80;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
59
80
|
readonly cost: {
|
|
60
81
|
readonly input: 0;
|
|
61
82
|
readonly output: 0;
|
|
@@ -74,7 +95,8 @@ declare const FORK_OWNED_CATALOGS: {
|
|
|
74
95
|
readonly max: "max";
|
|
75
96
|
};
|
|
76
97
|
};
|
|
77
|
-
readonly "kimi-for-coding": {
|
|
98
|
+
readonly "chat:kimi-for-coding": {
|
|
99
|
+
readonly type: "chat";
|
|
78
100
|
readonly id: "kimi-for-coding";
|
|
79
101
|
readonly name: "kimi-for-coding";
|
|
80
102
|
readonly api: "anthropic-messages";
|
|
@@ -86,6 +108,16 @@ declare const FORK_OWNED_CATALOGS: {
|
|
|
86
108
|
};
|
|
87
109
|
readonly reasoning: true;
|
|
88
110
|
readonly input: readonly ["text", "image"];
|
|
111
|
+
readonly inputLimits: {
|
|
112
|
+
readonly images: {
|
|
113
|
+
readonly resize: {
|
|
114
|
+
readonly maxWidth: 2000;
|
|
115
|
+
readonly maxHeight: 2000;
|
|
116
|
+
readonly maxBytes: 4718592;
|
|
117
|
+
readonly jpegQuality: 80;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
};
|
|
89
121
|
readonly cost: {
|
|
90
122
|
readonly input: 0.95;
|
|
91
123
|
readonly output: 4;
|
|
@@ -104,7 +136,8 @@ declare const FORK_OWNED_CATALOGS: {
|
|
|
104
136
|
readonly max: "max";
|
|
105
137
|
};
|
|
106
138
|
};
|
|
107
|
-
readonly "kimi-for-coding-highspeed": {
|
|
139
|
+
readonly "chat:kimi-for-coding-highspeed": {
|
|
140
|
+
readonly type: "chat";
|
|
108
141
|
readonly id: "kimi-for-coding-highspeed";
|
|
109
142
|
readonly name: "Kimi For Coding HighSpeed";
|
|
110
143
|
readonly api: "anthropic-messages";
|
|
@@ -115,6 +148,16 @@ declare const FORK_OWNED_CATALOGS: {
|
|
|
115
148
|
};
|
|
116
149
|
readonly reasoning: true;
|
|
117
150
|
readonly input: readonly ["text", "image"];
|
|
151
|
+
readonly inputLimits: {
|
|
152
|
+
readonly images: {
|
|
153
|
+
readonly resize: {
|
|
154
|
+
readonly maxWidth: 2000;
|
|
155
|
+
readonly maxHeight: 2000;
|
|
156
|
+
readonly maxBytes: 4718592;
|
|
157
|
+
readonly jpegQuality: 80;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
};
|
|
118
161
|
readonly cost: {
|
|
119
162
|
readonly input: 1.9;
|
|
120
163
|
readonly output: 8;
|
|
@@ -124,7 +167,8 @@ declare const FORK_OWNED_CATALOGS: {
|
|
|
124
167
|
readonly contextWindow: 262144;
|
|
125
168
|
readonly maxTokens: 32768;
|
|
126
169
|
};
|
|
127
|
-
readonly "kimi-k2-thinking": {
|
|
170
|
+
readonly "chat:kimi-k2-thinking": {
|
|
171
|
+
readonly type: "chat";
|
|
128
172
|
readonly id: "kimi-k2-thinking";
|
|
129
173
|
readonly name: "Kimi K2 Thinking";
|
|
130
174
|
readonly api: "anthropic-messages";
|
|
@@ -152,21 +196,30 @@ type BuiltinCatalogs = typeof MODELS & typeof FORK_OWNED_CATALOGS;
|
|
|
152
196
|
* `KnownProvider` additionally includes purely dynamic providers
|
|
153
197
|
* (e.g. "radius") that have no static catalog entry. */
|
|
154
198
|
export type BuiltinProvider = keyof BuiltinCatalogs;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
199
|
+
/** Entries of one provider in a typed catalog; empty when the catalog has no shard for it. */
|
|
200
|
+
type CatalogEntries<TCatalog, TProvider> = TProvider extends keyof TCatalog ? TCatalog[TProvider] : Record<never, never>;
|
|
201
|
+
type BuiltinChatModelId<TProvider extends BuiltinProvider> = keyof BuiltinCatalogs[TProvider];
|
|
202
|
+
type BuiltinImageModelId<TProvider extends BuiltinProvider> = keyof CatalogEntries<typeof IMAGE_MODELS, TProvider>;
|
|
203
|
+
type BuiltinClassifierModelId<TProvider extends BuiltinProvider> = keyof CatalogEntries<typeof CLASSIFIER_MODELS, TProvider>;
|
|
204
|
+
/** API ids of catalog entries. Built-in getters return `Model<Api>` shapes, not literal entry types. */
|
|
205
|
+
type CatalogApi<TEntry> = TEntry extends {
|
|
206
|
+
api: infer TApi extends string;
|
|
207
|
+
} ? TApi : never;
|
|
208
|
+
/** Typed read of one generated built-in chat model. */
|
|
209
|
+
export declare function getBuiltinModel<TProvider extends BuiltinProvider, TModelId extends BuiltinChatModelId<TProvider>>(provider: TProvider, modelId: TModelId): Model<CatalogApi<BuiltinCatalogs[TProvider][TModelId]>>;
|
|
210
|
+
/** Typed read of one generated built-in image model. */
|
|
211
|
+
export declare function getBuiltinImageModel<TProvider extends BuiltinProvider, TModelId extends BuiltinImageModelId<TProvider>>(provider: TProvider, modelId: TModelId): ImageModel<CatalogApi<CatalogEntries<typeof IMAGE_MODELS, TProvider>[TModelId]>>;
|
|
212
|
+
/** Typed read of one generated built-in classifier model. */
|
|
213
|
+
export declare function getBuiltinClassifierModel<TProvider extends BuiltinProvider, TModelId extends BuiltinClassifierModelId<TProvider>>(provider: TProvider, modelId: TModelId): ClassifierModel<CatalogApi<CatalogEntries<typeof CLASSIFIER_MODELS, TProvider>[TModelId]>>;
|
|
160
214
|
export declare function getBuiltinProviders(): BuiltinProvider[];
|
|
161
215
|
/** Generation timestamp shared by all built-in provider catalogs. */
|
|
162
216
|
export declare function getBuiltinModelDataGeneratedAt(): number | undefined;
|
|
163
|
-
export declare function getBuiltinModels<TProvider extends BuiltinProvider>(provider: TProvider): Model<
|
|
217
|
+
export declare function getBuiltinModels<TProvider extends BuiltinProvider>(provider: TProvider): Model<CatalogApi<BuiltinCatalogs[TProvider][BuiltinChatModelId<TProvider>]>>[];
|
|
218
|
+
export declare function getBuiltinImageModels<TProvider extends BuiltinProvider>(provider: TProvider): ImageModel<CatalogApi<CatalogEntries<typeof IMAGE_MODELS, TProvider>[BuiltinImageModelId<TProvider>]>>[];
|
|
219
|
+
export declare function getBuiltinClassifierModels<TProvider extends BuiltinProvider>(provider: TProvider): ClassifierModel<CatalogApi<CatalogEntries<typeof CLASSIFIER_MODELS, TProvider>[BuiltinClassifierModelId<TProvider>]>>[];
|
|
220
|
+
export declare function getAllBuiltinModels<TProvider extends BuiltinProvider>(provider: TProvider): AnyModel[];
|
|
164
221
|
/** All built-in providers, freshly constructed. */
|
|
165
222
|
export declare function builtinProviders(): Provider[];
|
|
166
223
|
/** A `Models` collection with every built-in provider registered. */
|
|
167
224
|
export declare function builtinModels(options?: CreateModelsOptions): MutableModels;
|
|
168
|
-
/** All built-in image-generation providers, freshly constructed. */
|
|
169
|
-
export declare function builtinImagesProviders(): ImagesProvider[];
|
|
170
|
-
/** An `ImagesModels` collection with every built-in image-generation provider registered. */
|
|
171
|
-
export declare function builtinImagesModels(options?: CreateModelsOptions): MutableImagesModels;
|
|
172
225
|
//# sourceMappingURL=all.d.ts.map
|
package/dist/providers/all.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { MODELS } from "../models.generated.js";
|
|
1
|
+
import { CLASSIFIER_MODELS, IMAGE_MODELS, MODELS } from "../models.generated.js";
|
|
3
2
|
import { createModels } from "../models.js";
|
|
4
3
|
import { alibabaTokenPlanProvider } from "./alibaba-token-plan.js";
|
|
5
4
|
import { amazonBedrockProvider } from "./amazon-bedrock.js";
|
|
@@ -24,6 +23,7 @@ import { groqProvider } from "./groq.js";
|
|
|
24
23
|
import { huggingfaceProvider } from "./huggingface.js";
|
|
25
24
|
import { KIMI_CODING_MODELS } from "./kimi-coding.models.js";
|
|
26
25
|
import { kimiCodingProvider } from "./kimi-coding.js";
|
|
26
|
+
import { metaProvider } from "./meta.js";
|
|
27
27
|
import { minimaxProvider } from "./minimax.js";
|
|
28
28
|
import { minimaxCnProvider } from "./minimax-cn.js";
|
|
29
29
|
import { mistralProvider } from "./mistral.js";
|
|
@@ -32,17 +32,16 @@ import { moonshotaiCnProvider } from "./moonshotai-cn.js";
|
|
|
32
32
|
import { nvidiaProvider } from "./nvidia.js";
|
|
33
33
|
import { ollamaProvider } from "./ollama.js";
|
|
34
34
|
import { openaiProvider } from "./openai.js";
|
|
35
|
-
import { openaiImagesProvider } from "./openai-images.js";
|
|
36
35
|
import { opencodeProvider } from "./opencode.js";
|
|
37
36
|
import { opencodeGoProvider } from "./opencode-go.js";
|
|
38
37
|
import { opengatewayProvider } from "./opengateway.js";
|
|
39
38
|
import { openrouterProvider } from "./openrouter.js";
|
|
40
|
-
import { openrouterImagesProvider } from "./openrouter-images.js";
|
|
41
39
|
import { qwenTokenPlanProvider } from "./qwen-token-plan.js";
|
|
42
40
|
import { qwenTokenPlanCnProvider } from "./qwen-token-plan-cn.js";
|
|
43
41
|
import { qwenTokenPlanIndividualProvider } from "./qwen-token-plan-individual.js";
|
|
44
42
|
import { radiusProvider } from "./radius.js";
|
|
45
43
|
import { togetherProvider } from "./together.js";
|
|
44
|
+
import { typesafeProvider } from "./typesafe.js";
|
|
46
45
|
import { veniceProvider } from "./venice.js";
|
|
47
46
|
import { vercelAIGatewayProvider } from "./vercel-ai-gateway.js";
|
|
48
47
|
import { xaiProvider } from "./xai.js";
|
|
@@ -95,11 +94,19 @@ function normalizeBuiltinModel(model) {
|
|
|
95
94
|
}
|
|
96
95
|
return model;
|
|
97
96
|
}
|
|
98
|
-
/** Typed read of
|
|
97
|
+
/** Typed read of one generated built-in chat model. */
|
|
99
98
|
export function getBuiltinModel(provider, modelId) {
|
|
100
99
|
const models = BUILTIN_CATALOGS[provider];
|
|
101
100
|
return normalizeBuiltinModel(models?.[modelId]);
|
|
102
101
|
}
|
|
102
|
+
/** Typed read of one generated built-in image model. */
|
|
103
|
+
export function getBuiltinImageModel(provider, modelId) {
|
|
104
|
+
return IMAGE_MODELS[provider]?.[modelId];
|
|
105
|
+
}
|
|
106
|
+
/** Typed read of one generated built-in classifier model. */
|
|
107
|
+
export function getBuiltinClassifierModel(provider, modelId) {
|
|
108
|
+
return CLASSIFIER_MODELS[provider]?.[modelId];
|
|
109
|
+
}
|
|
103
110
|
export function getBuiltinProviders() {
|
|
104
111
|
return Object.keys(BUILTIN_CATALOGS);
|
|
105
112
|
}
|
|
@@ -110,11 +117,20 @@ export function getBuiltinModelDataGeneratedAt() {
|
|
|
110
117
|
}
|
|
111
118
|
export function getBuiltinModels(provider) {
|
|
112
119
|
const models = BUILTIN_CATALOGS[provider];
|
|
113
|
-
return models
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
120
|
+
return Object.values(models ?? {})
|
|
121
|
+
.map((model) => normalizeBuiltinModel(model))
|
|
122
|
+
.filter((model) => model !== undefined);
|
|
123
|
+
}
|
|
124
|
+
export function getBuiltinImageModels(provider) {
|
|
125
|
+
const models = IMAGE_MODELS[provider];
|
|
126
|
+
return Object.values(models ?? {});
|
|
127
|
+
}
|
|
128
|
+
export function getBuiltinClassifierModels(provider) {
|
|
129
|
+
const models = CLASSIFIER_MODELS[provider];
|
|
130
|
+
return Object.values(models ?? {});
|
|
131
|
+
}
|
|
132
|
+
export function getAllBuiltinModels(provider) {
|
|
133
|
+
return [...getBuiltinModels(provider), ...getBuiltinImageModels(provider), ...getBuiltinClassifierModels(provider)];
|
|
118
134
|
}
|
|
119
135
|
/** All built-in providers, freshly constructed. */
|
|
120
136
|
export function builtinProviders() {
|
|
@@ -139,6 +155,7 @@ export function builtinProviders() {
|
|
|
139
155
|
groqProvider(),
|
|
140
156
|
huggingfaceProvider(),
|
|
141
157
|
kimiCodingProvider(),
|
|
158
|
+
metaProvider(),
|
|
142
159
|
minimaxProvider(),
|
|
143
160
|
minimaxCnProvider(),
|
|
144
161
|
mistralProvider(),
|
|
@@ -157,6 +174,7 @@ export function builtinProviders() {
|
|
|
157
174
|
qwenTokenPlanIndividualProvider(),
|
|
158
175
|
radiusProvider(),
|
|
159
176
|
togetherProvider(),
|
|
177
|
+
typesafeProvider(),
|
|
160
178
|
veniceProvider(),
|
|
161
179
|
vercelAIGatewayProvider(),
|
|
162
180
|
xaiProvider(),
|
|
@@ -176,16 +194,4 @@ export function builtinModels(options) {
|
|
|
176
194
|
}
|
|
177
195
|
return models;
|
|
178
196
|
}
|
|
179
|
-
/** All built-in image-generation providers, freshly constructed. */
|
|
180
|
-
export function builtinImagesProviders() {
|
|
181
|
-
return [openrouterImagesProvider(), openaiImagesProvider()];
|
|
182
|
-
}
|
|
183
|
-
/** An `ImagesModels` collection with every built-in image-generation provider registered. */
|
|
184
|
-
export function builtinImagesModels(options) {
|
|
185
|
-
const models = createImagesModels(options);
|
|
186
|
-
for (const provider of builtinImagesProviders()) {
|
|
187
|
-
models.setProvider(provider);
|
|
188
|
-
}
|
|
189
|
-
return models;
|
|
190
|
-
}
|
|
191
197
|
//# sourceMappingURL=all.js.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import values from "./data/amazon-bedrock.json";
|
|
2
|
-
import { type
|
|
3
|
-
export declare const AMAZON_BEDROCK_MODELS:
|
|
2
|
+
import { type ChatModelCatalog, type ClassifierModelCatalog, type ImageModelCatalog } from "../model-catalog.ts";
|
|
3
|
+
export declare const AMAZON_BEDROCK_MODELS: ChatModelCatalog<typeof values, "amazon-bedrock">;
|
|
4
|
+
export declare const AMAZON_BEDROCK_IMAGE_MODELS: ImageModelCatalog<typeof values, "amazon-bedrock">;
|
|
5
|
+
export declare const AMAZON_BEDROCK_CLASSIFIER_MODELS: ClassifierModelCatalog<typeof values, "amazon-bedrock">;
|
|
4
6
|
//# sourceMappingURL=amazon-bedrock.models.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// This file is auto-generated by scripts/generate-models.ts
|
|
2
2
|
// Do not edit manually - run 'npm run generate-models' to update
|
|
3
3
|
import values from "./data/amazon-bedrock.json" with { type: "json" };
|
|
4
|
-
import {
|
|
5
|
-
export const AMAZON_BEDROCK_MODELS =
|
|
4
|
+
import { flattenChatModelCatalog, flattenClassifierModelCatalog, flattenImageModelCatalog } from "../model-catalog.js";
|
|
5
|
+
export const AMAZON_BEDROCK_MODELS = flattenChatModelCatalog("amazon-bedrock", values);
|
|
6
|
+
export const AMAZON_BEDROCK_IMAGE_MODELS = flattenImageModelCatalog("amazon-bedrock", values);
|
|
7
|
+
export const AMAZON_BEDROCK_CLASSIFIER_MODELS = flattenClassifierModelCatalog("amazon-bedrock", values);
|
|
6
8
|
//# sourceMappingURL=amazon-bedrock.models.js.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import values from "./data/ant-ling.json";
|
|
2
|
-
import { type
|
|
3
|
-
export declare const ANT_LING_MODELS:
|
|
2
|
+
import { type ChatModelCatalog, type ClassifierModelCatalog, type ImageModelCatalog } from "../model-catalog.ts";
|
|
3
|
+
export declare const ANT_LING_MODELS: ChatModelCatalog<typeof values, "ant-ling">;
|
|
4
|
+
export declare const ANT_LING_IMAGE_MODELS: ImageModelCatalog<typeof values, "ant-ling">;
|
|
5
|
+
export declare const ANT_LING_CLASSIFIER_MODELS: ClassifierModelCatalog<typeof values, "ant-ling">;
|
|
4
6
|
//# sourceMappingURL=ant-ling.models.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// This file is auto-generated by scripts/generate-models.ts
|
|
2
2
|
// Do not edit manually - run 'npm run generate-models' to update
|
|
3
3
|
import values from "./data/ant-ling.json" with { type: "json" };
|
|
4
|
-
import {
|
|
5
|
-
export const ANT_LING_MODELS =
|
|
4
|
+
import { flattenChatModelCatalog, flattenClassifierModelCatalog, flattenImageModelCatalog } from "../model-catalog.js";
|
|
5
|
+
export const ANT_LING_MODELS = flattenChatModelCatalog("ant-ling", values);
|
|
6
|
+
export const ANT_LING_IMAGE_MODELS = flattenImageModelCatalog("ant-ling", values);
|
|
7
|
+
export const ANT_LING_CLASSIFIER_MODELS = flattenClassifierModelCatalog("ant-ling", values);
|
|
6
8
|
//# sourceMappingURL=ant-ling.models.js.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import values from "./data/anthropic.json";
|
|
2
|
-
import { type
|
|
3
|
-
export declare const ANTHROPIC_MODELS:
|
|
2
|
+
import { type ChatModelCatalog, type ClassifierModelCatalog, type ImageModelCatalog } from "../model-catalog.ts";
|
|
3
|
+
export declare const ANTHROPIC_MODELS: ChatModelCatalog<typeof values, "anthropic">;
|
|
4
|
+
export declare const ANTHROPIC_IMAGE_MODELS: ImageModelCatalog<typeof values, "anthropic">;
|
|
5
|
+
export declare const ANTHROPIC_CLASSIFIER_MODELS: ClassifierModelCatalog<typeof values, "anthropic">;
|
|
4
6
|
//# sourceMappingURL=anthropic.models.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// This file is auto-generated by scripts/generate-models.ts
|
|
2
2
|
// Do not edit manually - run 'npm run generate-models' to update
|
|
3
3
|
import values from "./data/anthropic.json" with { type: "json" };
|
|
4
|
-
import {
|
|
5
|
-
export const ANTHROPIC_MODELS =
|
|
4
|
+
import { flattenChatModelCatalog, flattenClassifierModelCatalog, flattenImageModelCatalog } from "../model-catalog.js";
|
|
5
|
+
export const ANTHROPIC_MODELS = flattenChatModelCatalog("anthropic", values);
|
|
6
|
+
export const ANTHROPIC_IMAGE_MODELS = flattenImageModelCatalog("anthropic", values);
|
|
7
|
+
export const ANTHROPIC_CLASSIFIER_MODELS = flattenClassifierModelCatalog("anthropic", values);
|
|
6
8
|
//# sourceMappingURL=anthropic.models.js.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import values from "./data/azure-openai-responses.json";
|
|
2
|
-
import { type
|
|
3
|
-
export declare const AZURE_OPENAI_RESPONSES_MODELS:
|
|
2
|
+
import { type ChatModelCatalog, type ClassifierModelCatalog, type ImageModelCatalog } from "../model-catalog.ts";
|
|
3
|
+
export declare const AZURE_OPENAI_RESPONSES_MODELS: ChatModelCatalog<typeof values, "azure-openai-responses">;
|
|
4
|
+
export declare const AZURE_OPENAI_RESPONSES_IMAGE_MODELS: ImageModelCatalog<typeof values, "azure-openai-responses">;
|
|
5
|
+
export declare const AZURE_OPENAI_RESPONSES_CLASSIFIER_MODELS: ClassifierModelCatalog<typeof values, "azure-openai-responses">;
|
|
4
6
|
//# sourceMappingURL=azure-openai-responses.models.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// This file is auto-generated by scripts/generate-models.ts
|
|
2
2
|
// Do not edit manually - run 'npm run generate-models' to update
|
|
3
3
|
import values from "./data/azure-openai-responses.json" with { type: "json" };
|
|
4
|
-
import {
|
|
5
|
-
export const AZURE_OPENAI_RESPONSES_MODELS =
|
|
4
|
+
import { flattenChatModelCatalog, flattenClassifierModelCatalog, flattenImageModelCatalog } from "../model-catalog.js";
|
|
5
|
+
export const AZURE_OPENAI_RESPONSES_MODELS = flattenChatModelCatalog("azure-openai-responses", values);
|
|
6
|
+
export const AZURE_OPENAI_RESPONSES_IMAGE_MODELS = flattenImageModelCatalog("azure-openai-responses", values);
|
|
7
|
+
export const AZURE_OPENAI_RESPONSES_CLASSIFIER_MODELS = flattenClassifierModelCatalog("azure-openai-responses", values);
|
|
6
8
|
//# sourceMappingURL=azure-openai-responses.models.js.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import values from "./data/bai.json";
|
|
2
|
-
import { type
|
|
3
|
-
export declare const BAI_MODELS:
|
|
2
|
+
import { type ChatModelCatalog, type ClassifierModelCatalog, type ImageModelCatalog } from "../model-catalog.ts";
|
|
3
|
+
export declare const BAI_MODELS: ChatModelCatalog<typeof values, "bai">;
|
|
4
|
+
export declare const BAI_IMAGE_MODELS: ImageModelCatalog<typeof values, "bai">;
|
|
5
|
+
export declare const BAI_CLASSIFIER_MODELS: ClassifierModelCatalog<typeof values, "bai">;
|
|
4
6
|
//# sourceMappingURL=bai.models.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// This file is auto-generated by scripts/generate-models.ts
|
|
2
2
|
// Do not edit manually - run 'npm run generate-models' to update
|
|
3
3
|
import values from "./data/bai.json" with { type: "json" };
|
|
4
|
-
import {
|
|
5
|
-
export const BAI_MODELS =
|
|
4
|
+
import { flattenChatModelCatalog, flattenClassifierModelCatalog, flattenImageModelCatalog } from "../model-catalog.js";
|
|
5
|
+
export const BAI_MODELS = flattenChatModelCatalog("bai", values);
|
|
6
|
+
export const BAI_IMAGE_MODELS = flattenImageModelCatalog("bai", values);
|
|
7
|
+
export const BAI_CLASSIFIER_MODELS = flattenClassifierModelCatalog("bai", values);
|
|
6
8
|
//# sourceMappingURL=bai.models.js.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import values from "./data/baseten.json";
|
|
2
|
-
import { type
|
|
3
|
-
export declare const BASETEN_MODELS:
|
|
2
|
+
import { type ChatModelCatalog, type ClassifierModelCatalog, type ImageModelCatalog } from "../model-catalog.ts";
|
|
3
|
+
export declare const BASETEN_MODELS: ChatModelCatalog<typeof values, "baseten">;
|
|
4
|
+
export declare const BASETEN_IMAGE_MODELS: ImageModelCatalog<typeof values, "baseten">;
|
|
5
|
+
export declare const BASETEN_CLASSIFIER_MODELS: ClassifierModelCatalog<typeof values, "baseten">;
|
|
4
6
|
//# sourceMappingURL=baseten.models.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// This file is auto-generated by scripts/generate-models.ts
|
|
2
2
|
// Do not edit manually - run 'npm run generate-models' to update
|
|
3
3
|
import values from "./data/baseten.json" with { type: "json" };
|
|
4
|
-
import {
|
|
5
|
-
export const BASETEN_MODELS =
|
|
4
|
+
import { flattenChatModelCatalog, flattenClassifierModelCatalog, flattenImageModelCatalog } from "../model-catalog.js";
|
|
5
|
+
export const BASETEN_MODELS = flattenChatModelCatalog("baseten", values);
|
|
6
|
+
export const BASETEN_IMAGE_MODELS = flattenImageModelCatalog("baseten", values);
|
|
7
|
+
export const BASETEN_CLASSIFIER_MODELS = flattenClassifierModelCatalog("baseten", values);
|
|
6
8
|
//# sourceMappingURL=baseten.models.js.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import values from "./data/cerebras.json";
|
|
2
|
-
import { type
|
|
3
|
-
export declare const CEREBRAS_MODELS:
|
|
2
|
+
import { type ChatModelCatalog, type ClassifierModelCatalog, type ImageModelCatalog } from "../model-catalog.ts";
|
|
3
|
+
export declare const CEREBRAS_MODELS: ChatModelCatalog<typeof values, "cerebras">;
|
|
4
|
+
export declare const CEREBRAS_IMAGE_MODELS: ImageModelCatalog<typeof values, "cerebras">;
|
|
5
|
+
export declare const CEREBRAS_CLASSIFIER_MODELS: ClassifierModelCatalog<typeof values, "cerebras">;
|
|
4
6
|
//# sourceMappingURL=cerebras.models.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// This file is auto-generated by scripts/generate-models.ts
|
|
2
2
|
// Do not edit manually - run 'npm run generate-models' to update
|
|
3
3
|
import values from "./data/cerebras.json" with { type: "json" };
|
|
4
|
-
import {
|
|
5
|
-
export const CEREBRAS_MODELS =
|
|
4
|
+
import { flattenChatModelCatalog, flattenClassifierModelCatalog, flattenImageModelCatalog } from "../model-catalog.js";
|
|
5
|
+
export const CEREBRAS_MODELS = flattenChatModelCatalog("cerebras", values);
|
|
6
|
+
export const CEREBRAS_IMAGE_MODELS = flattenImageModelCatalog("cerebras", values);
|
|
7
|
+
export const CEREBRAS_CLASSIFIER_MODELS = flattenClassifierModelCatalog("cerebras", values);
|
|
6
8
|
//# sourceMappingURL=cerebras.models.js.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import values from "./data/chatgpt-subscription.json";
|
|
2
|
-
import { type
|
|
3
|
-
export declare const CHATGPT_SUBSCRIPTION_MODELS:
|
|
2
|
+
import { type ChatModelCatalog, type ClassifierModelCatalog, type ImageModelCatalog } from "../model-catalog.ts";
|
|
3
|
+
export declare const CHATGPT_SUBSCRIPTION_MODELS: ChatModelCatalog<typeof values, "chatgpt-subscription">;
|
|
4
|
+
export declare const CHATGPT_SUBSCRIPTION_IMAGE_MODELS: ImageModelCatalog<typeof values, "chatgpt-subscription">;
|
|
5
|
+
export declare const CHATGPT_SUBSCRIPTION_CLASSIFIER_MODELS: ClassifierModelCatalog<typeof values, "chatgpt-subscription">;
|
|
4
6
|
//# sourceMappingURL=chatgpt-subscription.models.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// This file is auto-generated by scripts/generate-models.ts
|
|
2
2
|
// Do not edit manually - run 'npm run generate-models' to update
|
|
3
3
|
import values from "./data/chatgpt-subscription.json" with { type: "json" };
|
|
4
|
-
import {
|
|
5
|
-
export const CHATGPT_SUBSCRIPTION_MODELS =
|
|
4
|
+
import { flattenChatModelCatalog, flattenClassifierModelCatalog, flattenImageModelCatalog } from "../model-catalog.js";
|
|
5
|
+
export const CHATGPT_SUBSCRIPTION_MODELS = flattenChatModelCatalog("chatgpt-subscription", values);
|
|
6
|
+
export const CHATGPT_SUBSCRIPTION_IMAGE_MODELS = flattenImageModelCatalog("chatgpt-subscription", values);
|
|
7
|
+
export const CHATGPT_SUBSCRIPTION_CLASSIFIER_MODELS = flattenClassifierModelCatalog("chatgpt-subscription", values);
|
|
6
8
|
//# sourceMappingURL=chatgpt-subscription.models.js.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import values from "./data/cloudflare-ai-gateway.json";
|
|
2
|
-
import { type
|
|
3
|
-
export declare const CLOUDFLARE_AI_GATEWAY_MODELS:
|
|
2
|
+
import { type ChatModelCatalog, type ClassifierModelCatalog, type ImageModelCatalog } from "../model-catalog.ts";
|
|
3
|
+
export declare const CLOUDFLARE_AI_GATEWAY_MODELS: ChatModelCatalog<typeof values, "cloudflare-ai-gateway">;
|
|
4
|
+
export declare const CLOUDFLARE_AI_GATEWAY_IMAGE_MODELS: ImageModelCatalog<typeof values, "cloudflare-ai-gateway">;
|
|
5
|
+
export declare const CLOUDFLARE_AI_GATEWAY_CLASSIFIER_MODELS: ClassifierModelCatalog<typeof values, "cloudflare-ai-gateway">;
|
|
4
6
|
//# sourceMappingURL=cloudflare-ai-gateway.models.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// This file is auto-generated by scripts/generate-models.ts
|
|
2
2
|
// Do not edit manually - run 'npm run generate-models' to update
|
|
3
3
|
import values from "./data/cloudflare-ai-gateway.json" with { type: "json" };
|
|
4
|
-
import {
|
|
5
|
-
export const CLOUDFLARE_AI_GATEWAY_MODELS =
|
|
4
|
+
import { flattenChatModelCatalog, flattenClassifierModelCatalog, flattenImageModelCatalog } from "../model-catalog.js";
|
|
5
|
+
export const CLOUDFLARE_AI_GATEWAY_MODELS = flattenChatModelCatalog("cloudflare-ai-gateway", values);
|
|
6
|
+
export const CLOUDFLARE_AI_GATEWAY_IMAGE_MODELS = flattenImageModelCatalog("cloudflare-ai-gateway", values);
|
|
7
|
+
export const CLOUDFLARE_AI_GATEWAY_CLASSIFIER_MODELS = flattenClassifierModelCatalog("cloudflare-ai-gateway", values);
|
|
6
8
|
//# sourceMappingURL=cloudflare-ai-gateway.models.js.map
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function resolveCloudflareModel<
|
|
1
|
+
import type { ProviderClassifier, ProviderEnv, ProviderStreams } from "../types.ts";
|
|
2
|
+
export declare function resolveCloudflareModel<TModel extends {
|
|
3
|
+
baseUrl: string;
|
|
4
|
+
}>(model: TModel, env: ProviderEnv | undefined): TModel;
|
|
3
5
|
/**
|
|
4
6
|
* Wrap an API implementation so Cloudflare account/gateway endpoint
|
|
5
7
|
* placeholders materialize from the resolved provider env before dispatch.
|
|
6
8
|
*/
|
|
7
9
|
export declare function cloudflareStreams(streams: ProviderStreams): ProviderStreams;
|
|
10
|
+
/** Classifier counterpart of {@link cloudflareStreams}. */
|
|
11
|
+
export declare function cloudflareClassifier(classifier: ProviderClassifier): ProviderClassifier;
|
|
8
12
|
//# sourceMappingURL=cloudflare-stream.d.ts.map
|
|
@@ -18,4 +18,10 @@ export function cloudflareStreams(streams) {
|
|
|
18
18
|
streamSimple: (model, context, options) => streams.streamSimple(resolveCloudflareModel(model, options?.env), context, options),
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
+
/** Classifier counterpart of {@link cloudflareStreams}. */
|
|
22
|
+
export function cloudflareClassifier(classifier) {
|
|
23
|
+
return {
|
|
24
|
+
classify: (model, context, options) => classifier.classify(resolveCloudflareModel(model, options?.env), context, options),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
21
27
|
//# sourceMappingURL=cloudflare-stream.js.map
|
|
@@ -1,15 +1,22 @@
|
|
|
1
|
+
import { cloudflareWorkersAISystemOneApi } from "../api/cloudflare-workers-ai-system-one.lazy.js";
|
|
1
2
|
import { openAICompletionsApi } from "../api/openai-completions.lazy.js";
|
|
2
3
|
import { createProvider } from "../models.js";
|
|
3
4
|
import { cloudflareWorkersAIAuth } from "./cloudflare-auth.js";
|
|
4
|
-
import { cloudflareStreams } from "./cloudflare-stream.js";
|
|
5
|
-
import { CLOUDFLARE_WORKERS_AI_MODELS } from "./cloudflare-workers-ai.models.js";
|
|
5
|
+
import { cloudflareClassifier, cloudflareStreams } from "./cloudflare-stream.js";
|
|
6
|
+
import { CLOUDFLARE_WORKERS_AI_CLASSIFIER_MODELS, CLOUDFLARE_WORKERS_AI_MODELS, } from "./cloudflare-workers-ai.models.js";
|
|
6
7
|
export function cloudflareWorkersAIProvider() {
|
|
7
8
|
return createProvider({
|
|
8
9
|
id: "cloudflare-workers-ai",
|
|
9
10
|
name: "Cloudflare Workers AI",
|
|
10
11
|
auth: { apiKey: cloudflareWorkersAIAuth() },
|
|
11
|
-
models:
|
|
12
|
+
models: [
|
|
13
|
+
...Object.values(CLOUDFLARE_WORKERS_AI_MODELS),
|
|
14
|
+
...Object.values(CLOUDFLARE_WORKERS_AI_CLASSIFIER_MODELS),
|
|
15
|
+
],
|
|
12
16
|
api: cloudflareStreams(openAICompletionsApi()),
|
|
17
|
+
classifiers: {
|
|
18
|
+
"cloudflare-workers-ai-system-one": cloudflareClassifier(cloudflareWorkersAISystemOneApi()),
|
|
19
|
+
},
|
|
13
20
|
});
|
|
14
21
|
}
|
|
15
22
|
//# sourceMappingURL=cloudflare-workers-ai.js.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import values from "./data/cloudflare-workers-ai.json";
|
|
2
|
-
import { type
|
|
3
|
-
export declare const CLOUDFLARE_WORKERS_AI_MODELS:
|
|
2
|
+
import { type ChatModelCatalog, type ClassifierModelCatalog, type ImageModelCatalog } from "../model-catalog.ts";
|
|
3
|
+
export declare const CLOUDFLARE_WORKERS_AI_MODELS: ChatModelCatalog<typeof values, "cloudflare-workers-ai">;
|
|
4
|
+
export declare const CLOUDFLARE_WORKERS_AI_IMAGE_MODELS: ImageModelCatalog<typeof values, "cloudflare-workers-ai">;
|
|
5
|
+
export declare const CLOUDFLARE_WORKERS_AI_CLASSIFIER_MODELS: ClassifierModelCatalog<typeof values, "cloudflare-workers-ai">;
|
|
4
6
|
//# sourceMappingURL=cloudflare-workers-ai.models.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// This file is auto-generated by scripts/generate-models.ts
|
|
2
2
|
// Do not edit manually - run 'npm run generate-models' to update
|
|
3
3
|
import values from "./data/cloudflare-workers-ai.json" with { type: "json" };
|
|
4
|
-
import {
|
|
5
|
-
export const CLOUDFLARE_WORKERS_AI_MODELS =
|
|
4
|
+
import { flattenChatModelCatalog, flattenClassifierModelCatalog, flattenImageModelCatalog } from "../model-catalog.js";
|
|
5
|
+
export const CLOUDFLARE_WORKERS_AI_MODELS = flattenChatModelCatalog("cloudflare-workers-ai", values);
|
|
6
|
+
export const CLOUDFLARE_WORKERS_AI_IMAGE_MODELS = flattenImageModelCatalog("cloudflare-workers-ai", values);
|
|
7
|
+
export const CLOUDFLARE_WORKERS_AI_CLASSIFIER_MODELS = flattenClassifierModelCatalog("cloudflare-workers-ai", values);
|
|
6
8
|
//# sourceMappingURL=cloudflare-workers-ai.models.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schemaVersion":
|
|
1
|
+
{"schemaVersion":6,"generatedAt":"2026-10-01T09:36:10.690Z","structureHash":"dd395b3b87e37c7acf35ca610d93b3ea4255ab5ba230e5271d59033a87c6392d","files":{"alibaba-token-plan.json":"9015664a02a732893e31a185fcfb85f1e7a7251b2ce1682c79a480d476414956","amazon-bedrock.json":"f373b202dfd063006797de55cac3226bb4cbfd2db704c4d3b77cd9317e385321","ant-ling.json":"628feab3ef6c7d80ce96f75999804e1d9f05fec3851e5302e30fff3b69db90f6","anthropic.json":"2c0c4389cd71d21d4553075f399922892078192b0490fead423544e360af1a43","azure-openai-responses.json":"a3e52bd78f0220aa32bce519e13955b8e6e567860416343844cbe19902f4a682","bai.json":"7e6861aaf27d8af34e1771c6092602194fcec0a0046e6adfab9c3ee54d32b99f","baseten.json":"b04d1423d6958bec857ffccc36726f091ec1a8f3a09cf0836b64cc94b0ee697d","cerebras.json":"3eccb58c5de3d0dc7ba49dc6e477ba29f00cb3150ce0a35cc90d59e6b5ab368e","chatgpt-subscription.json":"08f365952647594f5b07337666255f8510ef2e09bfb704530843b63121ed07f4","cloudflare-ai-gateway.json":"294a902cc45474824f71a6cb288ba0f8764401f0ae9b9b8f9bcab76f8800d503","cloudflare-workers-ai.json":"b9f76cc83756a05920a8a7046c515919a1de918331b860a211f309bb716c4bb0","deepseek.json":"10a296fb3e898f7715c80890c8af0af4f5fd58f22dbcd6612fdc5d762157ccdc","fireworks.json":"42a2685a2ed9ba21033aff88ac66721e6f749a321a0aa8b7b9a7b5020e745537","github-copilot.json":"9ed67e5c0104ec237e9befcb9a50a18bd7d65e1539cd9f0638d2bc20bd82ef60","google-vertex.json":"40090c680538bc867f2624d986a449f361be4dfa6ba96d7a27402050f036e009","google.json":"c0f5a633e5e5a5044432db3e537f4bc674d4de18df09325c6349547fcc13cabe","groq.json":"910952ad9dad07856983459d63fce0148dba1203edd7b10d801a77c5824f3405","huggingface.json":"1b8604bd31a5e05fe43a40ec1ec6dfc1a51a28b0b020151ef057fab43f57c923","meta.json":"0c7e9a370a7005c5a89dc94f0f93bc67b8935c3f802de324f11af6ff56fff429","minimax-cn.json":"f962c20ee6a6a342820f778e9dc363a18a524bf11998f6e2c57f2989915d62e5","minimax.json":"17a432f80d0ea6dd26eade80a4314250d3a855678601728a5f70dd8fa0d21dd2","mistral.json":"10f33bff9adf1248f7e6848e5890c265399f1f94e5b42cfdc28c109d547af98d","moonshotai-cn.json":"660d8e22cf806e0f8790d6c15069f5e505d654251b3e589ddf71c2cdf9be7217","moonshotai.json":"34f055aa7a885b987782f17dcab4c0ccdf059f709c847a50eba52838dae6f222","nvidia.json":"3b4e7b799bf3eaacd1af0491eef77fe33147ea7f72a3a9fa54d77af0e7eacf4c","openai.json":"9104538118053eed57f90852332b6ad274a4e4792389bdbc9cfca1ae400c705a","opencode-go.json":"82e416a53efa53fed4c4e3dc0ed837fe2a0d53f110528f65af843e6fa08599e5","opencode.json":"2fe541b47c30016a69a2dd495ac1f9926ff8ff16f966f99d6652522428d86628","opengateway.json":"98b04433187e2e327c3ef72f2856fae446a908258db362f232afe6f24c20717e","openrouter.json":"956190ac3c151292c89c5afb80b2a863b8619695018a6630bc5f1032c65bd7d6","qwen-token-plan-cn.json":"2469a4091c474ec3db0a49a9962d8d2726c074ad9065b96bc4e0c87861c4c6c5","qwen-token-plan-individual.json":"0fb7cf64faf39d1a3b0a884210a86c87084b805eda15644f5f39293287b959dd","qwen-token-plan.json":"eff10620cb577142de4ec02698d5961a71fda2fe4f6ae7ea9432bad9d6844176","radius.json":"443459e1b4a1282261e665d2557be397017e2c94ac41cc213fb40878ac7b0caf","together.json":"94ec3839972061405885d64f5fdbde48eb1f29a159be5e607e9770befd54e28e","typesafe.json":"a4429a2f696d5cc5273969af61a7310bda07d6bdcd27bf9ac9c76c534cc43716","venice.json":"51faed9c79b425767a0269a2a212c91a1fb7e8bbea4ea9de64d9213c8f58b516","vercel-ai-gateway.json":"8a02ec4ae29a203681dcdfc81dec046d7e9b191596ff8c9e2baef11d4271b4a1","xai.json":"d7771a1450b21c1f6aee887ca6fea61b6e7b3fc13b4dee5cf72a71134fe623bc","xiaomi-token-plan-ams.json":"4dd8f838e21d7aa7caf3122d0b0b1e5a02a33bc012b96e6a75bd119334152d7a","xiaomi-token-plan-cn.json":"46414ff49973b95a0c14bd33e8992cc1938a50ce2c7cea9e2e5cc02de8f1df31","xiaomi-token-plan-sgp.json":"f5b3f66bf7bb7238592d4a9667cad983a008d7539a66e9896b02422622800935","xiaomi.json":"8b62c158d55d5a165f35cd72c1fc82ab89ff8e73f08960105fc41b822f236f69","zai-coding-cn.json":"ee5ee705fb6e413a6088db5e3616c27fce802a8ece6c355f1db35490d787f610","zai.json":"58e6642fdfb736f0b9a4a277c760c536a3cea66a030abbfb2615f7b2851d5c6f"}}
|