-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Adding new GPT and Claude models #17999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
871cf12
e537a05
1ad32a5
947cf23
f35b215
0257bb6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| export const FINE_TUNING_MODEL_OPTIONS = [ | ||
| { | ||
| label: "gpt-3.5-turbo-1106 (recommended)", | ||
| value: "gpt-3.5-turbo-1106", | ||
| }, | ||
| { | ||
| label: "gpt-3.5-turbo-0613", | ||
| value: "gpt-3.5-turbo-0613", | ||
| }, | ||
| { | ||
| label: "babbage-002", | ||
| value: "babbage-002", | ||
| }, | ||
| { | ||
| label: "davinci-002", | ||
| value: "davinci-002", | ||
| }, | ||
| { | ||
| label: "gpt-4-0613 (experimental — eligible users will be presented with an option to request access in the fine-tuning UI)", | ||
| value: "gpt-4-0613", | ||
| }, | ||
| { | ||
| label: "gpt-4.1-mini-2025-04-14", | ||
| value: "gpt-4.1-mini-2025-04-14", | ||
| }, | ||
| { | ||
| label: "gpt-4.1-2025-04-14", | ||
| value: "gpt-4.1-2025-04-14", | ||
| }, | ||
| ]; | ||
|
|
||
| export const TTS_MODELS = [ | ||
| "tts-1", | ||
| "tts-1-hd", | ||
| ]; | ||
|
|
||
| export const IMAGE_MODELS = [ | ||
| "dall-e-2", | ||
| "dall-e-3", | ||
| ]; | ||
|
|
||
| export const MODERATION_MODELS = [ | ||
| "text-moderation-stable", | ||
| "text-moderation-latest", | ||
| ]; | ||
|
|
||
| // Models that are eligible for Assistants API usage when selecting an Assistant model | ||
| export const ASSISTANTS_MODEL_INCLUDE_SUBSTRINGS = [ | ||
| "gpt-3.5-turbo", | ||
| "gpt-4-turbo", | ||
| "gpt-4o", | ||
| "gpt-4.1", | ||
| "gpt-5", | ||
| "gpt-5-mini", | ||
| "gpt-5-nano", | ||
| ]; | ||
|
Comment on lines
+48
to
+56
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Prevent accidental inclusion of non-Assistants-safe models Filtering by substrings can pull in models like transcribe/realtime variants (e.g., "gpt-4o-transcribe") into Assistants model options. Add explicit exclusions to the excluded list to be safe. export const ASSISTANTS_MODEL_EXCLUDED = [
"gpt-3.5-turbo-0301",
+ // Not valid for Assistants model selection
+ "gpt-4o-transcribe",
+ "gpt-4o-mini-transcribe",
+ // Common non-chat families you may want to exclude proactively if surfaced elsewhere
+ "gpt-4o-realtime-preview", // example; adjust to actual IDs if present
];If filtering logic exists in openai.app.mjs, consider enforcing a predicate that excludes IDs ending with "-transcribe" and "-realtime" instead of maintaining a manual list. Want me to propose that change? Also applies to: 59-61 🤖 Prompt for AI Agents |
||
|
|
||
| // Exact model IDs to exclude from Assistants model options | ||
| export const ASSISTANTS_MODEL_EXCLUDED = [ | ||
| "gpt-3.5-turbo-0301", | ||
| ]; | ||
|
|
||
| // Supported models in the "Chat using Web Search" action | ||
| export const WEB_SEARCH_CHAT_MODELS = [ | ||
| "gpt-4o", | ||
| "gpt-4o-mini", | ||
| ]; | ||
|
|
||
| // Supported models in the "Create Transcription" action | ||
| export const TRANSCRIPTION_MODELS = [ | ||
| "gpt-4o-transcribe", | ||
| "gpt-4o-mini-transcribe", | ||
| "whisper-1", | ||
| ]; | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,5 +1,10 @@ | ||||||||||||||||||
| import { axios } from "@pipedream/platform"; | ||||||||||||||||||
| import constants from "./common/constants.mjs"; | ||||||||||||||||||
| import { | ||||||||||||||||||
| ASSISTANTS_MODEL_EXCLUDED, | ||||||||||||||||||
| ASSISTANTS_MODEL_INCLUDE_SUBSTRINGS, | ||||||||||||||||||
| FINE_TUNING_MODEL_OPTIONS, TTS_MODELS, | ||||||||||||||||||
| } from "./common/models.mjs"; | ||||||||||||||||||
|
|
||||||||||||||||||
| export default { | ||||||||||||||||||
| type: "app", | ||||||||||||||||||
|
|
@@ -21,7 +26,7 @@ export default { | |||||||||||||||||
| async options() { | ||||||||||||||||||
| return (await this.getChatCompletionModels({})).map((model) => model.id); | ||||||||||||||||||
| }, | ||||||||||||||||||
| default: "gpt-4o-mini", | ||||||||||||||||||
| default: "gpt-5-mini", | ||||||||||||||||||
| }, | ||||||||||||||||||
| embeddingsModelId: { | ||||||||||||||||||
| label: "Model", | ||||||||||||||||||
|
|
@@ -268,13 +273,13 @@ export default { | |||||||||||||||||
| type: "string", | ||||||||||||||||||
| label: "Model", | ||||||||||||||||||
| description: "One of the available [TTS models](https://platform.openai.com/docs/models/tts). `tts-1` is optimized for speed, while `tts-1-hd` is optimized for quality.", | ||||||||||||||||||
| options: constants.TTS_MODELS, | ||||||||||||||||||
| options: TTS_MODELS, | ||||||||||||||||||
| }, | ||||||||||||||||||
| fineTuningModel: { | ||||||||||||||||||
| type: "string", | ||||||||||||||||||
| label: "Fine Tuning Model", | ||||||||||||||||||
| description: "The name of the model to fine-tune. [See the supported models](https://platform.openai.com/docs/guides/fine-tuning/what-models-can-be-fine-tuned).", | ||||||||||||||||||
| options: constants.FINE_TUNING_MODEL_OPTIONS, | ||||||||||||||||||
| options: FINE_TUNING_MODEL_OPTIONS, | ||||||||||||||||||
| }, | ||||||||||||||||||
| input: { | ||||||||||||||||||
| type: "string", | ||||||||||||||||||
|
|
@@ -346,13 +351,13 @@ export default { | |||||||||||||||||
| $, | ||||||||||||||||||
| path: "/models", | ||||||||||||||||||
| }); | ||||||||||||||||||
| return models.sort((a, b) => a?.id.localeCompare(b?.id)); | ||||||||||||||||||
| return models.sort((a, b) => b?.created - a?.created); | ||||||||||||||||||
| }, | ||||||||||||||||||
|
Comment on lines
+354
to
355
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Handle undefined creation timestamps in sort comparator Some model objects may not expose - return models.sort((a, b) => b?.created - a?.created);
+ return models.sort((a, b) => {
+ const bc = typeof b?.created === "number" ? b.created : -Infinity;
+ const ac = typeof a?.created === "number" ? a.created : -Infinity;
+ if (bc !== ac) return bc - ac; // newer first
+ return String(a?.id).localeCompare(String(b?.id)); // stable tie-break
+ });📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
| async getChatCompletionModels({ $ }) { | ||||||||||||||||||
| const models = await this.models({ | ||||||||||||||||||
| $, | ||||||||||||||||||
| }); | ||||||||||||||||||
| return models.filter((model) => model.id.match(/4o|o[1-9]|4\.1/gi)); | ||||||||||||||||||
| return models.filter((model) => model.id.match(/4o|o[1-9]|4\.1|gpt-5/gi)); | ||||||||||||||||||
| }, | ||||||||||||||||||
| async getCompletionModels({ $ }) { | ||||||||||||||||||
| const models = await this.models({ | ||||||||||||||||||
|
|
@@ -380,7 +385,10 @@ export default { | |||||||||||||||||
| const models = await this.models({ | ||||||||||||||||||
| $, | ||||||||||||||||||
| }); | ||||||||||||||||||
| 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")); | ||||||||||||||||||
| return models.filter(({ id }) => ( | ||||||||||||||||||
| ASSISTANTS_MODEL_INCLUDE_SUBSTRINGS.some((substring) => id.includes(substring)) | ||||||||||||||||||
| && !ASSISTANTS_MODEL_EXCLUDED.includes(id) | ||||||||||||||||||
| )); | ||||||||||||||||||
| }, | ||||||||||||||||||
| async _makeCompletion({ | ||||||||||||||||||
| path, ...args | ||||||||||||||||||
|
|
||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Optional: verify supported models for the web search tool
If OpenAI adjusts tool support per model, this list may drift. Consider verifying tool compatibility during CI.
🌐 Web query:
💡 Result:
The "web_search_preview" tool for the OpenAI Responses API is currently supported by the following models:
Key limitations and additional notes:
Summary Table:
For the most robust and up-to-date web search capability via the Responses API, use gpt-4o or gpt-4o-mini[3][5][7].
Citations:
Ensure only supported models are listed for web_search_preview and automate compatibility checks
Based on the latest OpenAI docs, only the following models support the
web_search_previewtool in the Responses API (excludinggpt-4.1-nanoand other non-primary variants):Please:
WEB_SEARCH_CHAT_MODELSincomponents/openai/actions/chat-using-web-search/chat-using-web-search.mjsto exactly these four supported model names.
https://api.openai.com/v1/tools) that verifiesweb_search_previewsupport hasn’t drifted whenever this list is changed.🤖 Prompt for AI Agents