strip prefix check for openai reasoning models check (to accmodate mantle) - #5867
Merged
akshaydeo merged 1 commit intoAug 5, 2026
Conversation
Contributor
📝 WalkthroughSummary by CodeRabbit
WalkthroughChangesOpenAI model detection
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
akshaydeo
marked this pull request as ready for review
August 5, 2026 13:40
TejasGhatte
approved these changes
Aug 5, 2026
Contributor
Author
Merge activity
|
akshaydeo
deleted the
08-05-strip_prefix_check_for_openai_reasoning_models_check_to_accmodate_mantle_
branch
August 5, 2026 14:14
akshaydeo
added a commit
that referenced
this pull request
Aug 7, 2026
…ntle) (#5867) ## Summary Fixes detection of GPT-5 series models so that reasoning effort support is correctly identified regardless of where "gpt-5" appears in the model name string (e.g., fine-tuned or versioned variants like `ft:gpt-5-...`). ## Changes - Replaced `strings.HasPrefix` with `strings.Contains` when checking if a model belongs to the GPT-5 series, allowing model names that include "gpt-5" in positions other than the start to be correctly recognized as reasoning models. ## Type of change - [x] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [ ] Transports (HTTP) - [x] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs ## How to test ```sh go test ./core/providers/openai/... ``` Verify that model names such as `ft:gpt-5-mini` or other variants containing "gpt-5" not at the start of the string are correctly identified as reasoning models and have `reasoning.effort` applied. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
atharvamhaske
pushed a commit
to atharvamhaske/bifrost
that referenced
this pull request
Aug 13, 2026
…ntle) (maximhq#5867) ## Summary Fixes detection of GPT-5 series models so that reasoning effort support is correctly identified regardless of where "gpt-5" appears in the model name string (e.g., fine-tuned or versioned variants like `ft:gpt-5-...`). ## Changes - Replaced `strings.HasPrefix` with `strings.Contains` when checking if a model belongs to the GPT-5 series, allowing model names that include "gpt-5" in positions other than the start to be correctly recognized as reasoning models. ## Type of change - [x] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [ ] Transports (HTTP) - [x] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs ## How to test ```sh go test ./core/providers/openai/... ``` Verify that model names such as `ft:gpt-5-mini` or other variants containing "gpt-5" not at the start of the string are correctly identified as reasoning models and have `reasoning.effort` applied. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
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.

Summary
Fixes detection of GPT-5 series models so that reasoning effort support is correctly identified regardless of where "gpt-5" appears in the model name string (e.g., fine-tuned or versioned variants like
ft:gpt-5-...).Changes
strings.HasPrefixwithstrings.Containswhen checking if a model belongs to the GPT-5 series, allowing model names that include "gpt-5" in positions other than the start to be correctly recognized as reasoning models.Type of change
Affected areas
How to test
go test ./core/providers/openai/...Verify that model names such as
ft:gpt-5-minior other variants containing "gpt-5" not at the start of the string are correctly identified as reasoning models and havereasoning.effortapplied.Breaking changes
Related issues
Security considerations
None.
Checklist
docs/contributing/README.mdand followed the guidelines