@discomedia/utils 1.0.68 → 1.0.70
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/dist/index-frontend.cjs +68 -208
- package/dist/index-frontend.cjs.map +1 -1
- package/dist/index-frontend.mjs +65 -209
- package/dist/index-frontend.mjs.map +1 -1
- package/dist/index.cjs +68 -208
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +65 -209
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/dist/test.js +119 -217
- package/dist/test.js.map +1 -1
- package/dist/types/index-frontend.d.ts +2 -0
- package/dist/types/index-frontend.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/llm-config.d.ts +1 -1
- package/dist/types/llm-config.d.ts.map +1 -1
- package/dist/types/llm-images.d.ts.map +1 -1
- package/dist/types/llm-openai.d.ts +4 -16
- package/dist/types/llm-openai.d.ts.map +1 -1
- package/dist/types/types/llm-types.d.ts +8 -2
- package/dist/types/types/llm-types.d.ts.map +1 -1
- package/dist/types-frontend/index-frontend.d.ts +2 -0
- package/dist/types-frontend/index-frontend.d.ts.map +1 -1
- package/dist/types-frontend/index.d.ts +2 -0
- package/dist/types-frontend/index.d.ts.map +1 -1
- package/dist/types-frontend/llm-config.d.ts +1 -1
- package/dist/types-frontend/llm-config.d.ts.map +1 -1
- package/dist/types-frontend/llm-images.d.ts.map +1 -1
- package/dist/types-frontend/llm-openai.d.ts +4 -16
- package/dist/types-frontend/llm-openai.d.ts.map +1 -1
- package/dist/types-frontend/types/llm-types.d.ts +8 -2
- package/dist/types-frontend/types/llm-types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1139,37 +1139,66 @@ function dateTimeForGS(date) {
|
|
|
1139
1139
|
.replace(/\./g, '/');
|
|
1140
1140
|
}
|
|
1141
1141
|
|
|
1142
|
+
/**
|
|
1143
|
+
* Represents OpenAI models
|
|
1144
|
+
*/
|
|
1145
|
+
const OPENAI_MODELS = [
|
|
1146
|
+
'gpt-5',
|
|
1147
|
+
'gpt-5-mini',
|
|
1148
|
+
'gpt-5.4-mini',
|
|
1149
|
+
'gpt-5-nano',
|
|
1150
|
+
'gpt-5.1',
|
|
1151
|
+
'gpt-5.4',
|
|
1152
|
+
'gpt-5.5',
|
|
1153
|
+
'gpt-5.5-pro',
|
|
1154
|
+
'gpt-5.2',
|
|
1155
|
+
'gpt-5.2-pro',
|
|
1156
|
+
'gpt-5.1-codex',
|
|
1157
|
+
'gpt-5.1-codex-max',
|
|
1158
|
+
];
|
|
1159
|
+
/**
|
|
1160
|
+
* Type guard to check if a model is a supported direct OpenAI model.
|
|
1161
|
+
*/
|
|
1162
|
+
function isOpenAIModel(model) {
|
|
1163
|
+
return OPENAI_MODELS.includes(model);
|
|
1164
|
+
}
|
|
1165
|
+
/**
|
|
1166
|
+
* Represents OpenRouter models
|
|
1167
|
+
*/
|
|
1168
|
+
const OPENROUTER_MODELS = [
|
|
1169
|
+
'openai/gpt-5',
|
|
1170
|
+
'openai/gpt-5-mini',
|
|
1171
|
+
'openai/gpt-5.4-mini',
|
|
1172
|
+
'openai/gpt-5-nano',
|
|
1173
|
+
'openai/gpt-5.1',
|
|
1174
|
+
'openai/gpt-5.4',
|
|
1175
|
+
'openai/gpt-5.4-pro',
|
|
1176
|
+
'openai/gpt-5.5',
|
|
1177
|
+
'openai/gpt-5.5-pro',
|
|
1178
|
+
'openai/gpt-5.2',
|
|
1179
|
+
'openai/gpt-5.2-pro',
|
|
1180
|
+
'openai/gpt-5.1-codex',
|
|
1181
|
+
'openai/gpt-5.1-codex-max',
|
|
1182
|
+
'openai/gpt-oss-120b',
|
|
1183
|
+
'z.ai/glm-4.5',
|
|
1184
|
+
'z.ai/glm-4.5-air',
|
|
1185
|
+
'google/gemini-2.5-flash',
|
|
1186
|
+
'google/gemini-2.5-flash-lite',
|
|
1187
|
+
'deepseek/deepseek-r1-0528',
|
|
1188
|
+
'deepseek/deepseek-chat-v3-0324',
|
|
1189
|
+
];
|
|
1142
1190
|
/**
|
|
1143
1191
|
* Type guard to check if a model is an OpenRouter model
|
|
1144
1192
|
*/
|
|
1145
1193
|
function isOpenRouterModel(model) {
|
|
1146
|
-
|
|
1147
|
-
'openai/gpt-5',
|
|
1148
|
-
'openai/gpt-5-mini',
|
|
1149
|
-
'openai/gpt-5.4-mini',
|
|
1150
|
-
'openai/gpt-5-nano',
|
|
1151
|
-
'openai/gpt-5.1',
|
|
1152
|
-
'openai/gpt-5.4',
|
|
1153
|
-
'openai/gpt-5.4-pro',
|
|
1154
|
-
'openai/gpt-5.5',
|
|
1155
|
-
'openai/gpt-5.5-pro',
|
|
1156
|
-
'openai/gpt-5.2',
|
|
1157
|
-
'openai/gpt-5.2-pro',
|
|
1158
|
-
'openai/gpt-5.1-codex',
|
|
1159
|
-
'openai/gpt-5.1-codex-max',
|
|
1160
|
-
'openai/gpt-oss-120b',
|
|
1161
|
-
'z.ai/glm-4.5',
|
|
1162
|
-
'z.ai/glm-4.5-air',
|
|
1163
|
-
'google/gemini-2.5-flash',
|
|
1164
|
-
'google/gemini-2.5-flash-lite',
|
|
1165
|
-
'deepseek/deepseek-r1-0528',
|
|
1166
|
-
'deepseek/deepseek-chat-v3-0324',
|
|
1167
|
-
];
|
|
1168
|
-
return openRouterModels.includes(model);
|
|
1194
|
+
return OPENROUTER_MODELS.includes(model);
|
|
1169
1195
|
}
|
|
1170
1196
|
|
|
1171
1197
|
var Types = /*#__PURE__*/Object.freeze({
|
|
1172
1198
|
__proto__: null,
|
|
1199
|
+
OPENAI_MODELS: OPENAI_MODELS,
|
|
1200
|
+
OPENROUTER_MODELS: OPENROUTER_MODELS,
|
|
1201
|
+
isOpenAIModel: isOpenAIModel,
|
|
1173
1202
|
isOpenRouterModel: isOpenRouterModel
|
|
1174
1203
|
});
|
|
1175
1204
|
|
|
@@ -11596,57 +11625,12 @@ function zodTextFormat(zodObject, name, props) {
|
|
|
11596
11625
|
}
|
|
11597
11626
|
|
|
11598
11627
|
// llm-openai-config.ts
|
|
11599
|
-
const DEFAULT_MODEL = 'gpt-
|
|
11628
|
+
const DEFAULT_MODEL = 'gpt-5-mini';
|
|
11600
11629
|
const GPT_5_HIGH_CONTEXT_THRESHOLD_TOKENS = 272_000;
|
|
11601
11630
|
const GPT_5_HIGH_CONTEXT_INPUT_MULTIPLIER = 2;
|
|
11602
11631
|
const GPT_5_HIGH_CONTEXT_OUTPUT_MULTIPLIER = 1.5;
|
|
11603
11632
|
/** Token costs in USD per 1M tokens. Last updated May 2026. */
|
|
11604
11633
|
const openAiModelCosts = {
|
|
11605
|
-
'gpt-4o': {
|
|
11606
|
-
inputCost: 2.5 / 1_000_000,
|
|
11607
|
-
cacheHitCost: 1.25 / 1_000_000,
|
|
11608
|
-
outputCost: 10 / 1_000_000,
|
|
11609
|
-
},
|
|
11610
|
-
'gpt-4o-mini': {
|
|
11611
|
-
inputCost: 0.15 / 1_000_000,
|
|
11612
|
-
cacheHitCost: 0.075 / 1_000_000,
|
|
11613
|
-
outputCost: 0.6 / 1_000_000,
|
|
11614
|
-
},
|
|
11615
|
-
'o1-mini': {
|
|
11616
|
-
inputCost: 1.1 / 1_000_000,
|
|
11617
|
-
cacheHitCost: 0.55 / 1_000_000,
|
|
11618
|
-
outputCost: 4.4 / 1_000_000,
|
|
11619
|
-
},
|
|
11620
|
-
'o1': {
|
|
11621
|
-
inputCost: 15 / 1_000_000,
|
|
11622
|
-
cacheHitCost: 7.5 / 1_000_000,
|
|
11623
|
-
outputCost: 60 / 1_000_000,
|
|
11624
|
-
},
|
|
11625
|
-
'o3-mini': {
|
|
11626
|
-
inputCost: 1.1 / 1_000_000,
|
|
11627
|
-
cacheHitCost: 0.55 / 1_000_000,
|
|
11628
|
-
outputCost: 4.4 / 1_000_000,
|
|
11629
|
-
},
|
|
11630
|
-
'o3': {
|
|
11631
|
-
inputCost: 2 / 1_000_000,
|
|
11632
|
-
cacheHitCost: 0.5 / 1_000_000,
|
|
11633
|
-
outputCost: 8 / 1_000_000,
|
|
11634
|
-
},
|
|
11635
|
-
'gpt-4.1': {
|
|
11636
|
-
inputCost: 2 / 1_000_000,
|
|
11637
|
-
cacheHitCost: 0.5 / 1_000_000,
|
|
11638
|
-
outputCost: 8 / 1_000_000,
|
|
11639
|
-
},
|
|
11640
|
-
'gpt-4.1-mini': {
|
|
11641
|
-
inputCost: 0.4 / 1_000_000,
|
|
11642
|
-
cacheHitCost: 0.1 / 1_000_000,
|
|
11643
|
-
outputCost: 1.6 / 1_000_000,
|
|
11644
|
-
},
|
|
11645
|
-
'gpt-4.1-nano': {
|
|
11646
|
-
inputCost: 0.1 / 1_000_000,
|
|
11647
|
-
cacheHitCost: 0.025 / 1_000_000,
|
|
11648
|
-
outputCost: 0.4 / 1_000_000,
|
|
11649
|
-
},
|
|
11650
11634
|
'gpt-5': {
|
|
11651
11635
|
inputCost: 1.25 / 1_000_000,
|
|
11652
11636
|
cacheHitCost: 0.125 / 1_000_000,
|
|
@@ -11677,10 +11661,6 @@ const openAiModelCosts = {
|
|
|
11677
11661
|
cacheHitCost: 0.25 / 1_000_000,
|
|
11678
11662
|
outputCost: 15 / 1_000_000,
|
|
11679
11663
|
},
|
|
11680
|
-
'gpt-5.4-pro': {
|
|
11681
|
-
inputCost: 30 / 1_000_000,
|
|
11682
|
-
outputCost: 180 / 1_000_000,
|
|
11683
|
-
},
|
|
11684
11664
|
'gpt-5.5': {
|
|
11685
11665
|
inputCost: 5 / 1_000_000,
|
|
11686
11666
|
cacheHitCost: 0.5 / 1_000_000,
|
|
@@ -11709,11 +11689,6 @@ const openAiModelCosts = {
|
|
|
11709
11689
|
cacheHitCost: 0.125 / 1_000_000,
|
|
11710
11690
|
outputCost: 10 / 1_000_000,
|
|
11711
11691
|
},
|
|
11712
|
-
'o4-mini': {
|
|
11713
|
-
inputCost: 1.1 / 1_000_000,
|
|
11714
|
-
cacheHitCost: 0.275 / 1_000_000,
|
|
11715
|
-
outputCost: 4.4 / 1_000_000,
|
|
11716
|
-
},
|
|
11717
11692
|
};
|
|
11718
11693
|
const deepseekModelCosts = {
|
|
11719
11694
|
'deepseek-chat': {
|
|
@@ -11728,8 +11703,7 @@ const deepseekModelCosts = {
|
|
|
11728
11703
|
},
|
|
11729
11704
|
};
|
|
11730
11705
|
function shouldUseGPT5HighContextPricing(model, inputTokens) {
|
|
11731
|
-
return (
|
|
11732
|
-
inputTokens > GPT_5_HIGH_CONTEXT_THRESHOLD_TOKENS);
|
|
11706
|
+
return (model === 'gpt-5.4' || model === 'gpt-5.5') && inputTokens > GPT_5_HIGH_CONTEXT_THRESHOLD_TOKENS;
|
|
11733
11707
|
}
|
|
11734
11708
|
/** Image generation costs in USD per image. Based on OpenAI pricing as of Feb 2025. */
|
|
11735
11709
|
const openAiImageCosts = {
|
|
@@ -12170,100 +12144,13 @@ async function parseResponse(content, responseFormat) {
|
|
|
12170
12144
|
}
|
|
12171
12145
|
|
|
12172
12146
|
// llm-openai.ts
|
|
12173
|
-
const isSupportedModel = (model) => {
|
|
12174
|
-
return [
|
|
12175
|
-
'gpt-4o-mini',
|
|
12176
|
-
'gpt-4o',
|
|
12177
|
-
'o1-mini',
|
|
12178
|
-
'o1',
|
|
12179
|
-
'o3-mini',
|
|
12180
|
-
'gpt-4.1',
|
|
12181
|
-
'gpt-4.1-mini',
|
|
12182
|
-
'gpt-4.1-nano',
|
|
12183
|
-
'gpt-5',
|
|
12184
|
-
'gpt-5-mini',
|
|
12185
|
-
'gpt-5.4-mini',
|
|
12186
|
-
'gpt-5-nano',
|
|
12187
|
-
'gpt-5.1',
|
|
12188
|
-
'gpt-5.4',
|
|
12189
|
-
'gpt-5.4-pro',
|
|
12190
|
-
'gpt-5.5',
|
|
12191
|
-
'gpt-5.5-pro',
|
|
12192
|
-
'gpt-5.2',
|
|
12193
|
-
'gpt-5.2-pro',
|
|
12194
|
-
'gpt-5.1-codex',
|
|
12195
|
-
'gpt-5.1-codex-max',
|
|
12196
|
-
'o4-mini',
|
|
12197
|
-
'o3',
|
|
12198
|
-
].includes(model);
|
|
12199
|
-
};
|
|
12200
12147
|
/**
|
|
12201
|
-
* Checks if the given model supports the temperature parameter.
|
|
12148
|
+
* Checks if the given direct OpenAI model supports the temperature parameter.
|
|
12202
12149
|
* @param model The model to check.
|
|
12203
12150
|
* @returns True if the model supports the temperature parameter, false otherwise.
|
|
12204
12151
|
*/
|
|
12205
|
-
function supportsTemperature(
|
|
12206
|
-
|
|
12207
|
-
// GPT-5 models also do not support temperature
|
|
12208
|
-
const reasoningAndGPT5Models = [
|
|
12209
|
-
'o1',
|
|
12210
|
-
'o1-mini',
|
|
12211
|
-
'o3-mini',
|
|
12212
|
-
'o4-mini',
|
|
12213
|
-
'o3',
|
|
12214
|
-
'gpt-5',
|
|
12215
|
-
'gpt-5-mini',
|
|
12216
|
-
'gpt-5.4-mini',
|
|
12217
|
-
'gpt-5-nano',
|
|
12218
|
-
'gpt-5.1',
|
|
12219
|
-
'gpt-5.4',
|
|
12220
|
-
'gpt-5.4-pro',
|
|
12221
|
-
'gpt-5.5',
|
|
12222
|
-
'gpt-5.5-pro',
|
|
12223
|
-
'gpt-5.2',
|
|
12224
|
-
'gpt-5.2-pro',
|
|
12225
|
-
'gpt-5.1-codex',
|
|
12226
|
-
'gpt-5.1-codex-max',
|
|
12227
|
-
];
|
|
12228
|
-
return !reasoningAndGPT5Models.includes(model);
|
|
12229
|
-
}
|
|
12230
|
-
/**
|
|
12231
|
-
* Checks if the given model is a reasoning model. Reasoning models have different tool choice constraints.
|
|
12232
|
-
* @param model The model to check.
|
|
12233
|
-
* @returns True if the model is a reasoning model, false otherwise.
|
|
12234
|
-
*/
|
|
12235
|
-
function isReasoningModel(model) {
|
|
12236
|
-
const reasoningModels = ['o1', 'o1-mini', 'o3-mini', 'o4-mini', 'o3'];
|
|
12237
|
-
return reasoningModels.includes(model);
|
|
12238
|
-
}
|
|
12239
|
-
/**
|
|
12240
|
-
* Checks if the given model is a GPT-5 model. GPT-5 models don't support tool_choice other than 'auto'.
|
|
12241
|
-
* @param model The model to check.
|
|
12242
|
-
* @returns True if the model is a GPT-5 model, false otherwise.
|
|
12243
|
-
*/
|
|
12244
|
-
function isGPT5Model(model) {
|
|
12245
|
-
const gpt5Models = [
|
|
12246
|
-
'gpt-5',
|
|
12247
|
-
'gpt-5-mini',
|
|
12248
|
-
'gpt-5.4-mini',
|
|
12249
|
-
'gpt-5-nano',
|
|
12250
|
-
'gpt-5.1',
|
|
12251
|
-
'gpt-5.4',
|
|
12252
|
-
'gpt-5.4-pro',
|
|
12253
|
-
'gpt-5.5',
|
|
12254
|
-
'gpt-5.5-pro',
|
|
12255
|
-
'gpt-5.2',
|
|
12256
|
-
'gpt-5.2-pro',
|
|
12257
|
-
'gpt-5.1-codex',
|
|
12258
|
-
'gpt-5.1-codex-max',
|
|
12259
|
-
];
|
|
12260
|
-
return gpt5Models.includes(model);
|
|
12261
|
-
}
|
|
12262
|
-
function supportsStructuredOutputs(model) {
|
|
12263
|
-
return normalizeModelName(model) !== 'gpt-5.4-pro';
|
|
12264
|
-
}
|
|
12265
|
-
function supportsDistillation(model) {
|
|
12266
|
-
return normalizeModelName(model) !== 'gpt-5.4-pro';
|
|
12152
|
+
function supportsTemperature(_model) {
|
|
12153
|
+
return false;
|
|
12267
12154
|
}
|
|
12268
12155
|
function isZodSchema(schema) {
|
|
12269
12156
|
return typeof schema === 'object' && schema !== null && 'safeParse' in schema;
|
|
@@ -12298,7 +12185,7 @@ function buildJsonSchemaFormat(schema, schemaName, schemaDescription, schemaStri
|
|
|
12298
12185
|
* - Built-in tools (web search, file search, computer use, code interpreter, image generation)
|
|
12299
12186
|
* - Background processing
|
|
12300
12187
|
* - Conversation state management
|
|
12301
|
-
* -
|
|
12188
|
+
* - GPT-5 reasoning controls
|
|
12302
12189
|
*
|
|
12303
12190
|
* @example
|
|
12304
12191
|
* // Basic text response
|
|
@@ -12319,6 +12206,9 @@ function buildJsonSchemaFormat(schema, schemaName, schemaDescription, schemaStri
|
|
|
12319
12206
|
*/
|
|
12320
12207
|
const makeResponsesAPICall = async (input, options = {}) => {
|
|
12321
12208
|
const normalizedModel = normalizeModelName(options.model || DEFAULT_MODEL);
|
|
12209
|
+
if (!isOpenAIModel(normalizedModel)) {
|
|
12210
|
+
throw new Error(`Unsupported OpenAI model: ${normalizedModel}. Please use a supported GPT-5 model.`);
|
|
12211
|
+
}
|
|
12322
12212
|
const apiKey = options.apiKey || process.env.OPENAI_API_KEY;
|
|
12323
12213
|
if (!apiKey) {
|
|
12324
12214
|
throw new Error('OpenAI API key is not provided and OPENAI_API_KEY environment variable is not set');
|
|
@@ -12333,12 +12223,6 @@ const makeResponsesAPICall = async (input, options = {}) => {
|
|
|
12333
12223
|
input,
|
|
12334
12224
|
...cleanOptions,
|
|
12335
12225
|
};
|
|
12336
|
-
if (requestBody.text?.format?.type === 'json_schema' && !supportsStructuredOutputs(normalizedModel)) {
|
|
12337
|
-
throw new Error(`Model ${normalizedModel} does not support structured outputs`);
|
|
12338
|
-
}
|
|
12339
|
-
if (requestBody.store && !supportsDistillation(normalizedModel)) {
|
|
12340
|
-
throw new Error(`Model ${normalizedModel} does not support distillation`);
|
|
12341
|
-
}
|
|
12342
12226
|
// Make the API call to the Responses endpoint
|
|
12343
12227
|
const response = await openai.responses.create(requestBody);
|
|
12344
12228
|
const cacheHitTokens = response.usage?.input_tokens_details?.cached_tokens || 0;
|
|
@@ -12445,8 +12329,8 @@ async function makeLLMCall(input, options = {}) {
|
|
|
12445
12329
|
const { apiKey, model = DEFAULT_MODEL, responseFormat = 'text', schema, schemaName = 'response', schemaDescription, schemaStrict, tools, useCodeInterpreter = false, useWebSearch = false, imageBase64, imageDetail = 'high', context, } = options;
|
|
12446
12330
|
// Validate model
|
|
12447
12331
|
const normalizedModel = normalizeModelName(model);
|
|
12448
|
-
if (!
|
|
12449
|
-
throw new Error(`Unsupported model: ${normalizedModel}. Please use
|
|
12332
|
+
if (!isOpenAIModel(normalizedModel)) {
|
|
12333
|
+
throw new Error(`Unsupported OpenAI model: ${normalizedModel}. Please use a supported GPT-5 model.`);
|
|
12450
12334
|
}
|
|
12451
12335
|
// Process input for conversation context and image analysis
|
|
12452
12336
|
let processedInput;
|
|
@@ -12515,10 +12399,6 @@ async function makeLLMCall(input, options = {}) {
|
|
|
12515
12399
|
parallel_tool_calls: false,
|
|
12516
12400
|
tools,
|
|
12517
12401
|
};
|
|
12518
|
-
// Only include temperature if the model supports it
|
|
12519
|
-
if (supportsTemperature(normalizedModel)) {
|
|
12520
|
-
responsesOptions.temperature = 0.2;
|
|
12521
|
-
}
|
|
12522
12402
|
// Configure response format
|
|
12523
12403
|
if (schema) {
|
|
12524
12404
|
responsesOptions.text = {
|
|
@@ -12534,41 +12414,17 @@ async function makeLLMCall(input, options = {}) {
|
|
|
12534
12414
|
// Configure built-in tools
|
|
12535
12415
|
if (useCodeInterpreter) {
|
|
12536
12416
|
responsesOptions.tools = [{ type: 'code_interpreter', container: { type: 'auto' } }];
|
|
12537
|
-
// For reasoning models, we can't force tool choice - they only support 'auto'
|
|
12538
|
-
if (!isReasoningModel(normalizedModel)) {
|
|
12539
|
-
responsesOptions.tool_choice = { type: 'code_interpreter' };
|
|
12540
|
-
}
|
|
12541
12417
|
responsesOptions.include = ['code_interpreter_call.outputs'];
|
|
12542
12418
|
}
|
|
12543
12419
|
if (useWebSearch) {
|
|
12544
12420
|
responsesOptions.tools = [{ type: 'web_search_preview' }];
|
|
12545
|
-
// For reasoning models and GPT-5 models, we can't force tool choice - they only support 'auto'
|
|
12546
|
-
if (!isReasoningModel(normalizedModel) && !isGPT5Model(normalizedModel)) {
|
|
12547
|
-
responsesOptions.tool_choice = { type: 'web_search_preview' };
|
|
12548
|
-
}
|
|
12549
12421
|
}
|
|
12550
12422
|
return await makeResponsesAPICall(processedInput, responsesOptions);
|
|
12551
12423
|
}
|
|
12552
12424
|
|
|
12553
12425
|
const DEFAULT_IMAGE_MODEL = 'gpt-image-1.5';
|
|
12554
12426
|
const resolveImageModel = (model) => model ?? DEFAULT_IMAGE_MODEL;
|
|
12555
|
-
const MULTIMODAL_VISION_MODELS = new Set(
|
|
12556
|
-
'gpt-4o-mini',
|
|
12557
|
-
'gpt-4o',
|
|
12558
|
-
'gpt-5',
|
|
12559
|
-
'gpt-5-mini',
|
|
12560
|
-
'gpt-5.4-mini',
|
|
12561
|
-
'gpt-5-nano',
|
|
12562
|
-
'gpt-5.1',
|
|
12563
|
-
'gpt-5.4',
|
|
12564
|
-
'gpt-5.4-pro',
|
|
12565
|
-
'gpt-5.5',
|
|
12566
|
-
'gpt-5.5-pro',
|
|
12567
|
-
'gpt-5.2',
|
|
12568
|
-
'gpt-5.2-pro',
|
|
12569
|
-
'gpt-5.1-codex',
|
|
12570
|
-
'gpt-5.1-codex-max',
|
|
12571
|
-
]);
|
|
12427
|
+
const MULTIMODAL_VISION_MODELS = new Set(OPENAI_MODELS);
|
|
12572
12428
|
/**
|
|
12573
12429
|
* Makes a call to the OpenAI Images API to generate images based on a text prompt.
|
|
12574
12430
|
*
|
|
@@ -21710,5 +21566,5 @@ const disco = {
|
|
|
21710
21566
|
},
|
|
21711
21567
|
};
|
|
21712
21568
|
|
|
21713
|
-
export { AlpacaMarketDataAPI, AlpacaTradingAPI, disco, isOpenRouterModel };
|
|
21569
|
+
export { AlpacaMarketDataAPI, AlpacaTradingAPI, OPENAI_MODELS, OPENROUTER_MODELS, disco, isOpenAIModel, isOpenRouterModel, supportsTemperature };
|
|
21714
21570
|
//# sourceMappingURL=index.mjs.map
|