Skip to content

Conversation

@PeterDaveHello
Copy link
Contributor

Summary from GitHub Copilot:

This pull request adds support for the new gpt-5-search-api model family, updating both the backend logic and tests to handle its unique parameter requirements. The main changes ensure that this model is recognized, mapped correctly, and treated differently from reasoning and standard chat models in how API parameters are constructed.

Support for new GPT-5 Search API model:

  • Added new constants GPT_5_SEARCH_API_MODEL and GPT_5_SEARCH_API_2025_10_14_MODEL to openai_constants.py, and mapped them for default, context window, and token budget handling. [1] [2] [3] [4]

Model classification and API parameter logic:

  • Updated _is_reasoning to exclude gpt-5-search-api models, and introduced _is_search_model to specifically identify them. [1] [2]
  • Modified _create_chat_completion to handle search models: omits the n parameter and disables sampling-related parameters (like temperature, top_p, penalties, and logit_bias) for these models.

Testing for new model behavior:

  • Added GPT_5_SEARCH_API_MODEL to test imports and included it in parameterized tests to verify correct API parameter construction. [1] [2]
  • Enhanced tests to assert that search models do not receive sampling or penalty parameters, and that the n parameter is omitted.

@seratch seratch added the enhancement New feature or request label Oct 14, 2025
@seratch seratch merged commit b7ebd02 into seratch:main Oct 14, 2025
7 checks passed
@PeterDaveHello PeterDaveHello deleted the feature/gpt-5-search-api branch November 7, 2025 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants