Skip to content

side calls: a model per agent, and an effort on Claude Code and Codex - #187

Merged
Aaron Li (aaron-jx-li) merged 1 commit into
microsoft:mainfrom
rgrvlsk:per-agent-side-call-model
Nov 10, 2026
Merged

Aaron Li (aaron-jx-li) merged 1 commit into
microsoft:mainfrom
rgrvlsk:per-agent-side-call-model

Conversation

@rgrvlsk

Copy link
Copy Markdown
Contributor

paid_model names one model for every agent. Left empty, Codex runs the plugin's calls (the loop guard's judge and redirect, the micro-skills proposer) on the person's default model and effort. Set to a Codex model, it breaks Claude Code's calls, and the other way round. Someone who works with both agents cannot pick a small model for each.

What changed

  • <agent>_paid_model, one per agent with side calls (claude, codex, copilot, pi, opencode, cursor, grok, hermes), wins over paid_model for that agent. The names follow pi_cli and hermes_cli. _host_call reads the agent's key first, so every host's call gets it without further changes. TE_<AGENT>_PAID_MODEL sets it for one session.
  • claude_paid_effort reaches claude --effort, but only when this Claude Code's --help lists the option, as claude_flags already does for --no-session-persistence. codex_paid_effort reaches codex exec -c model_reasoning_effort="…". Each accepts its own CLI's words: Claude Code 2.1.319 low … max, Codex 0.167.0 none … max. Whether a model takes a value is still the CLI's call. The other agents' calls take only --model today, so they get no effort key.
  • With the new keys empty, every host's argv is unchanged.
  • The settings table in plugin/README.md and the config.py docstring list the new keys.

This touches sidecall.py and config.py, as #185 (local_model) and #163 (--safe-mode in claude_call) do. The overlap is a few lines, and either can go first.

Tests

tests/test_live_core.py:

  • test_side_calls_take_a_model_per_agent_and_an_effort: the per-agent model wins over paid_model. Each effort reaches its CLI in that CLI's form. A Claude Code whose help lacks --effort gets no --effort, and a value from the other CLI's vocabulary is refused. With nothing set, the Codex argv is upstream's.
  • test_every_agent_with_side_calls_has_its_own_paid_model_setting: every host in hosts.HOSTS except NO_SIDE_CALLS has its key, so a new agent cannot be added without one.

Both fail on main. python -m pytest tests gives 852 passed and 16 skipped on Python 3.10 and 3.13 (macOS), and experiments/tests gives 394 passed. Tried on macOS only: claude -p --model haiku --effort high and codex exec -m <model> -c model_reasoning_effort="high" each answered.

`paid_model` names one model for every agent. Left empty, Codex runs the
plugin's calls on the person's default model and effort; set to a Codex
model, it breaks Claude Code's calls.

`<agent>_paid_model` (one per agent with side calls, like `pi_cli`)
wins over `paid_model` for that agent. `claude_paid_effort` reaches
`claude --effort`, only when this Claude Code lists the option, and
`codex_paid_effort` reaches `codex exec -c model_reasoning_effort`. Each
takes its own CLI's words. With the new keys empty every argv is unchanged.

test_side_calls_take_a_model_per_agent_and_an_effort and
test_every_agent_with_side_calls_has_its_own_paid_model_setting fail on
main.
@rgrvlsk

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@aaron-jx-li
Aaron Li (aaron-jx-li) merged commit 7031504 into microsoft:main Nov 10, 2026
9 checks passed
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.

2 participants