operator: default the ambient monitor to a cheap same-provider model#377
Merged
Conversation
When AGENTD_OPERATOR_MONITOR_MODEL is unset, the per-tick triage ran on the operator's own frontier model. Now it defaults to a cheaper tier on the SAME provider (so auth is already present): codex-oauth -> gpt-5.4-mini openai -> gpt-5-mini anthropic -> claude-sonnet-4-5 Already-small operator models, and providers without an obvious cheap tier (gemini/ollama/unknown), keep the operator's model. A wrong model name resolves fine but 400s at call time, which would silently blind the monitor (every triage returns "nothing"). So the resolved monitor model is health-checked once at startup (orchestrator-only) and falls back to the operator's own model if it can't be resolved or doesn't answer. Verified live against this codex-oauth account: the *-codex-mini names are rejected; gpt-5.4-mini is the real small tier (from the account's model list) and passes the health check. On an identical scan it caught the high-value "blocked on prompt" finding (gpt-5.5 also caught a subtler opportunity) -- the expected cost/quality tradeoff; override for thoroughness. Unit-tested default_monitor_spec mapping; spec 0022 updated.
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.
Follow-up to #376. The per-tick monitor triage was offloaded off the operator's context, but when
AGENTD_OPERATOR_MONITOR_MODELwas unset it still ran on the operator's own frontier model. With the 60s active-fleet cadence (40ec9f6) that's a frontier call every minute.Change
When
AGENTD_OPERATOR_MONITOR_MODELis unset, default to a cheaper tier on the same provider (auth already present):codex-oauthgpt-5.4-miniopenaigpt-5-minianthropicclaude-sonnet-4-5Already-small operator models (
*mini*/*nano*/*haiku*, or anthropic already on sonnet) and providers without an obvious cheap tier (gemini/ollama/unknown) keep the operator's model.Why a startup health-check
A wrong model name resolves fine but 400s at call time — which would silently blind the monitor (every triage returns "nothing", operator never gets findings). So the resolved monitor model is health-checked once at startup (orchestrator-only — a tiny "reply ok" completion) and falls back to the operator's own model if it can't be resolved or doesn't answer. This makes the hardcoded defaults safe against drift / per-account differences.
Verified live (this codex-oauth / ChatGPT account)
This is why the health-check exists — guessing was wrong twice:
gpt-5-codex-mini,gpt-5-codex,gpt-5-mini,gpt-5.1-codex-mini, … → all 400 ("not supported when using Codex with a ChatGPT account").~/.codex/models_cache.json) isgpt-5.5,gpt-5.4,gpt-5.4-mini,gpt-5.3-codex-spark.gpt-5.4-minicompletes and passes the health-check.On an identical fleet scan:
gpt-5.4-miniflagged the session blocked on› Write tests for @filename(quiet 30m) — the high-value catch.gpt-5.5flagged that plus a subtler opportunity (❯ restart agents to pick up the fix).So the small default catches the "blocked/stuck" findings but is less exhaustive than frontier — the expected cost/quality tradeoff; override
AGENTD_OPERATOR_MONITOR_MODELfor thoroughness.Tests
default_monitor_specmapping unit-tested (cheap tiers + already-small/unknown keep operator's model); 37interactivetests pass; full build clean. Spec0022updated.