Skip to content

Commit

Permalink
Add developer message for openrouter o1 models
Browse files Browse the repository at this point in the history
  • Loading branch information
gembancud committed Dec 18, 2024
1 parent 49eb1d2 commit 3db7fa1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions aider/coders/base_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,10 @@ def format_chat_chunks(self):
chunks.system = [
dict(role="system", content=main_sys),
]
elif self.main_model.use_developer_message:
chunks.system = [
dict(role="developer", content=main_sys),
]
else:
chunks.system = [
dict(role="user", content=main_sys),
Expand Down
14 changes: 14 additions & 0 deletions aider/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class ModelSettings:
cache_control: bool = False
caches_by_default: bool = False
use_system_prompt: bool = True
use_developer_message: bool = False
use_temperature: bool = True
streaming: bool = True
editor_model_name: Optional[str] = None
Expand Down Expand Up @@ -674,6 +675,19 @@ class ModelSettings:
reminder="sys",
editor_edit_format="editor-diff",
),
ModelSettings(
"openrouter/openai/o1",
"diff",
weak_model_name="openrouter/openai/gpt-4o-mini",
use_repo_map=True,
lazy=True,
reminder="sys",
editor_edit_format="editor-diff",
use_system_prompt=False,
use_temperature=False,
use_developer_message = True
),

ModelSettings(
"openai/o1-mini",
"whole",
Expand Down

0 comments on commit 3db7fa1

Please sign in to comment.