Implement patched o1 & o1-mini model functionality#160
Merged
adamyodinsky merged 4 commits intoadamyodinsky:mainfrom Jul 2, 2025
Merged
Implement patched o1 & o1-mini model functionality#160adamyodinsky merged 4 commits intoadamyodinsky:mainfrom
adamyodinsky merged 4 commits intoadamyodinsky:mainfrom
Conversation
* OpenAI intends to implement the "system" role in future updates
adamyodinsky
requested changes
Apr 14, 2025
Owner
There was a problem hiding this comment.
- inject different "user" role instead of "system" if the model is "o1-mini" (o1 does not reproduce the issue), with minimal code and logic changes.
- ask only one time if the model is "o1-mini" and then make all changes necessary to the system, messages.
Contributor
Author
There was a problem hiding this comment.
- Removed duplicated prompts and simply change the
config.pypromptsrolewheno1-miniis detected. - Moved the logic the the
climethod that is run each call. Model type is only checked once in this method and necessary promptroleis updated.
* Modify logic to only change role of messages when necessary rather than duplicate * Change logic to only o1-mini model
* Only check the model type once * Modify the necessary prompts to run the command with the o1-model
adamyodinsky
approved these changes
Jul 2, 2025
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.
Issue to be resolved
Currently the o1 and o1-mini models do not support the
systemrole.See issue #159
Solution
This patch resolves the issue by generating custom system messages for those models.
Possible issues or concerns
OpenAI is expected to potentially implement the "system" role in future updates.