@ai-sdk/deepinfra 3.0.99 → 3.0.100
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/CHANGELOG.md +6 -0
- package/dist/index.d.ts +500 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +508 -579
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/deepinfra-model-catalog.ts +616 -363
package/dist/index.js
CHANGED
|
@@ -1,63 +1,6 @@
|
|
|
1
1
|
import { OpenAICompatibleChatLanguageModel, OpenAICompatibleCompletionLanguageModel, OpenAICompatibleEmbeddingModel } from "@ai-sdk/openai-compatible";
|
|
2
2
|
import { WORKFLOW_DESERIALIZE, WORKFLOW_SERIALIZE, combineHeaders, convertBase64ToUint8Array, convertToFormData, createJsonErrorResponseHandler, createJsonResponseHandler, downloadBlob, lazySchema, loadApiKey, parseProviderOptions, postFormDataToApi, postJsonToApi, resolve, resolveWith, serializeModelOptions, withUserAgentSuffix, withoutTrailingSlash, zodSchema } from "@ai-sdk/provider-utils";
|
|
3
3
|
import { z } from "zod/v4";
|
|
4
|
-
//#region src/deepinfra-model-catalog.ts
|
|
5
|
-
const imageDetails = {
|
|
6
|
-
"stabilityai/sd3.5": {
|
|
7
|
-
dimensionSpecification: "Aspect Ratio",
|
|
8
|
-
notes: "Premium quality base model, 8B parameters"
|
|
9
|
-
},
|
|
10
|
-
"black-forest-labs/FLUX-1.1-pro": {
|
|
11
|
-
dimensionSpecification: "Size",
|
|
12
|
-
notes: "Latest state-of-art model with superior prompt following"
|
|
13
|
-
},
|
|
14
|
-
"black-forest-labs/FLUX-1-schnell": {
|
|
15
|
-
dimensionSpecification: "Size",
|
|
16
|
-
notes: "Fast generation in 1-4 steps"
|
|
17
|
-
},
|
|
18
|
-
"black-forest-labs/FLUX-1-dev": {
|
|
19
|
-
dimensionSpecification: "Size",
|
|
20
|
-
notes: "Optimized for anatomical accuracy"
|
|
21
|
-
},
|
|
22
|
-
"black-forest-labs/FLUX-pro": {
|
|
23
|
-
dimensionSpecification: "Size",
|
|
24
|
-
notes: "Flagship Flux model"
|
|
25
|
-
},
|
|
26
|
-
"black-forest-labs/FLUX.1-Kontext-dev": {
|
|
27
|
-
dimensionSpecification: "Size",
|
|
28
|
-
notes: "Image editing and transformation model"
|
|
29
|
-
},
|
|
30
|
-
"black-forest-labs/FLUX.1-Kontext-pro": {
|
|
31
|
-
dimensionSpecification: "Size",
|
|
32
|
-
notes: "Professional image editing and transformation"
|
|
33
|
-
},
|
|
34
|
-
"stabilityai/sd3.5-medium": {
|
|
35
|
-
dimensionSpecification: "Aspect Ratio",
|
|
36
|
-
notes: "Balanced 2.5B parameter model"
|
|
37
|
-
},
|
|
38
|
-
"stabilityai/sdxl-turbo": {
|
|
39
|
-
dimensionSpecification: "Aspect Ratio",
|
|
40
|
-
notes: "Optimized for fast generation"
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
const embeddingTokenLimits = {
|
|
44
|
-
"BAAI/bge-base-en-v1.5": 512,
|
|
45
|
-
"BAAI/bge-large-en-v1.5": 512,
|
|
46
|
-
"BAAI/bge-m3": 8192,
|
|
47
|
-
"intfloat/e5-base-v2": 512,
|
|
48
|
-
"intfloat/e5-large-v2": 512,
|
|
49
|
-
"intfloat/multilingual-e5-large": 512,
|
|
50
|
-
"sentence-transformers/all-MiniLM-L12-v2": 256,
|
|
51
|
-
"sentence-transformers/all-MiniLM-L6-v2": 256,
|
|
52
|
-
"sentence-transformers/all-mpnet-base-v2": 384,
|
|
53
|
-
"sentence-transformers/clip-ViT-B-32": 77,
|
|
54
|
-
"sentence-transformers/clip-ViT-B-32-multilingual-v1": 77,
|
|
55
|
-
"sentence-transformers/multi-qa-mpnet-base-dot-v1": 512,
|
|
56
|
-
"sentence-transformers/paraphrase-MiniLM-L6-v2": 128,
|
|
57
|
-
"shibing624/text2vec-base-chinese": 512,
|
|
58
|
-
"thenlper/gte-base": 512,
|
|
59
|
-
"thenlper/gte-large": 512
|
|
60
|
-
};
|
|
61
4
|
/** Known options accepted under providerOptions; open-ended extension keys remain undeclared. */
|
|
62
5
|
const deepInfraProviderOptions = {
|
|
63
6
|
embedding: {
|
|
@@ -84,602 +27,588 @@ const deepInfraProviderOptions = {
|
|
|
84
27
|
user: { description: "user" }
|
|
85
28
|
}
|
|
86
29
|
};
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
"
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
"
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
"
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
"
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
"
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
"
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
"
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
"
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
"
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
"
|
|
154
|
-
|
|
155
|
-
"Sao10K/L3-8B-Lunaris-v1",
|
|
156
|
-
"Sao10K/L3.1-70B-Euryale-v2.2"
|
|
157
|
-
];
|
|
158
|
-
const embeddingModelIds = [
|
|
159
|
-
"BAAI/bge-base-en-v1.5",
|
|
160
|
-
"BAAI/bge-large-en-v1.5",
|
|
161
|
-
"BAAI/bge-m3",
|
|
162
|
-
"intfloat/e5-base-v2",
|
|
163
|
-
"intfloat/e5-large-v2",
|
|
164
|
-
"intfloat/multilingual-e5-large",
|
|
165
|
-
"sentence-transformers/all-MiniLM-L12-v2",
|
|
166
|
-
"sentence-transformers/all-MiniLM-L6-v2",
|
|
167
|
-
"sentence-transformers/all-mpnet-base-v2",
|
|
168
|
-
"sentence-transformers/clip-ViT-B-32",
|
|
169
|
-
"sentence-transformers/clip-ViT-B-32-multilingual-v1",
|
|
170
|
-
"sentence-transformers/multi-qa-mpnet-base-dot-v1",
|
|
171
|
-
"sentence-transformers/paraphrase-MiniLM-L6-v2",
|
|
172
|
-
"shibing624/text2vec-base-chinese",
|
|
173
|
-
"thenlper/gte-base",
|
|
174
|
-
"thenlper/gte-large"
|
|
175
|
-
];
|
|
176
|
-
const imageModelIds = [
|
|
177
|
-
"stabilityai/sd3.5",
|
|
178
|
-
"black-forest-labs/FLUX-1.1-pro",
|
|
179
|
-
"black-forest-labs/FLUX-1-schnell",
|
|
180
|
-
"black-forest-labs/FLUX-1-dev",
|
|
181
|
-
"black-forest-labs/FLUX-pro",
|
|
182
|
-
"black-forest-labs/FLUX.1-Kontext-dev",
|
|
183
|
-
"black-forest-labs/FLUX.1-Kontext-pro",
|
|
184
|
-
"stabilityai/sd3.5-medium",
|
|
185
|
-
"stabilityai/sdxl-turbo"
|
|
186
|
-
];
|
|
187
|
-
const documentedLanguageCapabilities = {
|
|
188
|
-
"meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8": {
|
|
189
|
-
inputs: {
|
|
190
|
-
image: true,
|
|
191
|
-
audio: "unknown"
|
|
192
|
-
},
|
|
30
|
+
function toolCapabilities(functionTools) {
|
|
31
|
+
return {
|
|
32
|
+
usage: functionTools === "unknown" ? "unknown" : functionTools !== false,
|
|
33
|
+
streaming: functionTools === "unknown" ? "unknown" : functionTools !== false && functionTools.includes("streaming")
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Language model matrix: model IDs by capability. To add a model, add a row
|
|
38
|
+
* and fill in every column.
|
|
39
|
+
*/
|
|
40
|
+
const languageModelDefinitions = {
|
|
41
|
+
"01-ai/Yi-34B-Chat": {
|
|
42
|
+
image: "unknown",
|
|
43
|
+
objectGeneration: "unknown",
|
|
44
|
+
functionTools: "unknown"
|
|
45
|
+
},
|
|
46
|
+
"Austism/chronos-hermes-13b-v2": {
|
|
47
|
+
image: "unknown",
|
|
48
|
+
objectGeneration: "unknown",
|
|
49
|
+
functionTools: "unknown"
|
|
50
|
+
},
|
|
51
|
+
"bigcode/starcoder2-15b-instruct-v0.1": {
|
|
52
|
+
image: "unknown",
|
|
53
|
+
objectGeneration: "unknown",
|
|
54
|
+
functionTools: "unknown"
|
|
55
|
+
},
|
|
56
|
+
"bigcode/starcoder2-15b": {
|
|
57
|
+
image: "unknown",
|
|
58
|
+
objectGeneration: "unknown",
|
|
59
|
+
functionTools: "unknown"
|
|
60
|
+
},
|
|
61
|
+
"codellama/CodeLlama-34b-Instruct-hf": {
|
|
62
|
+
image: "unknown",
|
|
63
|
+
objectGeneration: "unknown",
|
|
64
|
+
functionTools: "unknown"
|
|
65
|
+
},
|
|
66
|
+
"codellama/CodeLlama-70b-Instruct-hf": {
|
|
67
|
+
image: "unknown",
|
|
68
|
+
objectGeneration: "unknown",
|
|
69
|
+
functionTools: "unknown"
|
|
70
|
+
},
|
|
71
|
+
"cognitivecomputations/dolphin-2.6-mixtral-8x7b": {
|
|
72
|
+
image: "unknown",
|
|
73
|
+
objectGeneration: "unknown",
|
|
74
|
+
functionTools: "unknown"
|
|
75
|
+
},
|
|
76
|
+
"cognitivecomputations/dolphin-2.9.1-llama-3-70b": {
|
|
77
|
+
image: "unknown",
|
|
78
|
+
objectGeneration: "unknown",
|
|
79
|
+
functionTools: "unknown"
|
|
80
|
+
},
|
|
81
|
+
"databricks/dbrx-instruct": {
|
|
82
|
+
image: "unknown",
|
|
83
|
+
objectGeneration: "unknown",
|
|
84
|
+
functionTools: "unknown"
|
|
85
|
+
},
|
|
86
|
+
"deepinfra/airoboros-70b": {
|
|
87
|
+
image: "unknown",
|
|
88
|
+
objectGeneration: "unknown",
|
|
89
|
+
functionTools: "unknown"
|
|
90
|
+
},
|
|
91
|
+
"deepseek-ai/DeepSeek-V3": {
|
|
92
|
+
image: false,
|
|
93
|
+
objectGeneration: true,
|
|
94
|
+
functionTools: ["streaming"]
|
|
95
|
+
},
|
|
96
|
+
"deepseek-ai/DeepSeek-R1": {
|
|
97
|
+
image: false,
|
|
193
98
|
objectGeneration: false,
|
|
194
|
-
|
|
195
|
-
usage: false,
|
|
196
|
-
streaming: false
|
|
197
|
-
},
|
|
198
|
-
reasoning: { support: "unknown" },
|
|
199
|
-
sampling: {
|
|
200
|
-
temperature: "unknown",
|
|
201
|
-
topP: "unknown",
|
|
202
|
-
logprobs: "unknown"
|
|
203
|
-
}
|
|
99
|
+
functionTools: false
|
|
204
100
|
},
|
|
205
|
-
"
|
|
206
|
-
|
|
207
|
-
image: true,
|
|
208
|
-
audio: "unknown"
|
|
209
|
-
},
|
|
101
|
+
"deepseek-ai/DeepSeek-R1-Distill-Llama-70B": {
|
|
102
|
+
image: false,
|
|
210
103
|
objectGeneration: false,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
104
|
+
functionTools: false
|
|
105
|
+
},
|
|
106
|
+
"deepseek-ai/DeepSeek-R1-Turbo": {
|
|
107
|
+
image: false,
|
|
108
|
+
objectGeneration: false,
|
|
109
|
+
functionTools: false
|
|
110
|
+
},
|
|
111
|
+
"google/codegemma-7b-it": {
|
|
112
|
+
image: false,
|
|
113
|
+
objectGeneration: false,
|
|
114
|
+
functionTools: false
|
|
115
|
+
},
|
|
116
|
+
"google/gemma-1.1-7b-it": {
|
|
117
|
+
image: "unknown",
|
|
118
|
+
objectGeneration: "unknown",
|
|
119
|
+
functionTools: "unknown"
|
|
120
|
+
},
|
|
121
|
+
"google/gemma-2-27b-it": {
|
|
122
|
+
image: "unknown",
|
|
123
|
+
objectGeneration: "unknown",
|
|
124
|
+
functionTools: "unknown"
|
|
125
|
+
},
|
|
126
|
+
"google/gemma-2-9b-it": {
|
|
127
|
+
image: false,
|
|
128
|
+
objectGeneration: false,
|
|
129
|
+
functionTools: false
|
|
130
|
+
},
|
|
131
|
+
"Gryphe/MythoMax-L2-13b-turbo": {
|
|
132
|
+
image: "unknown",
|
|
133
|
+
objectGeneration: "unknown",
|
|
134
|
+
functionTools: "unknown"
|
|
135
|
+
},
|
|
136
|
+
"Gryphe/MythoMax-L2-13b": {
|
|
137
|
+
image: "unknown",
|
|
138
|
+
objectGeneration: "unknown",
|
|
139
|
+
functionTools: "unknown"
|
|
140
|
+
},
|
|
141
|
+
"HuggingFaceH4/zephyr-orpo-141b-A35b-v0.1": {
|
|
142
|
+
image: "unknown",
|
|
143
|
+
objectGeneration: "unknown",
|
|
144
|
+
functionTools: "unknown"
|
|
145
|
+
},
|
|
146
|
+
"KoboldAI/LLaMA2-13B-Tiefighter": {
|
|
147
|
+
image: "unknown",
|
|
148
|
+
objectGeneration: "unknown",
|
|
149
|
+
functionTools: "unknown"
|
|
150
|
+
},
|
|
151
|
+
"lizpreciatior/lzlv_70b_fp16_hf": {
|
|
152
|
+
image: "unknown",
|
|
153
|
+
objectGeneration: "unknown",
|
|
154
|
+
functionTools: "unknown"
|
|
155
|
+
},
|
|
156
|
+
"mattshumer/Reflection-Llama-3.1-70B": {
|
|
157
|
+
image: "unknown",
|
|
158
|
+
objectGeneration: "unknown",
|
|
159
|
+
functionTools: "unknown"
|
|
160
|
+
},
|
|
161
|
+
"meta-llama/Llama-2-13b-chat-hf": {
|
|
162
|
+
image: "unknown",
|
|
163
|
+
objectGeneration: "unknown",
|
|
164
|
+
functionTools: "unknown"
|
|
165
|
+
},
|
|
166
|
+
"meta-llama/Llama-2-70b-chat-hf": {
|
|
167
|
+
image: "unknown",
|
|
168
|
+
objectGeneration: "unknown",
|
|
169
|
+
functionTools: "unknown"
|
|
170
|
+
},
|
|
171
|
+
"meta-llama/Llama-2-7b-chat-hf": {
|
|
172
|
+
image: "unknown",
|
|
173
|
+
objectGeneration: "unknown",
|
|
174
|
+
functionTools: "unknown"
|
|
175
|
+
},
|
|
176
|
+
"meta-llama/Llama-3.2-11B-Vision-Instruct": {
|
|
177
|
+
image: true,
|
|
178
|
+
objectGeneration: true,
|
|
179
|
+
functionTools: false
|
|
180
|
+
},
|
|
181
|
+
"meta-llama/Llama-3.2-1B-Instruct": {
|
|
182
|
+
image: "unknown",
|
|
183
|
+
objectGeneration: "unknown",
|
|
184
|
+
functionTools: "unknown"
|
|
185
|
+
},
|
|
186
|
+
"meta-llama/Llama-3.2-3B-Instruct": {
|
|
187
|
+
image: "unknown",
|
|
188
|
+
objectGeneration: "unknown",
|
|
189
|
+
functionTools: "unknown"
|
|
190
|
+
},
|
|
191
|
+
"meta-llama/Llama-3.2-90B-Vision-Instruct": {
|
|
192
|
+
image: true,
|
|
193
|
+
objectGeneration: true,
|
|
194
|
+
functionTools: false
|
|
221
195
|
},
|
|
222
196
|
"meta-llama/Llama-3.3-70B-Instruct-Turbo": {
|
|
223
|
-
|
|
224
|
-
image: false,
|
|
225
|
-
audio: "unknown"
|
|
226
|
-
},
|
|
197
|
+
image: false,
|
|
227
198
|
objectGeneration: true,
|
|
228
|
-
|
|
229
|
-
usage: true,
|
|
230
|
-
streaming: true
|
|
231
|
-
},
|
|
232
|
-
reasoning: { support: "unknown" },
|
|
233
|
-
sampling: {
|
|
234
|
-
temperature: "unknown",
|
|
235
|
-
topP: "unknown",
|
|
236
|
-
logprobs: "unknown"
|
|
237
|
-
}
|
|
199
|
+
functionTools: ["streaming"]
|
|
238
200
|
},
|
|
239
201
|
"meta-llama/Llama-3.3-70B-Instruct": {
|
|
240
|
-
|
|
241
|
-
image: false,
|
|
242
|
-
audio: "unknown"
|
|
243
|
-
},
|
|
202
|
+
image: false,
|
|
244
203
|
objectGeneration: true,
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
204
|
+
functionTools: ["streaming"]
|
|
205
|
+
},
|
|
206
|
+
"meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8": {
|
|
207
|
+
image: true,
|
|
208
|
+
objectGeneration: false,
|
|
209
|
+
functionTools: false
|
|
210
|
+
},
|
|
211
|
+
"meta-llama/Llama-4-Scout-17B-16E-Instruct": {
|
|
212
|
+
image: true,
|
|
213
|
+
objectGeneration: false,
|
|
214
|
+
functionTools: false
|
|
215
|
+
},
|
|
216
|
+
"meta-llama/Meta-Llama-3-70B-Instruct": {
|
|
217
|
+
image: "unknown",
|
|
218
|
+
objectGeneration: "unknown",
|
|
219
|
+
functionTools: "unknown"
|
|
220
|
+
},
|
|
221
|
+
"meta-llama/Meta-Llama-3-8B-Instruct": {
|
|
222
|
+
image: "unknown",
|
|
223
|
+
objectGeneration: "unknown",
|
|
224
|
+
functionTools: "unknown"
|
|
255
225
|
},
|
|
256
226
|
"meta-llama/Meta-Llama-3.1-405B-Instruct": {
|
|
257
|
-
|
|
258
|
-
image: false,
|
|
259
|
-
audio: "unknown"
|
|
260
|
-
},
|
|
227
|
+
image: false,
|
|
261
228
|
objectGeneration: true,
|
|
262
|
-
|
|
263
|
-
usage: true,
|
|
264
|
-
streaming: true
|
|
265
|
-
},
|
|
266
|
-
reasoning: { support: "unknown" },
|
|
267
|
-
sampling: {
|
|
268
|
-
temperature: "unknown",
|
|
269
|
-
topP: "unknown",
|
|
270
|
-
logprobs: "unknown"
|
|
271
|
-
}
|
|
229
|
+
functionTools: ["streaming"]
|
|
272
230
|
},
|
|
273
231
|
"meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo": {
|
|
274
|
-
|
|
275
|
-
image: false,
|
|
276
|
-
audio: "unknown"
|
|
277
|
-
},
|
|
232
|
+
image: false,
|
|
278
233
|
objectGeneration: true,
|
|
279
|
-
|
|
280
|
-
usage: true,
|
|
281
|
-
streaming: true
|
|
282
|
-
},
|
|
283
|
-
reasoning: { support: "unknown" },
|
|
284
|
-
sampling: {
|
|
285
|
-
temperature: "unknown",
|
|
286
|
-
topP: "unknown",
|
|
287
|
-
logprobs: "unknown"
|
|
288
|
-
}
|
|
234
|
+
functionTools: ["streaming"]
|
|
289
235
|
},
|
|
290
236
|
"meta-llama/Meta-Llama-3.1-70B-Instruct": {
|
|
291
|
-
|
|
292
|
-
image: false,
|
|
293
|
-
audio: "unknown"
|
|
294
|
-
},
|
|
237
|
+
image: false,
|
|
295
238
|
objectGeneration: true,
|
|
296
|
-
|
|
297
|
-
usage: true,
|
|
298
|
-
streaming: true
|
|
299
|
-
},
|
|
300
|
-
reasoning: { support: "unknown" },
|
|
301
|
-
sampling: {
|
|
302
|
-
temperature: "unknown",
|
|
303
|
-
topP: "unknown",
|
|
304
|
-
logprobs: "unknown"
|
|
305
|
-
}
|
|
239
|
+
functionTools: ["streaming"]
|
|
306
240
|
},
|
|
307
241
|
"meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo": {
|
|
308
|
-
|
|
309
|
-
image: false,
|
|
310
|
-
audio: "unknown"
|
|
311
|
-
},
|
|
242
|
+
image: false,
|
|
312
243
|
objectGeneration: true,
|
|
313
|
-
|
|
314
|
-
usage: true,
|
|
315
|
-
streaming: false
|
|
316
|
-
},
|
|
317
|
-
reasoning: { support: "unknown" },
|
|
318
|
-
sampling: {
|
|
319
|
-
temperature: "unknown",
|
|
320
|
-
topP: "unknown",
|
|
321
|
-
logprobs: "unknown"
|
|
322
|
-
}
|
|
244
|
+
functionTools: []
|
|
323
245
|
},
|
|
324
246
|
"meta-llama/Meta-Llama-3.1-8B-Instruct": {
|
|
325
|
-
|
|
326
|
-
image: false,
|
|
327
|
-
audio: "unknown"
|
|
328
|
-
},
|
|
247
|
+
image: false,
|
|
329
248
|
objectGeneration: true,
|
|
330
|
-
|
|
331
|
-
usage: true,
|
|
332
|
-
streaming: true
|
|
333
|
-
},
|
|
334
|
-
reasoning: { support: "unknown" },
|
|
335
|
-
sampling: {
|
|
336
|
-
temperature: "unknown",
|
|
337
|
-
topP: "unknown",
|
|
338
|
-
logprobs: "unknown"
|
|
339
|
-
}
|
|
249
|
+
functionTools: ["streaming"]
|
|
340
250
|
},
|
|
341
|
-
"
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
},
|
|
346
|
-
objectGeneration: true,
|
|
347
|
-
tools: {
|
|
348
|
-
usage: false,
|
|
349
|
-
streaming: false
|
|
350
|
-
},
|
|
351
|
-
reasoning: { support: "unknown" },
|
|
352
|
-
sampling: {
|
|
353
|
-
temperature: "unknown",
|
|
354
|
-
topP: "unknown",
|
|
355
|
-
logprobs: "unknown"
|
|
356
|
-
}
|
|
251
|
+
"microsoft/Phi-3-medium-4k-instruct": {
|
|
252
|
+
image: "unknown",
|
|
253
|
+
objectGeneration: "unknown",
|
|
254
|
+
functionTools: "unknown"
|
|
357
255
|
},
|
|
358
|
-
"
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
256
|
+
"microsoft/WizardLM-2-7B": {
|
|
257
|
+
image: "unknown",
|
|
258
|
+
objectGeneration: "unknown",
|
|
259
|
+
functionTools: "unknown"
|
|
260
|
+
},
|
|
261
|
+
"microsoft/WizardLM-2-8x22B": {
|
|
262
|
+
image: false,
|
|
263
|
+
objectGeneration: false,
|
|
264
|
+
functionTools: false
|
|
265
|
+
},
|
|
266
|
+
"mistralai/Mistral-7B-Instruct-v0.1": {
|
|
267
|
+
image: "unknown",
|
|
268
|
+
objectGeneration: "unknown",
|
|
269
|
+
functionTools: "unknown"
|
|
270
|
+
},
|
|
271
|
+
"mistralai/Mistral-7B-Instruct-v0.2": {
|
|
272
|
+
image: "unknown",
|
|
273
|
+
objectGeneration: "unknown",
|
|
274
|
+
functionTools: "unknown"
|
|
275
|
+
},
|
|
276
|
+
"mistralai/Mistral-7B-Instruct-v0.3": {
|
|
277
|
+
image: "unknown",
|
|
278
|
+
objectGeneration: "unknown",
|
|
279
|
+
functionTools: "unknown"
|
|
280
|
+
},
|
|
281
|
+
"mistralai/Mistral-Nemo-Instruct-2407": {
|
|
282
|
+
image: "unknown",
|
|
283
|
+
objectGeneration: "unknown",
|
|
284
|
+
functionTools: "unknown"
|
|
285
|
+
},
|
|
286
|
+
"mistralai/Mixtral-8x22B-Instruct-v0.1": {
|
|
287
|
+
image: "unknown",
|
|
288
|
+
objectGeneration: "unknown",
|
|
289
|
+
functionTools: "unknown"
|
|
290
|
+
},
|
|
291
|
+
"mistralai/Mixtral-8x22B-v0.1": {
|
|
292
|
+
image: "unknown",
|
|
293
|
+
objectGeneration: "unknown",
|
|
294
|
+
functionTools: "unknown"
|
|
374
295
|
},
|
|
375
296
|
"mistralai/Mixtral-8x7B-Instruct-v0.1": {
|
|
376
|
-
|
|
377
|
-
image: false,
|
|
378
|
-
audio: "unknown"
|
|
379
|
-
},
|
|
297
|
+
image: false,
|
|
380
298
|
objectGeneration: true,
|
|
381
|
-
|
|
382
|
-
usage: true,
|
|
383
|
-
streaming: false
|
|
384
|
-
},
|
|
385
|
-
reasoning: { support: "unknown" },
|
|
386
|
-
sampling: {
|
|
387
|
-
temperature: "unknown",
|
|
388
|
-
topP: "unknown",
|
|
389
|
-
logprobs: "unknown"
|
|
390
|
-
}
|
|
299
|
+
functionTools: []
|
|
391
300
|
},
|
|
392
|
-
"
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
301
|
+
"NousResearch/Hermes-3-Llama-3.1-405B": {
|
|
302
|
+
image: "unknown",
|
|
303
|
+
objectGeneration: "unknown",
|
|
304
|
+
functionTools: "unknown"
|
|
305
|
+
},
|
|
306
|
+
"nvidia/Llama-3.1-Nemotron-70B-Instruct": {
|
|
307
|
+
image: false,
|
|
397
308
|
objectGeneration: true,
|
|
398
|
-
|
|
399
|
-
usage: true,
|
|
400
|
-
streaming: true
|
|
401
|
-
},
|
|
402
|
-
reasoning: { support: "unknown" },
|
|
403
|
-
sampling: {
|
|
404
|
-
temperature: "unknown",
|
|
405
|
-
topP: "unknown",
|
|
406
|
-
logprobs: "unknown"
|
|
407
|
-
}
|
|
309
|
+
functionTools: []
|
|
408
310
|
},
|
|
409
|
-
"
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
},
|
|
414
|
-
objectGeneration: false,
|
|
415
|
-
tools: {
|
|
416
|
-
usage: false,
|
|
417
|
-
streaming: false
|
|
418
|
-
},
|
|
419
|
-
reasoning: { support: "unknown" },
|
|
420
|
-
sampling: {
|
|
421
|
-
temperature: "unknown",
|
|
422
|
-
topP: "unknown",
|
|
423
|
-
logprobs: "unknown"
|
|
424
|
-
}
|
|
311
|
+
"nvidia/Nemotron-4-340B-Instruct": {
|
|
312
|
+
image: "unknown",
|
|
313
|
+
objectGeneration: "unknown",
|
|
314
|
+
functionTools: "unknown"
|
|
425
315
|
},
|
|
426
|
-
"
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
},
|
|
431
|
-
objectGeneration: false,
|
|
432
|
-
tools: {
|
|
433
|
-
usage: false,
|
|
434
|
-
streaming: false
|
|
435
|
-
},
|
|
436
|
-
reasoning: { support: "unknown" },
|
|
437
|
-
sampling: {
|
|
438
|
-
temperature: "unknown",
|
|
439
|
-
topP: "unknown",
|
|
440
|
-
logprobs: "unknown"
|
|
441
|
-
}
|
|
316
|
+
"openbmb/MiniCPM-Llama3-V-2_5": {
|
|
317
|
+
image: "unknown",
|
|
318
|
+
objectGeneration: "unknown",
|
|
319
|
+
functionTools: "unknown"
|
|
442
320
|
},
|
|
443
|
-
"
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
},
|
|
448
|
-
objectGeneration: false,
|
|
449
|
-
tools: {
|
|
450
|
-
usage: false,
|
|
451
|
-
streaming: false
|
|
452
|
-
},
|
|
453
|
-
reasoning: { support: "unknown" },
|
|
454
|
-
sampling: {
|
|
455
|
-
temperature: "unknown",
|
|
456
|
-
topP: "unknown",
|
|
457
|
-
logprobs: "unknown"
|
|
458
|
-
}
|
|
321
|
+
"openchat/openchat_3.5": {
|
|
322
|
+
image: "unknown",
|
|
323
|
+
objectGeneration: "unknown",
|
|
324
|
+
functionTools: "unknown"
|
|
459
325
|
},
|
|
460
|
-
"
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
logprobs: "unknown"
|
|
475
|
-
}
|
|
326
|
+
"openchat/openchat-3.6-8b": {
|
|
327
|
+
image: "unknown",
|
|
328
|
+
objectGeneration: "unknown",
|
|
329
|
+
functionTools: "unknown"
|
|
330
|
+
},
|
|
331
|
+
"Phind/Phind-CodeLlama-34B-v2": {
|
|
332
|
+
image: "unknown",
|
|
333
|
+
objectGeneration: "unknown",
|
|
334
|
+
functionTools: "unknown"
|
|
335
|
+
},
|
|
336
|
+
"Qwen/Qwen2-72B-Instruct": {
|
|
337
|
+
image: "unknown",
|
|
338
|
+
objectGeneration: "unknown",
|
|
339
|
+
functionTools: "unknown"
|
|
476
340
|
},
|
|
477
341
|
"Qwen/Qwen2-7B-Instruct": {
|
|
478
|
-
|
|
479
|
-
image: false,
|
|
480
|
-
audio: "unknown"
|
|
481
|
-
},
|
|
342
|
+
image: false,
|
|
482
343
|
objectGeneration: true,
|
|
483
|
-
|
|
484
|
-
usage: false,
|
|
485
|
-
streaming: false
|
|
486
|
-
},
|
|
487
|
-
reasoning: { support: "unknown" },
|
|
488
|
-
sampling: {
|
|
489
|
-
temperature: "unknown",
|
|
490
|
-
topP: "unknown",
|
|
491
|
-
logprobs: "unknown"
|
|
492
|
-
}
|
|
344
|
+
functionTools: false
|
|
493
345
|
},
|
|
494
346
|
"Qwen/Qwen2.5-72B-Instruct": {
|
|
495
|
-
|
|
496
|
-
image: false,
|
|
497
|
-
audio: "unknown"
|
|
498
|
-
},
|
|
347
|
+
image: false,
|
|
499
348
|
objectGeneration: true,
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
temperature: "unknown",
|
|
507
|
-
topP: "unknown",
|
|
508
|
-
logprobs: "unknown"
|
|
509
|
-
}
|
|
349
|
+
functionTools: ["streaming"]
|
|
350
|
+
},
|
|
351
|
+
"Qwen/Qwen2.5-7B-Instruct": {
|
|
352
|
+
image: "unknown",
|
|
353
|
+
objectGeneration: "unknown",
|
|
354
|
+
functionTools: "unknown"
|
|
510
355
|
},
|
|
511
356
|
"Qwen/Qwen2.5-Coder-32B-Instruct": {
|
|
512
|
-
|
|
513
|
-
image: false,
|
|
514
|
-
audio: "unknown"
|
|
515
|
-
},
|
|
357
|
+
image: false,
|
|
516
358
|
objectGeneration: true,
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
temperature: "unknown",
|
|
524
|
-
topP: "unknown",
|
|
525
|
-
logprobs: "unknown"
|
|
526
|
-
}
|
|
359
|
+
functionTools: false
|
|
360
|
+
},
|
|
361
|
+
"Qwen/Qwen2.5-Coder-7B": {
|
|
362
|
+
image: "unknown",
|
|
363
|
+
objectGeneration: "unknown",
|
|
364
|
+
functionTools: "unknown"
|
|
527
365
|
},
|
|
528
366
|
"Qwen/QwQ-32B-Preview": {
|
|
529
|
-
|
|
530
|
-
image: false,
|
|
531
|
-
audio: "unknown"
|
|
532
|
-
},
|
|
367
|
+
image: false,
|
|
533
368
|
objectGeneration: true,
|
|
534
|
-
|
|
535
|
-
usage: false,
|
|
536
|
-
streaming: false
|
|
537
|
-
},
|
|
538
|
-
reasoning: { support: "unknown" },
|
|
539
|
-
sampling: {
|
|
540
|
-
temperature: "unknown",
|
|
541
|
-
topP: "unknown",
|
|
542
|
-
logprobs: "unknown"
|
|
543
|
-
}
|
|
544
|
-
},
|
|
545
|
-
"google/codegemma-7b-it": {
|
|
546
|
-
inputs: {
|
|
547
|
-
image: false,
|
|
548
|
-
audio: "unknown"
|
|
549
|
-
},
|
|
550
|
-
objectGeneration: false,
|
|
551
|
-
tools: {
|
|
552
|
-
usage: false,
|
|
553
|
-
streaming: false
|
|
554
|
-
},
|
|
555
|
-
reasoning: { support: "unknown" },
|
|
556
|
-
sampling: {
|
|
557
|
-
temperature: "unknown",
|
|
558
|
-
topP: "unknown",
|
|
559
|
-
logprobs: "unknown"
|
|
560
|
-
}
|
|
369
|
+
functionTools: false
|
|
561
370
|
},
|
|
562
|
-
"
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
},
|
|
567
|
-
objectGeneration: false,
|
|
568
|
-
tools: {
|
|
569
|
-
usage: false,
|
|
570
|
-
streaming: false
|
|
571
|
-
},
|
|
572
|
-
reasoning: { support: "unknown" },
|
|
573
|
-
sampling: {
|
|
574
|
-
temperature: "unknown",
|
|
575
|
-
topP: "unknown",
|
|
576
|
-
logprobs: "unknown"
|
|
577
|
-
}
|
|
371
|
+
"Sao10K/L3-70B-Euryale-v2.1": {
|
|
372
|
+
image: "unknown",
|
|
373
|
+
objectGeneration: "unknown",
|
|
374
|
+
functionTools: "unknown"
|
|
578
375
|
},
|
|
579
|
-
"
|
|
580
|
-
inputs: {
|
|
581
|
-
image: false,
|
|
582
|
-
audio: "unknown"
|
|
583
|
-
},
|
|
584
|
-
objectGeneration: false,
|
|
585
|
-
tools: {
|
|
586
|
-
usage: false,
|
|
587
|
-
streaming: false
|
|
588
|
-
},
|
|
589
|
-
reasoning: { support: "unknown" },
|
|
590
|
-
sampling: {
|
|
591
|
-
temperature: "unknown",
|
|
592
|
-
topP: "unknown",
|
|
593
|
-
logprobs: "unknown"
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
};
|
|
597
|
-
const unknownLanguageCapabilities = {
|
|
598
|
-
inputs: {
|
|
376
|
+
"Sao10K/L3-8B-Lunaris-v1": {
|
|
599
377
|
image: "unknown",
|
|
600
|
-
|
|
378
|
+
objectGeneration: "unknown",
|
|
379
|
+
functionTools: "unknown"
|
|
601
380
|
},
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
},
|
|
607
|
-
reasoning: { support: "unknown" },
|
|
608
|
-
sampling: {
|
|
609
|
-
temperature: "unknown",
|
|
610
|
-
topP: "unknown",
|
|
611
|
-
logprobs: "unknown"
|
|
381
|
+
"Sao10K/L3.1-70B-Euryale-v2.2": {
|
|
382
|
+
image: "unknown",
|
|
383
|
+
objectGeneration: "unknown",
|
|
384
|
+
functionTools: "unknown"
|
|
612
385
|
}
|
|
613
386
|
};
|
|
614
|
-
|
|
387
|
+
/** Maps a matrix row to its entry. Nothing here inspects the model ID. */
|
|
388
|
+
function createLanguageModelEntry(row) {
|
|
615
389
|
return {
|
|
616
390
|
capabilities: { language: {
|
|
617
|
-
|
|
391
|
+
inputs: {
|
|
392
|
+
image: row.image,
|
|
393
|
+
audio: "unknown"
|
|
394
|
+
},
|
|
395
|
+
objectGeneration: row.objectGeneration,
|
|
396
|
+
tools: toolCapabilities(row.functionTools),
|
|
397
|
+
reasoning: { support: "unknown" },
|
|
398
|
+
sampling: {
|
|
399
|
+
temperature: "unknown",
|
|
400
|
+
topP: "unknown",
|
|
401
|
+
logprobs: "unknown"
|
|
402
|
+
},
|
|
618
403
|
structuredOutput: { jsonSchema: true }
|
|
619
404
|
} },
|
|
620
405
|
providerOptions: { language: Object.fromEntries(Object.keys(deepInfraProviderOptions.language).map((key) => [key, "unknown"])) }
|
|
621
406
|
};
|
|
622
407
|
}
|
|
623
|
-
const
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
"
|
|
627
|
-
"
|
|
628
|
-
"
|
|
629
|
-
"black-forest-labs/FLUX.1-Kontext-dev": true,
|
|
630
|
-
"black-forest-labs/FLUX.1-Kontext-pro": true,
|
|
631
|
-
"Qwen/Qwen-Image-Edit": true,
|
|
632
|
-
"stabilityai/sd3.5-medium": true,
|
|
633
|
-
"stabilityai/sdxl-turbo": true
|
|
408
|
+
const listedLanguageModelEntries = Object.fromEntries(Object.entries(languageModelDefinitions).map(([modelId, row]) => [modelId, createLanguageModelEntry(row)]));
|
|
409
|
+
/** Row for every language model ID that is not listed in the matrix. */
|
|
410
|
+
const unlistedLanguageModelRow = {
|
|
411
|
+
image: "unknown",
|
|
412
|
+
objectGeneration: "unknown",
|
|
413
|
+
functionTools: "unknown"
|
|
634
414
|
};
|
|
635
|
-
function
|
|
636
|
-
|
|
415
|
+
function getDeepInfraLanguageModelEntry(modelId) {
|
|
416
|
+
return Object.prototype.hasOwnProperty.call(listedLanguageModelEntries, modelId) ? listedLanguageModelEntries[modelId] : createLanguageModelEntry(unlistedLanguageModelRow);
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Image model matrix: model IDs by capability. To add a model, add a row and
|
|
420
|
+
* fill in every column.
|
|
421
|
+
*/
|
|
422
|
+
const imageModelDefinitions = {
|
|
423
|
+
"stabilityai/sd3.5": {
|
|
424
|
+
inModelIdType: true,
|
|
425
|
+
fileInput: true,
|
|
426
|
+
maskInput: true,
|
|
427
|
+
dimensionSpecification: "Aspect Ratio",
|
|
428
|
+
notes: "Premium quality base model, 8B parameters"
|
|
429
|
+
},
|
|
430
|
+
"black-forest-labs/FLUX-1.1-pro": {
|
|
431
|
+
inModelIdType: true,
|
|
432
|
+
fileInput: true,
|
|
433
|
+
maskInput: true,
|
|
434
|
+
dimensionSpecification: "Size",
|
|
435
|
+
notes: "Latest state-of-art model with superior prompt following"
|
|
436
|
+
},
|
|
437
|
+
"black-forest-labs/FLUX-1-schnell": {
|
|
438
|
+
inModelIdType: true,
|
|
439
|
+
fileInput: true,
|
|
440
|
+
maskInput: true,
|
|
441
|
+
dimensionSpecification: "Size",
|
|
442
|
+
notes: "Fast generation in 1-4 steps"
|
|
443
|
+
},
|
|
444
|
+
"black-forest-labs/FLUX-1-dev": {
|
|
445
|
+
inModelIdType: true,
|
|
446
|
+
fileInput: true,
|
|
447
|
+
maskInput: true,
|
|
448
|
+
dimensionSpecification: "Size",
|
|
449
|
+
notes: "Optimized for anatomical accuracy"
|
|
450
|
+
},
|
|
451
|
+
"black-forest-labs/FLUX-pro": {
|
|
452
|
+
inModelIdType: true,
|
|
453
|
+
fileInput: true,
|
|
454
|
+
maskInput: true,
|
|
455
|
+
dimensionSpecification: "Size",
|
|
456
|
+
notes: "Flagship Flux model"
|
|
457
|
+
},
|
|
458
|
+
"black-forest-labs/FLUX.1-Kontext-dev": {
|
|
459
|
+
inModelIdType: true,
|
|
460
|
+
fileInput: true,
|
|
461
|
+
maskInput: true,
|
|
462
|
+
dimensionSpecification: "Size",
|
|
463
|
+
notes: "Image editing and transformation model"
|
|
464
|
+
},
|
|
465
|
+
"black-forest-labs/FLUX.1-Kontext-pro": {
|
|
466
|
+
inModelIdType: true,
|
|
467
|
+
fileInput: true,
|
|
468
|
+
maskInput: true,
|
|
469
|
+
dimensionSpecification: "Size",
|
|
470
|
+
notes: "Professional image editing and transformation"
|
|
471
|
+
},
|
|
472
|
+
"stabilityai/sd3.5-medium": {
|
|
473
|
+
inModelIdType: true,
|
|
474
|
+
fileInput: true,
|
|
475
|
+
maskInput: true,
|
|
476
|
+
dimensionSpecification: "Aspect Ratio",
|
|
477
|
+
notes: "Balanced 2.5B parameter model"
|
|
478
|
+
},
|
|
479
|
+
"stabilityai/sdxl-turbo": {
|
|
480
|
+
inModelIdType: true,
|
|
481
|
+
fileInput: true,
|
|
482
|
+
maskInput: true,
|
|
483
|
+
dimensionSpecification: "Aspect Ratio",
|
|
484
|
+
notes: "Optimized for fast generation"
|
|
485
|
+
},
|
|
486
|
+
"Qwen/Qwen-Image-Edit": {
|
|
487
|
+
inModelIdType: false,
|
|
488
|
+
fileInput: true,
|
|
489
|
+
maskInput: true,
|
|
490
|
+
dimensionSpecification: "unknown",
|
|
491
|
+
notes: false
|
|
492
|
+
}
|
|
493
|
+
};
|
|
494
|
+
/** Maps a matrix row to its entry. Nothing here inspects the model ID. */
|
|
495
|
+
function createImageModelEntry(row) {
|
|
637
496
|
return {
|
|
638
497
|
capabilities: { image: {
|
|
639
498
|
sizes: { description: "Explicit size or aspect ratio; accepted dimensions depend on the model." },
|
|
640
|
-
fileInput,
|
|
641
|
-
maskInput:
|
|
499
|
+
fileInput: row.fileInput,
|
|
500
|
+
maskInput: row.maskInput,
|
|
642
501
|
maxImagesPerCall: 1,
|
|
643
|
-
...
|
|
502
|
+
...row.dimensionSpecification !== "unknown" ? { dimensionSpecification: row.dimensionSpecification } : {},
|
|
503
|
+
...row.notes !== false ? { notes: row.notes } : {}
|
|
644
504
|
} },
|
|
645
505
|
providerOptions: { image: Object.fromEntries(Object.keys(deepInfraProviderOptions.image).map((key) => [key, "unknown"])) }
|
|
646
506
|
};
|
|
647
507
|
}
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
"
|
|
652
|
-
"
|
|
653
|
-
"
|
|
654
|
-
|
|
655
|
-
"sentence-transformers/all-MiniLM-L12-v2": 384,
|
|
656
|
-
"sentence-transformers/all-MiniLM-L6-v2": 384,
|
|
657
|
-
"sentence-transformers/all-mpnet-base-v2": 768,
|
|
658
|
-
"sentence-transformers/clip-ViT-B-32": 512,
|
|
659
|
-
"sentence-transformers/clip-ViT-B-32-multilingual-v1": 512,
|
|
660
|
-
"sentence-transformers/multi-qa-mpnet-base-dot-v1": 768,
|
|
661
|
-
"sentence-transformers/paraphrase-MiniLM-L6-v2": 384,
|
|
662
|
-
"shibing624/text2vec-base-chinese": 768,
|
|
663
|
-
"thenlper/gte-base": 768,
|
|
664
|
-
"thenlper/gte-large": 1024
|
|
508
|
+
/** Row for every image model ID that is not listed in the matrix. */
|
|
509
|
+
const unlistedImageModelRow = {
|
|
510
|
+
inModelIdType: false,
|
|
511
|
+
fileInput: "unknown",
|
|
512
|
+
maskInput: "unknown",
|
|
513
|
+
dimensionSpecification: "unknown",
|
|
514
|
+
notes: false
|
|
665
515
|
};
|
|
666
|
-
function
|
|
667
|
-
|
|
516
|
+
function getDeepInfraImageModelEntry(modelId) {
|
|
517
|
+
return createImageModelEntry(Object.prototype.hasOwnProperty.call(imageModelDefinitions, modelId) ? imageModelDefinitions[modelId] : unlistedImageModelRow);
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* Embedding model matrix: model IDs by capability. To add a model, add a row
|
|
521
|
+
* and fill in every column.
|
|
522
|
+
*/
|
|
523
|
+
const embeddingModelDefinitions = {
|
|
524
|
+
"BAAI/bge-base-en-v1.5": {
|
|
525
|
+
defaultDimensions: 768,
|
|
526
|
+
maxTokens: 512
|
|
527
|
+
},
|
|
528
|
+
"BAAI/bge-large-en-v1.5": {
|
|
529
|
+
defaultDimensions: 1024,
|
|
530
|
+
maxTokens: 512
|
|
531
|
+
},
|
|
532
|
+
"BAAI/bge-m3": {
|
|
533
|
+
defaultDimensions: 1024,
|
|
534
|
+
maxTokens: 8192
|
|
535
|
+
},
|
|
536
|
+
"intfloat/e5-base-v2": {
|
|
537
|
+
defaultDimensions: 768,
|
|
538
|
+
maxTokens: 512
|
|
539
|
+
},
|
|
540
|
+
"intfloat/e5-large-v2": {
|
|
541
|
+
defaultDimensions: 1024,
|
|
542
|
+
maxTokens: 512
|
|
543
|
+
},
|
|
544
|
+
"intfloat/multilingual-e5-large": {
|
|
545
|
+
defaultDimensions: 1024,
|
|
546
|
+
maxTokens: 512
|
|
547
|
+
},
|
|
548
|
+
"sentence-transformers/all-MiniLM-L12-v2": {
|
|
549
|
+
defaultDimensions: 384,
|
|
550
|
+
maxTokens: 256
|
|
551
|
+
},
|
|
552
|
+
"sentence-transformers/all-MiniLM-L6-v2": {
|
|
553
|
+
defaultDimensions: 384,
|
|
554
|
+
maxTokens: 256
|
|
555
|
+
},
|
|
556
|
+
"sentence-transformers/all-mpnet-base-v2": {
|
|
557
|
+
defaultDimensions: 768,
|
|
558
|
+
maxTokens: 384
|
|
559
|
+
},
|
|
560
|
+
"sentence-transformers/clip-ViT-B-32": {
|
|
561
|
+
defaultDimensions: 512,
|
|
562
|
+
maxTokens: 77
|
|
563
|
+
},
|
|
564
|
+
"sentence-transformers/clip-ViT-B-32-multilingual-v1": {
|
|
565
|
+
defaultDimensions: 512,
|
|
566
|
+
maxTokens: 77
|
|
567
|
+
},
|
|
568
|
+
"sentence-transformers/multi-qa-mpnet-base-dot-v1": {
|
|
569
|
+
defaultDimensions: 768,
|
|
570
|
+
maxTokens: 512
|
|
571
|
+
},
|
|
572
|
+
"sentence-transformers/paraphrase-MiniLM-L6-v2": {
|
|
573
|
+
defaultDimensions: 384,
|
|
574
|
+
maxTokens: 128
|
|
575
|
+
},
|
|
576
|
+
"shibing624/text2vec-base-chinese": {
|
|
577
|
+
defaultDimensions: 768,
|
|
578
|
+
maxTokens: 512
|
|
579
|
+
},
|
|
580
|
+
"thenlper/gte-base": {
|
|
581
|
+
defaultDimensions: 768,
|
|
582
|
+
maxTokens: 512
|
|
583
|
+
},
|
|
584
|
+
"thenlper/gte-large": {
|
|
585
|
+
defaultDimensions: 1024,
|
|
586
|
+
maxTokens: 512
|
|
587
|
+
}
|
|
588
|
+
};
|
|
589
|
+
const embeddingProviderOptions = Object.fromEntries(Object.keys(deepInfraProviderOptions.embedding).map((key) => [key, "unknown"]));
|
|
590
|
+
/** Maps a matrix row to its entry. Nothing here inspects the model ID. */
|
|
591
|
+
function createEmbeddingModelEntry(row) {
|
|
668
592
|
return {
|
|
669
|
-
capabilities: {
|
|
670
|
-
defaultDimensions:
|
|
671
|
-
maxTokens:
|
|
593
|
+
capabilities: { embedding: {
|
|
594
|
+
defaultDimensions: row.defaultDimensions,
|
|
595
|
+
maxTokens: row.maxTokens,
|
|
672
596
|
customDimensions: "unknown"
|
|
673
|
-
} }
|
|
674
|
-
providerOptions: { embedding:
|
|
597
|
+
} },
|
|
598
|
+
providerOptions: { embedding: embeddingProviderOptions }
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
function getDeepInfraEmbeddingModelEntry(modelId) {
|
|
602
|
+
return Object.prototype.hasOwnProperty.call(embeddingModelDefinitions, modelId) ? createEmbeddingModelEntry(embeddingModelDefinitions[modelId]) : {
|
|
603
|
+
capabilities: {},
|
|
604
|
+
providerOptions: { embedding: embeddingProviderOptions }
|
|
675
605
|
};
|
|
676
606
|
}
|
|
677
|
-
|
|
678
|
-
...
|
|
679
|
-
...
|
|
680
|
-
...
|
|
607
|
+
Object.fromEntries([
|
|
608
|
+
...Object.entries(listedLanguageModelEntries),
|
|
609
|
+
...Object.keys(imageModelDefinitions).map((id) => [id, getDeepInfraImageModelEntry(id)]),
|
|
610
|
+
...Object.keys(embeddingModelDefinitions).map((id) => [id, getDeepInfraEmbeddingModelEntry(id)])
|
|
681
611
|
]);
|
|
682
|
-
deepInfraModelCatalog["Qwen/Qwen-Image-Edit"] = getDeepInfraImageModelEntry("Qwen/Qwen-Image-Edit");
|
|
683
612
|
//#endregion
|
|
684
613
|
//#region src/deepinfra-image-model-options.ts
|
|
685
614
|
const deepInfraImageModelOptionsSchema = lazySchema(() => zodSchema(z.looseObject({
|
|
@@ -933,7 +862,7 @@ var DeepInfraChatLanguageModel = class DeepInfraChatLanguageModel extends OpenAI
|
|
|
933
862
|
};
|
|
934
863
|
//#endregion
|
|
935
864
|
//#region src/version.ts
|
|
936
|
-
const VERSION = "3.0.
|
|
865
|
+
const VERSION = "3.0.100";
|
|
937
866
|
//#endregion
|
|
938
867
|
//#region src/deepinfra-provider.ts
|
|
939
868
|
function createDeepInfra(options = {}) {
|