Skip to content

feat: Add GPT-5 series models to OpenAI metadata#9336

Merged
edwinjosechittilappilly merged 4 commits intomainfrom
feat-add-gpt5-models
Aug 12, 2025
Merged

feat: Add GPT-5 series models to OpenAI metadata#9336
edwinjosechittilappilly merged 4 commits intomainfrom
feat-add-gpt5-models

Conversation

@edwinjosechittilappilly
Copy link
Collaborator

@edwinjosechittilappilly edwinjosechittilappilly commented Aug 9, 2025

Introduces metadata entries for the new GPT-5, GPT-5-mini, GPT-5-nano, and GPT-5-chat-latest models in the OPENAI_MODELS_DETAILED list. This update ensures these models are recognized and available for use in the application.

Summary by CodeRabbit

  • New Features
    • Added support for new GPT-5 Series models, including "gpt-5", "gpt-5-mini", "gpt-5-nano", and "gpt-5-chat-latest". These models are now available for selection.

Introduces metadata entries for the new GPT-5, GPT-5-mini, GPT-5-nano, and GPT-5-chat-latest models in the OPENAI_MODELS_DETAILED list. This update ensures these models are recognized and available for use in the application.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 9, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This change adds four new GPT-5 Series model metadata entries to the OPENAI_MODELS_DETAILED list in the OpenAI constants module. Each new entry specifies the provider, name, icon, and feature flags for tool calling and reasoning capabilities.

Changes

Cohort / File(s) Change Summary
Add GPT-5 Series Model Metadata
src/backend/base/langflow/base/models/openai_constants.py
Added metadata for "gpt-5", "gpt-5-mini", "gpt-5-nano", and "gpt-5-chat-latest" to OPENAI_MODELS_DETAILED.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested labels

enhancement, lgtm

Suggested reviewers

  • Yukiyukiyeah
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat-add-gpt5-models

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Aug 9, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
src/backend/base/langflow/base/models/openai_constants.py (1)

5-33: Validate GPT-5 metadata before exposing in production

The four new GPT-5 entries in src/backend/base/langflow/base/models/openai_constants.py are currently marked as reasoning=True, so they will:

  • Be grouped under OPENAI_REASONING_MODEL_NAMES (hiding temperature & seed UI controls).
  • Route through reasoning-only branches in both component and agent logic.
  • Retain tool_calling=True for “gpt-5”, “gpt-5-mini” and “gpt-5-nano”, but tool_calling=False for “gpt-5-chat-latest”.

Action items:

  • If GPT-5 is not yet GA, add preview=True or not_supported=True to each metadata block to prevent premature exposure.
  • Confirm which GPT-5 variants support the standard chat API (and temperature/seed) versus reasoning-only.
    • For chat-capable models, set reasoning=False (and ensure they appear in OPENAI_CHAT_MODEL_NAMES).
  • Verify the tool_calling flags align with OpenAI’s published capabilities.
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 80ebe03 and 6324d76.

📒 Files selected for processing (1)
  • src/backend/base/langflow/base/models/openai_constants.py (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
{src/backend/**/*.py,tests/**/*.py,Makefile}

📄 CodeRabbit Inference Engine (.cursor/rules/backend_development.mdc)

{src/backend/**/*.py,tests/**/*.py,Makefile}: Run make format_backend to format Python code before linting or committing changes
Run make lint to perform linting checks on backend Python code

Files:

  • src/backend/base/langflow/base/models/openai_constants.py
🧠 Learnings (2)
📓 Common learnings
Learnt from: ogabrielluiz
PR: langflow-ai/langflow#9054
File: src/backend/tests/unit/components/agents/test_agent_component.py:104-133
Timestamp: 2025-07-15T14:37:19.189Z
Learning: The GPT-4.1 series models (GPT-4.1, GPT-4.1 mini, and GPT-4.1 nano) are valid OpenAI models introduced on April 14, 2025, available exclusively through OpenAI's API with enhanced coding capabilities and 1 million token context support.
📚 Learning: 2025-07-15T14:37:19.189Z
Learnt from: ogabrielluiz
PR: langflow-ai/langflow#9054
File: src/backend/tests/unit/components/agents/test_agent_component.py:104-133
Timestamp: 2025-07-15T14:37:19.189Z
Learning: The GPT-4.1 series models (GPT-4.1, GPT-4.1 mini, and GPT-4.1 nano) are valid OpenAI models introduced on April 14, 2025, available exclusively through OpenAI's API with enhanced coding capabilities and 1 million token context support.

Applied to files:

  • src/backend/base/langflow/base/models/openai_constants.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Label PR
  • GitHub Check: Run Ruff Check and Format
  • GitHub Check: Update Starter Projects
  • GitHub Check: Ruff Style Check (3.13)
🔇 Additional comments (1)
src/backend/base/langflow/base/models/openai_constants.py (1)

5-33: Reminder: run backend format & lint locally
Please ensure you’ve formatted and linted the Python backend code before merging. In your local environment, run:

make format_backend && make lint

The sandbox doesn’t support make, so verify these steps pass on your machine to keep the codebase consistent.

Comment on lines +5 to +33
# GPT-5 Series
create_model_metadata(
provider="OpenAI",
name="gpt-5",
icon="OpenAI",
tool_calling=True,
reasoning=True,
),
create_model_metadata(
provider="OpenAI",
name="gpt-5-mini",
icon="OpenAI",
tool_calling=True,
reasoning=True,
),
create_model_metadata(
provider="OpenAI",
name="gpt-5-nano",
icon="OpenAI",
tool_calling=True,
reasoning=True,
),
create_model_metadata(
provider="OpenAI",
name="gpt-5-chat-latest",
icon="OpenAI",
tool_calling=False,
reasoning=True,
),
Copy link
Contributor

@coderabbitai coderabbitai bot Aug 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Critical: GPT-5 entries flagged as reasoning models will be excluded from chat model list (and may trigger reasoning-specific code paths).

OPENAI_CHAT_MODEL_NAMES (Lines 92-98) filters out entries with reasoning=True. With the current flags, none of the GPT-5 models will appear as selectable chat models, contradicting the PR goal “made available for use.” Also, some code paths may treat reasoning models differently (e.g., different API routes/options), which could mis-handle gpt-5 if it’s a general chat model.

Recommend treating GPT-5 series as chat models (reasoning=False). Also, gpt-5-chat-latest should have tool_calling=True for parity with other “chat” entries.

Apply this diff:

@@
-    create_model_metadata(
-        provider="OpenAI",
-        name="gpt-5",
-        icon="OpenAI",
-        tool_calling=True,
-        reasoning=True,
-    ),
+    create_model_metadata(
+        provider="OpenAI",
+        name="gpt-5",
+        icon="OpenAI",
+        tool_calling=True,
+        reasoning=False,
+    ),
@@
-    create_model_metadata(
-        provider="OpenAI",
-        name="gpt-5-mini",
-        icon="OpenAI",
-        tool_calling=True,
-        reasoning=True,
-    ),
+    create_model_metadata(
+        provider="OpenAI",
+        name="gpt-5-mini",
+        icon="OpenAI",
+        tool_calling=True,
+        reasoning=False,
+    ),
@@
-    create_model_metadata(
-        provider="OpenAI",
-        name="gpt-5-nano",
-        icon="OpenAI",
-        tool_calling=True,
-        reasoning=True,
-    ),
+    create_model_metadata(
+        provider="OpenAI",
+        name="gpt-5-nano",
+        icon="OpenAI",
+        tool_calling=True,
+        reasoning=False,
+    ),
@@
-    create_model_metadata(
-        provider="OpenAI",
-        name="gpt-5-chat-latest",
-        icon="OpenAI",
-        tool_calling=False,
-        reasoning=True,
-    ),
+    create_model_metadata(
+        provider="OpenAI",
+        name="gpt-5-chat-latest",
+        icon="OpenAI",
+        tool_calling=True,
+        reasoning=False,
+    ),
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# GPT-5 Series
create_model_metadata(
provider="OpenAI",
name="gpt-5",
icon="OpenAI",
tool_calling=True,
reasoning=True,
),
create_model_metadata(
provider="OpenAI",
name="gpt-5-mini",
icon="OpenAI",
tool_calling=True,
reasoning=True,
),
create_model_metadata(
provider="OpenAI",
name="gpt-5-nano",
icon="OpenAI",
tool_calling=True,
reasoning=True,
),
create_model_metadata(
provider="OpenAI",
name="gpt-5-chat-latest",
icon="OpenAI",
tool_calling=False,
reasoning=True,
),
# GPT-5 Series
create_model_metadata(
provider="OpenAI",
name="gpt-5",
icon="OpenAI",
tool_calling=True,
reasoning=False,
),
create_model_metadata(
provider="OpenAI",
name="gpt-5-mini",
icon="OpenAI",
tool_calling=True,
reasoning=False,
),
create_model_metadata(
provider="OpenAI",
name="gpt-5-nano",
icon="OpenAI",
tool_calling=True,
reasoning=False,
),
create_model_metadata(
provider="OpenAI",
name="gpt-5-chat-latest",
icon="OpenAI",
tool_calling=True,
reasoning=False,
),
🤖 Prompt for AI Agents
In src/backend/base/langflow/base/models/openai_constants.py between lines 5 and
33, the GPT-5 models are incorrectly marked with reasoning=True, causing them to
be excluded from the chat model list and potentially triggering
reasoning-specific code paths. To fix this, set reasoning=False for all GPT-5
models and change tool_calling to True for the gpt-5-chat-latest model to align
it with other chat models.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is right, GPT5 act as a reasoning model

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edwinjosechittilappilly Thank you for the clarification! I understand now that GPT-5 models are intended to function as reasoning models, similar to the o1/o3 series. The current implementation with reasoning=True is correct then.


✏️ Learnings added
Learnt from: edwinjosechittilappilly
PR: langflow-ai/langflow#9336
File: src/backend/base/langflow/base/models/openai_constants.py:5-33
Timestamp: 2025-08-11T16:52:17.859Z
Learning: In the Langflow codebase (src/backend/base/langflow/base/models/openai_constants.py), GPT-5 series models (gpt-5, gpt-5-mini, gpt-5-nano, gpt-5-chat-latest) are reasoning models and should have the reasoning=True flag set, which places them in OPENAI_REASONING_MODEL_NAMES rather than OPENAI_CHAT_MODEL_NAMES.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

Comment on lines +29 to +33
name="gpt-5-chat-latest",
icon="OpenAI",
tool_calling=False,
reasoning=True,
),
Copy link
Contributor

@coderabbitai coderabbitai bot Aug 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Double-check intent for “gpt-5-chat-latest”: tool_calling should be True for a chat alias.

Every other chat-capable entry sets tool_calling=True. Setting it to False diminishes functionality unexpectedly.

If “chat-latest” is a general chat alias, switch tool_calling to True (and keep reasoning=False as suggested above).

🤖 Prompt for AI Agents
In src/backend/base/langflow/base/models/openai_constants.py around lines 29 to
33, the entry for "gpt-5-chat-latest" has tool_calling set to False, which is
inconsistent with other chat-capable entries. Change tool_calling to True to
enable full chat functionality, and also update reasoning to False as suggested.
This aligns the settings with the intended behavior for a general chat alias.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gpt-5-chat-latest doesnt support tool calling

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edwinjosechittilappilly, thank you for the clarification! I understand that gpt-5-chat-latest doesn't support tool calling, so the current configuration with tool_calling=False is correct.


✏️ Learnings added
Learnt from: edwinjosechittilappilly
PR: langflow-ai/langflow#9336
File: src/backend/base/langflow/base/models/openai_constants.py:29-33
Timestamp: 2025-08-11T16:52:26.715Z
Learning: The "gpt-5-chat-latest" model in the OpenAI models configuration does not support tool calling, so tool_calling should be set to False for this model in src/backend/base/langflow/base/models/openai_constants.py.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🔭 Outside diff range comments (1)
src/backend/base/langflow/base/models/openai_constants.py (1)

92-104: Ensure GPT-5 series appears in default chat models

The new GPT-5 entries are currently tagged with reasoning=True, so they’re filtered out of OPENAI_CHAT_MODEL_NAMES (lines 92–98) and thus never make it into MODEL_NAMES (line 121). If the intent is to “make [GPT-5] available for use” as chat models, we need to update the flags or the filter logic.

• File: src/backend/base/langflow/base/models/openai_constants.py
– Lines 92–98: OPENAI_CHAT_MODEL_NAMES excludes any model with reasoning=True.
– Line 121: MODEL_NAMES is set to OPENAI_CHAT_MODEL_NAMES.

Recommendations:

  • Remove or override the reasoning=True flag on the GPT-5 entries if they should be in the chat list.
  • Or adjust the chat-model filter to include reasoning-capable models.
  • Add a unit test asserting that "gpt-5", "gpt-5-mini", and "gpt-5-nano" appear in OPENAI_CHAT_MODEL_NAMES.
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 80ebe03 and 6324d76.

📒 Files selected for processing (1)
  • src/backend/base/langflow/base/models/openai_constants.py (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
{src/backend/**/*.py,tests/**/*.py,Makefile}

📄 CodeRabbit Inference Engine (.cursor/rules/backend_development.mdc)

{src/backend/**/*.py,tests/**/*.py,Makefile}: Run make format_backend to format Python code before linting or committing changes
Run make lint to perform linting checks on backend Python code

Files:

  • src/backend/base/langflow/base/models/openai_constants.py
🧠 Learnings (2)
📓 Common learnings
Learnt from: ogabrielluiz
PR: langflow-ai/langflow#9054
File: src/backend/tests/unit/components/agents/test_agent_component.py:104-133
Timestamp: 2025-07-15T14:37:19.189Z
Learning: The GPT-4.1 series models (GPT-4.1, GPT-4.1 mini, and GPT-4.1 nano) are valid OpenAI models introduced on April 14, 2025, available exclusively through OpenAI's API with enhanced coding capabilities and 1 million token context support.
📚 Learning: 2025-07-15T14:37:19.189Z
Learnt from: ogabrielluiz
PR: langflow-ai/langflow#9054
File: src/backend/tests/unit/components/agents/test_agent_component.py:104-133
Timestamp: 2025-07-15T14:37:19.189Z
Learning: The GPT-4.1 series models (GPT-4.1, GPT-4.1 mini, and GPT-4.1 nano) are valid OpenAI models introduced on April 14, 2025, available exclusively through OpenAI's API with enhanced coding capabilities and 1 million token context support.

Applied to files:

  • src/backend/base/langflow/base/models/openai_constants.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Run Ruff Check and Format
  • GitHub Check: Update Starter Projects
  • GitHub Check: Ruff Style Check (3.13)
🔇 Additional comments (1)
src/backend/base/langflow/base/models/openai_constants.py (1)

5-5: Confirmed GPT-5 Series Model IDs and Capabilities

I’ve verified against the official OpenAI documentation:

  • gpt-5, gpt-5-mini, gpt-5-nano
    • Full/partial/minimal reasoning models
    • Full tool-calling support (standard & custom tools)
    • Ideal for agentic workflows, coding, research, automation

  • gpt-5-chat-latest
    • Chat-optimized only (no reasoning)
    • Does not support tool calling
    • Best for casual, conversational UIs

No changes to the existing constants are needed—the identifiers and comment in openai_constants.py are accurate.

Comment on lines +7 to +12
provider="OpenAI",
name="gpt-5",
icon="OpenAI",
tool_calling=True,
reasoning=True,
),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Reconsider reasoning=True for gpt-5 (will exclude it from chat models).

With reasoning=True, "gpt-5" will be filtered out of OPENAI_CHAT_MODEL_NAMES and only appear under OPENAI_REASONING_MODEL_NAMES. If GPT-5 is a general chat model, set reasoning=False so it’s surfaced in chat lists.

Proposed change:

-        tool_calling=True,
-        reasoning=True,
+        tool_calling=True,
+        reasoning=False,

🏁 Script executed:

#!/bin/bash
# Display the relevant portion of openai_constants.py to verify reasoning logic
FILE="src/backend/base/langflow/base/models/openai_constants.py"
if [ -f "$FILE" ]; then
  sed -n '1,200p' "$FILE"
else
  echo "File not found: $FILE"
fi

Length of output: 4962


Disable reasoning for gpt-5 to include it in chat models

With reasoning=True, “gpt-5” is excluded from OPENAI_CHAT_MODEL_NAMES and only surfaces under reasoning models. If it’s intended as a general chat model, set reasoning=False so it appears in chat lists.

• File: src/backend/base/langflow/base/models/openai_constants.py
• Lines: 7–12

Suggested diff:

--- a/src/backend/base/langflow/base/models/openai_constants.py
+++ b/src/backend/base/langflow/base/models/openai_constants.py
@@ create_model_metadata(
-        tool_calling=True,
-        reasoning=True,
+        tool_calling=True,
+        reasoning=False,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
provider="OpenAI",
name="gpt-5",
icon="OpenAI",
tool_calling=True,
reasoning=True,
),
provider="OpenAI",
name="gpt-5",
icon="OpenAI",
tool_calling=True,
reasoning=False,
),
🤖 Prompt for AI Agents
In src/backend/base/langflow/base/models/openai_constants.py between lines 7 and
12, the "gpt-5" model has reasoning set to True, which excludes it from the
general chat models list. To fix this, change the reasoning attribute for
"gpt-5" from True to False so it is included in OPENAI_CHAT_MODEL_NAMES and
treated as a general chat model.

Comment on lines +14 to +26
provider="OpenAI",
name="gpt-5-mini",
icon="OpenAI",
tool_calling=True,
reasoning=True,
),
create_model_metadata(
provider="OpenAI",
name="gpt-5-nano",
icon="OpenAI",
tool_calling=True,
reasoning=True,
),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Align flags for gpt-5-mini and gpt-5-nano with intended category.

Both entries have reasoning=True, which removes them from chat lists. If these are standard chat models, flip reasoning to False so they appear in OPENAI_CHAT_MODEL_NAMES.

         name="gpt-5-mini",
         icon="OpenAI",
-        tool_calling=True,
-        reasoning=True,
+        tool_calling=True,
+        reasoning=False,
     ),
     create_model_metadata(
         provider="OpenAI",
         name="gpt-5-nano",
         icon="OpenAI",
-        tool_calling=True,
-        reasoning=True,
+        tool_calling=True,
+        reasoning=False,
     ),

I’ll pull all model metadata entries and locate the chat‐model list to confirm the intended flags.


🏁 Script executed:

#!/bin/bash
# List all create_model_metadata calls in the OpenAI constants file
rg -n "create_model_metadata" src/backend/base/langflow/base/models/openai_constants.py

echo
echo "### OPENAI_CHAT_MODEL_NAMES definition and usage ###"
rg -n "OPENAI_CHAT_MODEL_NAMES" -n .

Length of output: 197792


Align gpt-5-mini and gpt-5-nano flags with chat models

Both entries are currently marked reasoning=True, which excludes them from OPENAI_CHAT_MODEL_NAMES (the dropdown of chat models). Since these act as standard chat + tool-calling models, flip reasoning to False so they appear in the chat list.

In src/backend/base/langflow/base/models/openai_constants.py:

     create_model_metadata(
         provider="OpenAI",
         name="gpt-5-mini",
         icon="OpenAI",
         tool_calling=True,
-        reasoning=True,
+        reasoning=False,
     ),
     create_model_metadata(
         provider="OpenAI",
         name="gpt-5-nano",
         icon="OpenAI",
         tool_calling=True,
-        reasoning=True,
+        reasoning=False,
     ),
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
provider="OpenAI",
name="gpt-5-mini",
icon="OpenAI",
tool_calling=True,
reasoning=True,
),
create_model_metadata(
provider="OpenAI",
name="gpt-5-nano",
icon="OpenAI",
tool_calling=True,
reasoning=True,
),
create_model_metadata(
provider="OpenAI",
name="gpt-5-mini",
icon="OpenAI",
tool_calling=True,
reasoning=False,
),
create_model_metadata(
provider="OpenAI",
name="gpt-5-nano",
icon="OpenAI",
tool_calling=True,
reasoning=False,
),
🤖 Prompt for AI Agents
In src/backend/base/langflow/base/models/openai_constants.py around lines 14 to
26, the models "gpt-5-mini" and "gpt-5-nano" have the flag reasoning=True, which
excludes them from the chat model dropdown. Change the reasoning flag to False
for both models to align them with standard chat models and ensure they appear
in the OPENAI_CHAT_MODEL_NAMES list.

Comment on lines +28 to +33
provider="OpenAI",
name="gpt-5-chat-latest",
icon="OpenAI",
tool_calling=False,
reasoning=True,
),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

gpt-5-chat-latest flags look inverted for a chat alias.

Setting tool_calling=False and reasoning=True will exclude this from chat lists; a “chat-latest” alias typically should be a chat model with tool calling enabled. Recommend tool_calling=True and reasoning=False (unless OpenAI docs specify otherwise).

-        tool_calling=False,
-        reasoning=True,
+        tool_calling=True,
+        reasoning=False,

If OpenAI’s latest docs specify different capabilities for this alias, please align with those and consider adding preview=True if it’s an alias that can move.


🏁 Script executed:

#!/bin/bash
# Show context around the gpt-5-chat-latest entry
grep -R -n -C20 "gpt-5-chat-latest" src/backend/base/langflow/base/models/openai_constants.py

# List all model definitions with "chat" in their name for comparison
grep -R -n 'name=".*chat' src/backend/base/langflow/base/models/openai_constants.py

# Find all references to the tool_calling flag to understand how it’s used
grep -R -n "tool_calling" src

Length of output: 292887


🏁 Script executed:

#!/bin/bash
# Find all references to the reasoning flag to understand its usage
grep -R -n "reasoning=" src

Length of output: 1720


🏁 Script executed:

#!/bin/bash
# Locate the "Reasoning Models" section in openai_constants.py
grep -R -n "# Reasoning Models" src/backend/base/langflow/base/models/openai_constants.py

Length of output: 117


🏁 Script executed:

#!/bin/bash
# Print the first 60 lines to see grouping/context
sed -n '1,60p' src/backend/base/langflow/base/models/openai_constants.py

Length of output: 2849


Update GPT-5 chat alias metadata flags
The gpt-5-chat-latest entry in openai_constants.py should be marked as a chat model (tool_calling=True) and not as a reasoning-only variant (reasoning=False), so it appears alongside the other chat models. Please update lines 29–33 as follows:

-    create_model_metadata(
-        provider="OpenAI",
-        name="gpt-5-chat-latest",
-        icon="OpenAI",
-        tool_calling=False,
-        reasoning=True,
-    ),
+    create_model_metadata(
+        provider="OpenAI",
+        name="gpt-5-chat-latest",
+        icon="OpenAI",
+        tool_calling=True,
+        reasoning=False,
+    ),
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
provider="OpenAI",
name="gpt-5-chat-latest",
icon="OpenAI",
tool_calling=False,
reasoning=True,
),
create_model_metadata(
provider="OpenAI",
name="gpt-5-chat-latest",
icon="OpenAI",
tool_calling=True,
reasoning=False,
),
🤖 Prompt for AI Agents
In src/backend/base/langflow/base/models/openai_constants.py between lines 28
and 33, update the metadata for the "gpt-5-chat-latest" model by setting
tool_calling to True and reasoning to False. This change correctly marks it as a
chat model rather than a reasoning-only variant, ensuring it is grouped with
other chat models.

@ErwanLorteau
Copy link

ErwanLorteau commented Aug 9, 2025

FYI I think some of the old OpenAI model (I'm not sure) are now deprecated and the API endpoint not longer exist. Might be interesting to check it at the same time

Reply from openai.com/api/v1/models :


StatusCode        : 200
StatusDescription : OK
Content           : {
                      "object": "list",
                      "data": [
                        {
                          **"id": "gpt-3.5-turbo",**
                          "object": "model",
                          "created": 1677610602,
                          "owned_by": "openai"
                        },
                        {
                          **"id": "gpt-5-nano",**
                          "obje...
RawContent        : HTTP/1.1 200 OK
                    Connection: keep-alive
                    openai-version: 2020-10-01
                    x-request-id: 2536da3d9e0d1c90184ffdffcc0c7dad
                    openai-processing-ms: 211
                    strict-transport-security: max-age=31536000; includeSubD...
Forms             : {}
Headers           : {[Connection, keep-alive], [openai-version, 2020-10-01], [x-request-id, 2536da3d9e0d1c90184ffdffcc0c7dad], [openai-processing-ms, 211]...}      
Images            : {}
InputFields       : {}
Links             : {}
ParsedHtml        : System.__ComObject
RawContentLength  : 8061


@edwinjosechittilappilly
Copy link
Collaborator Author

@ErwanLorteau Thats interesting, If possible can you share the related docs or create a new PR wrt to it.

@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Aug 11, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Aug 12, 2025
@github-actions github-actions bot added the lgtm This PR has been approved by a maintainer label Aug 12, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Aug 12, 2025
@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Aug 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 33.46%. Comparing base (b093c1f) to head (60c8844).
⚠️ Report is 13 commits behind head on main.

❌ Your project status has failed because the head coverage (2.69%) is below the target coverage (10.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #9336      +/-   ##
==========================================
- Coverage   33.51%   33.46%   -0.05%     
==========================================
  Files        1194     1194              
  Lines       56104    56126      +22     
  Branches     5279     5279              
==========================================
- Hits        18804    18785      -19     
- Misses      37240    37281      +41     
  Partials       60       60              
Flag Coverage Δ
backend 55.84% <ø> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...kend/base/langflow/base/models/openai_constants.py 100.00% <ø> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@edwinjosechittilappilly edwinjosechittilappilly added this pull request to the merge queue Aug 12, 2025
Merged via the queue into main with commit 0628398 Aug 12, 2025
32 of 33 checks passed
@edwinjosechittilappilly edwinjosechittilappilly deleted the feat-add-gpt5-models branch August 12, 2025 21:05
lucaseduoli pushed a commit that referenced this pull request Aug 22, 2025
Add GPT-5 series models to OpenAI metadata

Introduces metadata entries for the new GPT-5, GPT-5-mini, GPT-5-nano, and GPT-5-chat-latest models in the OPENAI_MODELS_DETAILED list. This update ensures these models are recognized and available for use in the application.
lucaseduoli pushed a commit that referenced this pull request Aug 25, 2025
Add GPT-5 series models to OpenAI metadata

Introduces metadata entries for the new GPT-5, GPT-5-mini, GPT-5-nano, and GPT-5-chat-latest models in the OPENAI_MODELS_DETAILED list. This update ensures these models are recognized and available for use in the application.
@Sahanave
Copy link

Thank you so much for adding this @edwinjosechittilappilly . When can we expect this to be released or is it in already? I installed langflow (1.5.1) but could not see gpt-5 in UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants