Skip to content

Conversation

@PeterDaveHello
Copy link
Contributor

Summary from GitHub Copilot:

This pull request adds support for the new GPT-5.1 family of models throughout the codebase, including constants, configuration, and UI options. It also ensures that model alias resolution and context lengths are handled for these new models, and adds a test to verify alias resolution.

Support for GPT-5.1 models:

  • Added new constants for GPT_5_1_CHAT_LATEST_MODEL, GPT_5_1_MODEL, GPT_5_1_2025_11_13_MODEL, GPT_5_1_CODEX_MODEL, and GPT_5_1_CODEX_MINI_MODEL in app/openai_constants.py.
  • Registered these new models in the versioning, context length, and alias resolution mappings in app/openai_constants.py. [1] [2] [3]

Slack UI integration:

  • Imported the new GPT-5.1 model constants in app/slack_ui.py and added them as selectable options in the model configuration modal. [1] [2]

Testing:

  • Added a test in tests/model_constants_test.py to ensure that the GPT_5_1_MODEL alias resolves correctly to the dated release.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

def _is_reasoning(model: str) -> bool:
"""Returns True if the model is a reasoning model under Chat Completions.
Excludes chat models like gpt-5-chat-latest and gpt-5-search-api. Matches o3*, o4*, and
non-chat gpt-5* families. Case-insensitive and safe with None/empty.
"""
if not model:
return False
ml = model.lower()
if ml.startswith("gpt-5-chat") or ml.startswith("gpt-5-search"):
return False
return (
ml.startswith("o1")
or ml.startswith("o3")
or ml.startswith("o4")
or ml.startswith("gpt-5")
)

P1 Badge Update reasoning check for gpt-5.1 chat models

The _is_reasoning helper still only excludes names starting with gpt-5-chat or gpt-5-search. The newly added gpt-5.1-chat-latest option does not match those prefixes, so it is now classified as a reasoning model. When users pick this chat model, requests will be sent with max_completion_tokens and without temperature, which is the reasoning-specific payload and can cause parameter errors or ignore user-provided temperature. The heuristic should explicitly exempt gpt-5.1-chat-* (and any future numbered chat variants) the same way it already exempts gpt-5-chat-*.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- keep gpt-5.1 chat variants out of reasoning payloads
- add regression test covering the updated heuristic

Reference:
- https://openai.com/index/gpt-5-1-for-developers/
- https://platform.openai.com/docs/models/gpt-5.1
- https://platform.openai.com/docs/models/gpt-5.1-chat-latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant