Crush: decide how to honor role-specific model config on launch
Context (shared across all harnesses)
AO stores a per-role model in agentConfig.model (backend/internal/domain/agentconfig.go:27). session_manager.effectiveAgentConfig merges the project base config with the role override and Spawn/Restore forward the resolved value into every adapter as cfg.Config.Model (backend/internal/ports/agent.go). Each adapter must opt in to forwarding that value to its CLI. Today only the Claude (claudecode/claudecode.go:172), Codex (#2869), and Kiro (config-file model key) adapters do. Every other adapter silently drops it, so a configured worker/orchestrator falls back to the CLI's global default model.
- Original report: #2769
- Reference fix (the pattern to copy): #2869 (Codex) — adds an
appendModelFlaghelper called in bothGetLaunchCommandandGetRestoreCommand, plus aGetConfigSpecmodelfield and regression tests.
Decision needed
The Crush (Charm) adapter (crush, binary crush) does not forward cfg.Config.Model. An override mechanism exists but neither path fits AO's single Model string cleanly, so a decision is needed.
Findings
GetLaunchCommand(backend/internal/adapters/agent/crush/crush.go:73-92) emits only--cwd+--yolo;GetRestoreCommand(:125-151) adds--session.hooks.gomerges onlyoptions.context_pathsinto.crush.json(mergeCrushContextPath,:146-159). Inherits emptyGetConfigSpec.- Config route:
.crush.jsonhas a top-levelmodelsobject withlarge/smallkeys, each{ "model": "<id>", "provider": "<providerID>" }— both fields required. AO'sagentConfig.modelcarries no provider id. - Flag route:
--model/-mis documented only for the non-interactivecrush run; not confirmed on the interactive root command AO launches (UNKNOWN). Sources: https://deepwiki.com/charmbracelet/crush/4.3-model-configuration , https://deepwiki.com/charmbracelet/crush/2.2-cli-usage
Options
- Config route: extend the AO-managed
.crush.json(mergeCrushContextPath) withmodels.large(and/or.small) — but this needs aprovidervalue AO doesn't currently model. WouldagentConfigneed aproviderfield? - Flag route: first verify
crush -m <model>works on the root interactive command (crush --helpon the pinned version); if so, a simple flag fix applies.
References
- Reference fix: #2869 (Codex) · Original context: #2769
- Relevant file:
backend/internal/adapters/agent/crush/crush.go
Thanks for contributing to Agent Orchestrator.
This issue is being picked up by the current external contributor on-call pair:
- @illegalcall
- @pulkit7070
If someone is already working on this, please continue as usual. The on-call pair is added for visibility, tracking, and support, not to take over the work. If you need help with review, direction, reproduction, or next steps, please tag @illegalcall and @pulkit7070 here.
For faster context or live questions, you can also join the AO Discord.
Join the session here: https://discord.gg/H6ZDcUXmq
Come by if you want to see what is being built, ask questions, or just hang around with the community.
starting this one !