Skip to content

Commit 4c2b3a9

Browse files
tbitcsoz-agent
andcommitted
fix: AG2 LLMConfig dict API + default utility model matches primary
- roles.py: replace 'with llm_config:' context manager (unsupported in AG2 v0.12.0) with llm_config= parameter approach - config.py: default utility_model changed from qwen2.5:7b (often not installed) to qwen2.5:14b (same as primary, works out of box) Tested: specsmith agent plan + specsmith agent run both execute full Planner→Builder→Verifier pipeline end-to-end with Ollama Co-Authored-By: Oz <oz-agent@warp.dev>
1 parent f394d92 commit 4c2b3a9

2 files changed

Lines changed: 25 additions & 25 deletions

File tree

src/specsmith/agents/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class AgentConfig:
1414
"""Configuration for the AG2 agent shell."""
1515

1616
primary_model: str = "qwen2.5:14b"
17-
utility_model: str = "qwen2.5:7b"
17+
utility_model: str = "qwen2.5:14b" # same as primary; override in scaffold.yml
1818
ollama_base_url: str = "http://localhost:11434"
1919
max_iterations: int = 10
2020
stream: bool = False

src/specsmith/agents/roles.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ def _git_changed() -> str:
108108
def _git_branch() -> str:
109109
return git_branch_info(project_dir=pd)
110110

111-
with llm_config:
112-
agent = ConversableAgent(
113-
name="Planner",
114-
system_message=PLANNER_PROMPT,
115-
human_input_mode="NEVER",
116-
functions=[_read_file, _list_tree, _search, _git_status, _git_changed, _git_branch],
117-
)
111+
agent = ConversableAgent(
112+
name="Planner",
113+
system_message=PLANNER_PROMPT,
114+
human_input_mode="NEVER",
115+
llm_config=llm_config,
116+
functions=[_read_file, _list_tree, _search, _git_status, _git_changed, _git_branch],
117+
)
118118
return agent
119119

120120

@@ -150,16 +150,16 @@ def _git_status() -> str:
150150
def _git_diff() -> str:
151151
return git_diff(project_dir=pd)
152152

153-
with llm_config:
154-
agent = ConversableAgent(
155-
name="Builder",
156-
system_message=BUILDER_PROMPT,
157-
human_input_mode="NEVER",
158-
functions=[
159-
_read_file, _write_file, _patch_file, _list_tree,
160-
_run_command, _git_status, _git_diff,
161-
],
162-
)
153+
agent = ConversableAgent(
154+
name="Builder",
155+
system_message=BUILDER_PROMPT,
156+
human_input_mode="NEVER",
157+
llm_config=llm_config,
158+
functions=[
159+
_read_file, _write_file, _patch_file, _list_tree,
160+
_run_command, _git_status, _git_diff,
161+
],
162+
)
163163
return agent
164164

165165

@@ -193,11 +193,11 @@ def _git_status() -> str:
193193
def _git_diff() -> str:
194194
return git_diff(project_dir=pd)
195195

196-
with llm_config:
197-
agent = ConversableAgent(
198-
name="Verifier",
199-
system_message=VERIFIER_PROMPT,
200-
human_input_mode="NEVER",
201-
functions=[_run_tests, _summarize, _read_file, _run_command, _git_status, _git_diff],
202-
)
196+
agent = ConversableAgent(
197+
name="Verifier",
198+
system_message=VERIFIER_PROMPT,
199+
human_input_mode="NEVER",
200+
llm_config=llm_config,
201+
functions=[_run_tests, _summarize, _read_file, _run_command, _git_status, _git_diff],
202+
)
203203
return agent

0 commit comments

Comments
 (0)