NextCommit's Codex showed no reasoning-effort picker for a relay's (an
OpenAI-compatible key provider) gpt-6.1-sol, while gpt-6-astra had one, and
magpie's log said the effort went from none to low. models.dev had listed
gpt-6.1-sol as a reasoning model but without reasoning_options yet, or not
at all, so magpie knew no levels for it: Codex's catalog got
supported_reasoning_levels [] (no picker), and the gateway, not knowing
"none" was one of the model's levels, sent Codex's "none" as "low" (#899).
What changed:
- catalog: a thinking model with no levels of its own and no budget takes
the levels of the newest model of its models.dev family (same provider,
thinking, with levels) released on or before it (mdProvider.levels).
Used by Provider and ListedBy. A model with its own levels, a budgeted
one, one that doesn't think, or one with no family is as before.
- catalog.KinEfforts: for an id no provider lists, the levels of the newest
listed model of the same shape with the version numbers left out
(gpt-6.1-sol -> gpt-#-sol), never a budgeted or non-thinking one.
- provider.borrowedEfforts: tries ListedBy, then EffortsOf, then
KinEfforts. Entry.Efforts, which every agent's model list is built from
(Codex, Claude Code, OpenCode, dsh, ...), goes through it, as do Known,
Levelless, groups and plugins.
- Xiaomi's mimo, which takes a thinking switch only (#214), still gets no
levels; gpt-4.1 gets none.
With levels known, an effort the user picks in Codex goes through as
picked. The none->low mapping remains for models whose levels are still
unknown (#899).
What was run:
- New tests: TestFamilyLevels (catalog) and
TestNewModelTakesItsFamilysLevels (provider, Codex catalog levels for
relay/gpt-6.1-sol). Both fail with levels() and the KinEfforts call
neutered (levels "" against the family's), and pass with them.
- Real Codex CLI 0.162.1 under a sandbox HOME against a sandbox magpie
gateway (127.0.0.1:3592) and a fake relay (127.0.0.1:3591) listing
gpt-6.1-sol and gpt-6-astra. The models.dev cache had reasoning_options
stripped from every gpt-6.1-sol entry to match the reporter's.
- Built from origin/main: magpie-models.json gave relay/gpt-6.1-sol
default None, levels [].
- With this change: default medium, levels none..max,ultra.
- Codex /model showed "Select Reasoning Level for GPT-6.1 Sol · relay".
Picking Medium, High and None sent reasoning_effort "medium", "high"
and "none" to the relay.
- gofmt -l; go vet ./...; GOOS=linux go vet -tags nogui ./...;
GOOS=windows go vet ./...; GOOS=linux and GOOS=windows builds: all
clean.
- go test ./... under a temp HOME, with GOCACHE and GOMODCACHE
pinned. Every package passed except four that hit the 10-minute default
timeout with load average ~40 (TestCopilotSecretToolUsername's 5s
secret-tool wait as well). Rerun with -timeout 40m -p 2, internal/agent,
gateway, library and provider all passed.
Not tried: the Claude Code, OpenCode and dsh model files written for the
same relay model; they take Entry.Efforts like Codex.