Repository navigation
fix(mcp-server): pass the resolved model to run-harness like scheduled runs - #1191
Merged
Merged
Conversation
…d runs The local MCP server never sent --model, so every local run used the CLI's own default model instead of the skill's pin. It now resolves the model with the workflow's precedence (AEON_MODEL, the skill's model in aeon.yml, the global model, claude-sonnet-5-5) and passes it per harness the way aeon.yml does: claude gets the id, grok gets only a grok id (claude ids become grok-4.7), and the other harnesses get MODEL_ARG from scripts/resolve-harness.sh. The per-skill aeon.yml reader now follows block-shaped entries and strips comments, like scripts/skill_entry.sh, so a block entry's model or harness is not missed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
The local MCP server (apps/mcp-server) never passed
--modeltorun-harness, so a local run always used the CLI's own default model, even for skills pinned to a model inaeon.yml(for examplesc-auditanddeploy-uni-hookonclaude-opus-5-5). Scheduled runs pass the model, so the two paths disagreed.The server now picks the model the same way
.github/workflows/aeon.ymldoes:AEON_MODELenv (the local stand-in for the workflow'smodeldispatch input, next to the existingAEON_HARNESS;(config default)counts as unset)model: "..."in itsaeon.ymlentrymodel:inaeon.ymlclaude-sonnet-5-5And it passes it per harness the way the workflow does:
--model <id>.defaultor empty becomesgrok-4.7, and only agrok-*id is passed.--modelis theMODEL_ARGfromscripts/resolve-harness.sh, the same script the workflow's "Resolve harness" step runs. It maps the pick to the harness's own id, or leaves it out so the harness's default applies, based on which auth keys are set.The per-skill
aeon.ymlreader now follows block-shaped entries and strips comments, a port ofscripts/skill_entry.sh(which the workflow andresolve-harness.shalready use), so a block entry'smodel:orharness:is not missed. The run log line now names the model, and the README documentsAEON_MODELand the order.How it was verified
npm run typecheckandnpm run buildin apps/mcp-server.claude,grokandcodexbinaries first onPATHthat save their argv and print a valid result, thentools/callover stdio against the built server with a clean env:aeon-sc-audit(pinned in aeon.yml): claude got--model claude-opus-5-5.aeon-heartbeat(no pin): claude got--model claude-sonnet-5-5.AEON_MODEL=claude-opus-5-5on heartbeat:--model claude-opus-5-5.AEON_HARNESS=grokon sc-audit:--model grok-4.7; withAEON_MODEL=grok-4.6:--model grok-4.6.AEON_HARNESS=codex, no auth keys:--model openai/gpt-6-luna; withOPENAI_API_KEY: no--model; with that key andAEON_MODEL=openai/gpt-6.1-sol:--model gpt-6.1-sol. All match whatresolve-harness.shgives the workflow.skill_entry.sh+sedpipeline for all 89 entries inaeon.ymland a fixture with block entries and trailing comments.No real (paid) run was done.