Skip to content

LLM model selection per role #46

@baaelke

Description

@baaelke

Summary

Currently all agent roles (planner, coder, reviewer, summarizer) share a single model config agent.code.model. This makes it impossible to use e.g. a cheap model for reviewing and a powerful one for coding.

Proposed config

[agent.planner]
model = "gpt-5.4"
model_temp = 1.0

[agent.coder]
model = "gpt-5.4"
model_temp = 1.0

[agent.reviewer]
model = "gpt-5-mini"
model_temp = 0.3

[agent.summarizer]
model = "gpt-5-nano"
model_temp = 0.0

Tasks

  • Add specific role configs to config.py and AgentConfig
  • Update Query.__init__ to accept a role parameter and read the matching config
  • Assign correct role to all Query() calls in minimal_agent.py
  • Extend /model command in main.py to support per-role switching (/model planner gpt-5-nano) (see feat: add /model command #43 for /model command)
  • Update default config.toml
  • Maybe keep agent.code.model as fallback

Affected files

config.py, config.toml, treesearch/llm/query.py, treesearch/minimal_agent.py, main.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions