Repository navigation
feat(acp): apply model/effort for generic ACP workers via advertised config options - #41
qq75221502-cell wants to merge 1 commit into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78b7f5236d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| _current, offered = config_option_values(live.config_options, "model") | ||
| if offered and session.model not in offered: |
There was a problem hiding this comment.
Cache advertised config options for generic ACP workers
For custom ACP workers, _remember_config_options() still returns early unless the name is in _CONFIG_OPTION_AGENTS, but every name in that set is excluded from this fallback. Consequently, lifecycle and config-update responses never populate live.config_options for workers reaching this code. Generic effort selection never runs, and a tiered ID such as gemini-3.8-flash-high is sent unchanged and rejected even when the worker advertises the corresponding family and effort. Allow generic workers to populate and refresh the config snapshot before using it here.
Useful? React with 👍 / 👎.
| if self.agent.name not in _MODEL_EFFORT_AGENTS and (task.model or task.effort): | ||
| if ( | ||
| self.agent.name not in _MODEL_EFFORT_AGENTS | ||
| and not live.applied_model |
There was a problem hiding this comment.
Warn when effort is ignored despite an applied model
When a generic worker accepts the model but advertises no supported effort option, _sync_model_option() sets live.applied_model, while the effort-option loop exhausts its candidates without adding a warning. This new condition then suppresses the existing ignored-parameter warning too. A dispatch with a valid model and effort=high therefore completes with unchanged effort and an empty warnings list, leaving the coordinator unaware that its effort request was ignored. Check effort support separately or emit a warning when no compatible effort option exists.
Useful? React with 👍 / 👎.
## Problem
Custom ACP workers (any
[agents.<name>]withprotocol = "acp", e.g. Google Antigravity'sagy acp) are not in_MODEL_EFFORT_AGENTS, sodispatch_task'smodel/effortare silently ignored (only a task warning). The worker always runs its default model — foragy acpthat is Gemini 4 Neon regardless of the requested model.Meanwhile such sessions often do advertise the standard typed config surface.
agy acp(v1.5.12)session/newreturns:configOptions[id=model]: base families (gemini-4-neon,gemini-3.8-flash,claude-opus-5-5, …)configOptions[id=thought_level]:low/medium/high/xhigh## Change
Add
_sync_generic_acp_selection, appended to_sync_selection:_MODEL_EFFORT_AGENTS, if the session advertises amodeloption, applysession.modelthrough the existing_sync_model_option(same fail-loud semantics as the named agents).gemini-3.8-flash-high→ modelgemini-3.8-flash, tierhigh);session.modelis rewritten to the applied family so state/audits record reality. This matters for workers like the built-inantigravityadapter whose ids carry the tier.effortor the tier split out above) is applied to the first advertised option amongthought_level/effort/reasoning_effort/thinking; a value with no counterpart warns instead of failing.run_turn's "model/effort were ignored" warning now checkslive.applied_model, so a successfully synced generic worker no longer reports the selection as ignored.Named agents (
grok,kimi,zcode, …) keep their dedicated sync paths untouched; the generic path self-exits for them.## Evidence
Local install patched identically (Windows,
agy1.5.12, workerantigravity-acp=agy acp):model=gemini-3.8-flash+thought_level=low→ answers "Gemini 3.8 Flash";gemini-4-neon+high→ "Gemini 4 Neon,思考档位:高";claude-opus-5-5+low→ "Claude Opus 5.5".Happy to add a unit test against a fake ACP worker advertising
model+thought_levelif you point me at the preferred fixture style.