Repository navigation
fix(models): keep typed-only models out of chat pickers - #197326
Conversation
An allowlisted chat:false row (a Decision model) missed the chat-filtered catalog, so the selection policy synthesized a placeholder chat entry for it and the Control UI picker showed it as "Sign-in needed". The policy now recognizes the row in its unfiltered inventory and adds no placeholder; refs no catalog knows still get one. The shared visible-catalog owner also drops typed-only rows, so channel pickers that pass the full prepared catalog stop listing them under allow-any and wildcard policies. Co-authored-by: obviyus <[email protected]>
OpenClaw-Publication: 5a395168-fc03-4ce4-a923-88b013b2cc92
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Control UI chat model picker on an isolated loopback Gateway. Config explicitly lists openai/gpt-5.6-luna, typesafe/jev-latest (chat:false Decision row) and acme/unlisted-model (unknown to every catalog). Before is the base build; after is this head. The order is: before full list, before search jev, after full list, after search jev. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR prevents known Decision-only models from becoming chat-picker choices while preserving placeholders for unknown configured models. Example: Configure typesafe/jev-latest and acme/unlisted-model in agents.defaults.models.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — verified: source commit Merge readiness✅ Ready for maintainer review Keep open: this PR fixes a source-confirmed picker bug that remains on current main, with relevant screenshot proof and no actionable introduced defects found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherPrepared provider catalogs and configured model references enter the shared selection and visibility owners, which supply model choices to Gateway, CLI, and channel consumers. flowchart TD
A[Prepared model inventory] --> C[Selection policy]
B[Configured model references] --> C
A --> D[Chat catalog projection]
C --> D
D --> E[Gateway models list]
D --> F[Channel model menus]
E --> G[Control UI and CLI]
Technical reviewBest possible solution: Merge the focused repair through the existing selection and catalog-visibility owners while preserving genuine unknown-model placeholders. Do we have a high-confidence way to reproduce the issue? Yes: current-main source exposes the placeholder path, and the supplied isolated-Gateway screenshots show the reported picker failure and its corrected result; no target code was run during this read-only review. Is this the best way to solve the issue? The repair uses the existing policy and visibility owners, retains the documented purpose of unknown-model placeholders, and requires no new configuration or persisted format. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c6667b166c61. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +4, Tests +15, Other +2. Total +21 across 6 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 11, 2026, 2:07 PM ET / 19:07 UTC (Revision 2). |
Co-authored-by: obviyus <[email protected]>
OpenClaw-Publication: f5da4540-321a-4328-8367-f4f51a187fcb
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|




Problem
When a Decision-only (
inference.chat: false) model such astypesafe/jev-latestis listed explicitly inagents.defaults.models(ormodelPolicy.allow), the Control UI chat picker shows it as "Sign-in needed". Selecting it cannot work: the agent refuses it with "does not support chat inference".Root cause:
buildAllowedModelSetFromPreparedinsrc/agents/model-selection-shared.tslooks up each authored ref only in the chat-filtered catalog (inventory.filter(chat !== false), added with the Decision catalog work). The typed-only row misses that lookup, so the policy treats it as unknown and synthesizes a placeholder entry with noinferencefield. The picker then lists that placeholder as a chat model.models.listalso filtered the catalog before building the policy, so the policy could not see the typed row at all.A related leak in the same list owner:
prepareLogicalVisibleModelCatalog(src/agents/model-catalog-visibility.ts) publishes rows from whatever catalog the caller passes. Channel pickers such as Telegram/modelpass the full prepared catalog, which includes typed-only manifest rows, so with an allow-any orprovider/*policy those rows were listed as well.Fix
chat: falserow) gets no placeholder and no conversational authorization. This matches the existing contract that typed-only rows are excluded from conversational selection.models.list: passes the unfiltered rows to the policy and keeps the chat-filtered list for everything else. Net zero lines in that file.There are no per-surface patches. The Control UI picker, CLI
models list(throughmodels.list), channel/modelpickers (through the shared visible-catalog owner) and session model switching (through the shared policy'sallows) all consume these two owners.Evidence
src/agents/model-selection.test.ts: an allowlisted typed-only ref yields no placeholder and is not allowed, while an uncataloged ref still gets its synthetic entry.src/agents/model-catalog-visibility.test.ts: typed-only rows never appear under allow-any, wildcard or explicit policies in thedefault,configuredandallviews, and the uncataloged ref stays listed.models-list-result.*(12 files),commands-models*,sessions-patch-model-selection,decision-inference.integration,model-selection*,model-catalog-visibility*.src/commands/models/auth.test.ts(2 tests) andlist.status.test.ts(1 test) fail identically on the base.model-catalog-visibility.test.tsabout 8 s,model-selection.test.tsabout 17 s for the whole file (--maxWorkers=1). The line-cap ratchet passes.config/test-lines-allocations/decision-picker-typed-rows.txt= 15. The two regressions were first folded into an existing test plus one compact looped test, and the result fit locally with zero slack. Main has since used that slack, so CI saw +15 net lines over the ceiling. The record covers exactly this PR's net growth: one test per owner (the selection policy and the visible-catalog list), each red on the base.env -i(PATH, temp HOME, TMPDIR, OPENCLAW_STATE_DIR only), loopback only, its own port and token, no channels and no model credentials. Config listsopenai/gpt-5.6-luna,typesafe/jev-latestandacme/unlisted-modelexplicitly. Control UI picker, captured with Playwright:jevfindstypesafe/jev-latestmarked "Sign-in needed".openai/gpt-5.6-luna,acme/unlisted-model). Searchingjevgives no matches, andacme/unlisted-modelis still listed.openclaw models list --jsonagainst the fixed Gateway listsopenai/gpt-5.6-lunaandacme/unlisted-model.Screenshots are attached in a comment.