Skip to content

Commit 434ac52

Browse files
committed
add support for 4.1 models
1 parent 86169a3 commit 434ac52

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

components/openai/common/constants.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ const FINE_TUNING_MODEL_OPTIONS = [
1919
label: "gpt-4-0613 (experimental — eligible users will be presented with an option to request access in the fine-tuning UI)",
2020
value: "gpt-4-0613",
2121
},
22+
{
23+
label: "gpt-4.1-mini-2025-04-14",
24+
value: "gpt-4.1-mini-2025-04-14",
25+
},
26+
{
27+
label: "gpt-4.1-2025-04-14",
28+
value: "gpt-4.1-2025-04-14",
29+
},
2230
];
2331

2432
const TTS_MODELS = [

components/openai/openai.app.mjs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default {
3737
label: "Model",
3838
description: "The ID of the model to use for the assistant",
3939
async options() {
40-
const models = (await this.models({})).filter(({ id }) => (id.includes("gpt-3.5-turbo") || id.includes("gpt-4-turbo") || id.includes("gpt-4o")) && (id !== "gpt-3.5-turbo-0301"));
40+
const models = await this.getAssistantsModels({});
4141
return models.map(({ id }) => id);
4242
},
4343
},
@@ -352,7 +352,7 @@ export default {
352352
const models = await this.models({
353353
$,
354354
});
355-
return models.filter((model) => model.id.match(/4o|o[1-9]/gi));
355+
return models.filter((model) => model.id.match(/4o|o[1-9]|4\.1/gi));
356356
},
357357
async getCompletionModels({ $ }) {
358358
const models = await this.models({
@@ -376,6 +376,12 @@ export default {
376376
);
377377
});
378378
},
379+
async getAssistantsModels({ $ }) {
380+
const models = await this.models({
381+
$,
382+
});
383+
return models.filter(({ id }) => (id.includes("gpt-3.5-turbo") || id.includes("gpt-4-turbo") || id.includes("gpt-4o") || id.includes("gpt-4.1")) && (id !== "gpt-3.5-turbo-0301"));
384+
},
379385
async _makeCompletion({
380386
path, ...args
381387
}) {

components/openai/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/openai",
3-
"version": "0.9.3",
3+
"version": "0.9.4",
44
"description": "Pipedream OpenAI Components",
55
"main": "openai.app.mjs",
66
"keywords": [

0 commit comments

Comments
 (0)