fix(llms): extend _is_reasoning_model to cover o4 family and dated Azure subversions#5357
Closed
charlesaurav13 wants to merge 1 commit into
Closed
Conversation
…ure subversions The name-based check only matched exact model names or o1-/o3- prefixes. This caused Azure deployments that append a date suffix (e.g. gpt-5-2025-06-15, gpt-5.4-mini-2025-07-15, o4-mini-2025-04-16) to fall through as non-reasoning models, which then sent max_tokens in the request body and received a 400 rejection from the Azure endpoint. Changes: - Add o4 and o4-mini to the exact-match set - Extend the prefix list with o4-/o4. (dated o4 variants) and gpt-5-/gpt-5. (dated and point-release gpt-5 variants) - Remove the misleading comment that claimed gpt-5.x supports temperature Fixes mem0ai#5296
Contributor
|
Hi @charlesaurav13 — thanks for working on this! We've just merged #5327 which addresses issue #5296 by adding an explicit Closing this PR as the issue is now resolved, but we appreciate the effort — feel free to pick up another issue! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked Issue
Closes #5296
Description
_is_reasoning_modelmatched exact names (o1,o3,gpt-5, …) and a short prefix list (o1-,o3-). Azure OpenAI surfaces these models under dated deployment names such as:gpt-5-2025-06-15gpt-5.4-2025-07-15gpt-5.4-mini-2025-07-15o4-mini-2025-04-16Any missed model passes
max_tokensto the API and receives a 400 rejection.Changes
o4ando4-minito the exact-match set (new reasoning model family)o4-,o4.,gpt-5-,gpt-5.to catch all dated and point-release subversionsgpt-5.xsupportstemperatureType of Change
Breaking Changes
N/A — only broadens the set of models treated as reasoning models.
Test Coverage