fix(qwen): forward role-specific model config on launch and restore#2971
fix(qwen): forward role-specific model config on launch and restore#2971Ashutsoh1729 wants to merge 1 commit into
Conversation
|
Thanks for contributing to Agent Orchestrator. This PR is being picked up by the current external contributor on-call pair: If someone is already working on this, please continue as usual. For faster context or live questions, you can also join the AO Discord. Join the session here: Come by if you want to see what is being built, ask questions, or just hang around with the community. |
Review requestThis PR mirrors the model-config forwarding pattern from #2869 (Codex) and #2969 (Auggie). What I've verified
Open question: godoc for invalid-model handlingIn the Auggie PR (#2969), a reviewer asked to document what happens when the model is invalid. The decision was to treat the model as an opaque value — trimmed and forwarded as-is, with the CLI validating it and surfacing the error, and no silent fallback. The author added a godoc comment on Our Anything else?Let me know if there are any other gaps or changes needed before this can be merged. |
What
Forward the configured role model to the
qwenCLI on both launch and restore, and advertise themodelconfig field.Why
Fixes #2893.
GetLaunchCommandandGetRestoreCommandbuilt their argv without readingcfg.Config.Model, so a worker or orchestrator configured with a specific model silently started on Qwen Code's global default. The adapter also inherited the emptyagentbase.Base.GetConfigSpec, so it never advertised amodelfield.How
Mirrors the Codex fix in #2869:
appendModelFlagappends--model <trimmed model>whenstrings.TrimSpace(cfg.Config.Model) != "", called from bothGetLaunchCommandandGetRestoreCommand.GetConfigSpecoverride advertisingmodelasports.ConfigFieldString.The flag is appended right after the permission flags so it sits with the other
append*Flagsoutput, ahead of--promptor--resume. Qwen Code gives the CLI flag the highest precedence, so this wins over a user's config file value as intended.Model values stay in Qwen's
provider/modelform; the adapter passes the string through untouched apart from trimming.Testing
Three new tests, proven to fail on
mainbefore the fix:TestGetLaunchCommandOmitsBlankConfiguredModelpasses both before and after, so it pins the blank/whitespace case rather than restating the fix.Checklist
main