Skip to content

Conversation

@Broken-Admin
Copy link
Contributor

Issue to be resolved
Currently the o1 and o1-mini models do not support the system role.
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.

* OpenAI intends to implement the "system" role in future updates
Copy link
Owner

Choose a reason for hiding this comment

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

  1. 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.
  2. ask only one time if the model is "o1-mini" and then make all changes necessary to the system, messages.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. Removed duplicated prompts and simply change the config.py prompts role when o1-mini is detected.
  2. Moved the logic the the cli method that is run each call. Model type is only checked once in this method and necessary prompt role is updated.

Copy link
Owner

Choose a reason for hiding this comment

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

Looks good! 💯

* 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
Copy link
Owner

Choose a reason for hiding this comment

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

Looks good! 💯

@adamyodinsky adamyodinsky merged commit 085a3e3 into adamyodinsky:main Jul 2, 2025
@adamyodinsky adamyodinsky linked an issue Jul 2, 2025 that may be closed by this pull request
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.

o1-mini model does not support "system" message

2 participants