Skip to content

Add agent.model_effort: per-model replacement for agent.effort - #477

Draft
serxa wants to merge 1 commit into
mainfrom
serxa/model-effort-defaults
Draft

serxa wants to merge 1 commit into
mainfrom
serxa/model-effort-defaults

Conversation

@serxa

@serxa serxa commented Oct 1, 2026

Copy link
Copy Markdown
Member

What

agent.effort applies to every model. There was no way to run one model at a different effort than the rest, short of changing the default for all of them.

Change

New agent.model_effort: a map from model-name substring to effort level that replaces agent.effort for matching sessions.

agent:
  effort: max
  model_effort:
    opus-5-5: high
  • Keys are case-insensitive substrings of the session's model name, checked in order; the first match wins. Models that match no key keep agent.effort.
  • It only replaces the agent.effort default. Cron and hook turns keep agent.cron_effort, and an explicit per-job (jobs.yaml) or per-run effort still wins.
  • An entry with an unknown level is dropped with a warning, so a typo falls back to agent.effort instead of sending no effort at all.
  • It is read through the same live config reference as agent.effort, so a reload applies it to clients built afterwards.
  • docs/config.md documents it, together with agent.effort and agent.cron_effort, which the Agent table was missing.

Tests

  • tests/test_engine.py: matching, case, order, validation and defaults.
  • tests/test_model_effort.py: the effort on the SessionSpec built by _get_or_create_client for web, Telegram and cron turns, for a model with no entry, and with an explicit override.

A model can now get its own effort without changing the default for the
other models: model_effort: {opus-5-5: high} gives sessions on that model
"high" while every other model keeps agent.effort. Keys are
case-insensitive substrings of the session's model name, checked in
order, first match wins. Cron and hook turns keep cron_effort, and an
explicit per-job or per-run effort still wins. An entry with an unknown
level is dropped with a warning, so a typo falls back to agent.effort.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant