Repository navigation
fix(models): guessed non-chat models leave the default picker instead of being refused - #200102
Conversation
`inference.chat: false` now means declared non-chat only: a native kind or output modality, or the catalog. Those rows stay hidden and refused before any request. Weak evidence, meaning an ID that names a non-text family, an unfamiliar value in a field the listing uses for chat, or a provider prior, adds `inference.chatEvidence: "unlikely"` with `chat` still true. Readers that predate the key drop it (the inference object is non-strict) and treat the row as chat. Unlikely rows leave the default picker, `models.list`, `/models` and setup choices (core setup picker, oMLX, Bifrost), and stay in `all` views. Typed, configured, retained and fallback refs still run; the pre-run guard refuses only `chat === false`. - The interim ID-pattern `chat: false` from #199998 becomes unlikely. - OpenAI: live/cyber/exp/alpha IDs are demoted rather than dropped, and the gpt-5.6-cyber exception is gone. Search IDs and the pre-GPT-5 rule stay. - Tencent opts into the new `unknownModelChatEvidence: "unlikely"` discovery option, so its ID-only listing (#198288) cannot put a speech model in the default picker without hiding new chat models from typed refs. - A live row's declared chat replaces a metadata guess in snapshot rows. Co-authored-by: obviyus <[email protected]>
… of being refused OpenClaw-Publication: 8af8ed4a-ce4e-471b-9465-c401900ac501
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
With only `text-embedding-3-small` listed, the ready outcome now publishes it as unlikely chat (`chat: true, chatEvidence: "unlikely"`): it names an embedding family but declares nothing, so a typed ref may still try it. The case asserts what the picker offers, which stays empty; filter on both fields. Co-authored-by: obviyus <[email protected]>
OpenClaw-Publication: ba8cf656-6273-4f8b-bdbe-6bd6acf781a3
…ity-step3 # Conflicts: # docs/plugins/sdk-provider-plugins/model-catalogs.md
OpenClaw-Publication: e23f6431-3695-4241-93bc-38a2b709aa86
…00126) ## Problem #200073 made the OpenAI API-key catalog put its listing (`modelIdCatalog`) on its ready outcome. `test/openai-model-discovery-auth-order.test.ts` still expected the old outcome shape. As a result, `main` fails `checks-node-changed-compact-small-20` in "continues from failed openai OAuth to profile API-key auth without repeating refresh". Open PRs that run this shard (for example #200102) inherit the failure. ## Solution For the OpenAI case, the test now expects `modelIdCatalog: { baseUrl, modelIds: [modelId] }`. The xAI cases are unchanged. This is a test-only change. ## Evidence - `pnpm test test/openai-model-discovery-auth-order.test.ts`: 17/17 pass. Before this change on `origin/main`, the OpenAI case failed with exactly this diff. - oxfmt is clean. <!-- openclaw-publication:f58bd5b3-ae10-8019-875f-27c86918b01c --> Co-authored-by: Ayaan Zaidi <[email protected]>
OpenClaw-Publication: 33192d35-0590-4e14-92e4-72d21ed5f77d
|
Maintainer override: Ayaan approved landing this PR with one unrelated red job.
|
|
Landed as f360b83. Guessed non-chat models (name rules, or unlabeled Tencent rows) now carry |
…tgres-compaction-watched-prompt-20261116 * commit '9e810f7101557b006d5ff223d955f14dc43329f0': (23 commits) chore(ui): refresh control ui locales (#200164) fix(update): stop reporting unset git config keys as failing checks (#200153) test: consolidate redundant coverage (198793, part 2) (#198936) revert: skills-used full-transcript scan on every chat history page (#200159) refactor(sessions): follow the chat by key for stored delivery references (#200099) fix(update): bridge 2026.11.5-beta.4 updaters (#200152) fix(gateway): avoid filesystem stalls during catalog refresh (#200136) fix(ci): match update refusal probe to selected candidate (#200043) fix(agents): keep read-only steering carriers when publishing suppressed user envelopes (#200156) test: consolidate suites while retaining recovery owners (#198933) test: consolidate redundant coverage (198789, part 2) (#198932) refactor(cli): consolidate camera command tests (#200144) fix(cli): avoid initializing provider runtime during cleanup (#200139) fix(ui): show mobile destinations without the drawer exit delay (#198879) chore(ui): refresh control ui locales (#200146) fix(knowledge): keep historical claims distinct and reject changed retries (#200140) fix(ui): align dropdown arrows on mobile New Session improve(sessions): archive inactive transcripts by default (#199899) refactor(agents): own background commands and yield waits by the chat (#200097) fix(models): guessed non-chat models leave the default picker instead of being refused (#200102) ...
…enclaw#200126) ## Problem openclaw#200073 made the OpenAI API-key catalog put its listing (`modelIdCatalog`) on its ready outcome. `test/openai-model-discovery-auth-order.test.ts` still expected the old outcome shape. As a result, `main` fails `checks-node-changed-compact-small-20` in "continues from failed openai OAuth to profile API-key auth without repeating refresh". Open PRs that run this shard (for example openclaw#200102) inherit the failure. ## Solution For the OpenAI case, the test now expects `modelIdCatalog: { baseUrl, modelIds: [modelId] }`. The xAI cases are unchanged. This is a test-only change. ## Evidence - `pnpm test test/openai-model-discovery-auth-order.test.ts`: 17/17 pass. Before this change on `origin/main`, the OpenAI case failed with exactly this diff. - oxfmt is clean. <!-- openclaw-publication:f58bd5b3-ae10-8019-875f-27c86918b01c --> Co-authored-by: Ayaan Zaidi <[email protected]>
… of being refused (openclaw#200102) ## What Problem This Solves Fixes: listed models are refused before any request when OpenClaw only *guesses* they are not chat models. Examples are an ID that names a non-text family, an OpenAI live/cyber/exp/alpha ID, or an unfamiliar kind value. Other guesses show a model that fails for the listing key, such as `gpt-5.6-cyber`. ## User Impact - Rows that **declare** non-chat support (native kind, output modality, catalog) are unchanged: hidden and refused before any request. - Rows that are only **unlikely** chat leave the default picker and setup choices but appear in "all" views. Typed and configured refs to them still run. - OpenAI default picker on a real listing: wrongly shown 1 → 0, wrongly hidden 3 → 3. Typed `openai/o3` replies while it is absent from the default list. - Tencent TokenHub: an uncatalogued, unlabeled listed ID (the openclaw#198288 TTS case) stays out of the default picker without hiding new chat models from typed refs. ## Why This Change Was Made openclaw#199998 made "no evidence" unknown, but kept an interim rule: an ID that names a non-text family got `chat: false`. This PR separates guesses from declarations: | state | encoding | default picker / setup | "all", typed, configured | pre-run guard | |---|---|---|---|---| | yes / unknown | no `inference`, or `chat: true` | shown | shown, runs | passes | | unlikely | `inference: { chat: true, chatEvidence: "unlikely" }` | hidden | shown, runs | passes | | declared no | `inference: { chat: false }` | hidden | hidden | refused (openclaw#184996) | - **Marker:** an optional `chatEvidence` key inside `inference`; `chat` is not widened. Old readers drop it and see plain chat: - the 2026.11.5 beta inference schema is a non-strict `z.object`; - released stable readers have no `inference` at all (v1/v2 bundles only); - the v3 hosted reader drops unknown `inference` keys. - The registry runtime model and the v3 row schema accept the key. - No wire, protocol, config or cache-scope change. `ModelChoice` is a closed protocol object, so there is no "unverified" badge. - **Weak evidence** applies only to uncatalogued rows without capability fields: - the ID-family pattern; - an unfamiliar value in a kind field the same listing uses for chat; - a provider prior, set with the new discovery option `unknownModelChatEvidence: "unlikely"`. - **Surfaces:** - The visibility owner (default picker, `models.list`, `/models`) treats unlikely like `deprecated`: listed only in `all`, configured and retained views. - The setup picker, oMLX and Bifrost offer likely chat only. - The guard still refuses only `chat === false`. - **OpenAI:** - `live|cyber|exp|alpha` IDs are demoted instead of dropped, and the `gpt-5.6-cyber` exception is removed. - `search` IDs stay dropped: Responses rejects them with a 400, dated snapshots too. - The pre-GPT-5 rule stays (openclaw#167462). - **Tencent:** opts into the prior. Its list has IDs and status only and includes speech models (openclaw#198288). - **Docs:** `model-catalogs.md` and `src/plugins/AGENTS.md` each state the rule once, citing openclaw#198288 and openclaw#199998. The OpenAI and Tencent provider pages are updated to match. - **Supersedes openclaw#199545:** the name-matched OpenAI IDs are demoted, not revealed, so their 404/500 IDs stay out of the default picker. ## Evidence **Replay of saved real listings, main `6851ad05` vs this head.** Same truth labels as openclaw#199998. | provider | listed | proven | default picker main / branch | wrongly shown / hidden, main | wrongly shown / hidden, branch | |---|---|---|---|---|---| | OpenAI (after account projection) | 125 | 31 | 37 / 36 | 1 / 3 | **0 / 3** | | HF router + OpenRouter | 600 | 600 | 600 / 600 | 0 / 0 | 0 / 0 | | Vercel AI Gateway | 508 | 508 | 323 / 323 | 0 / 0 | 0 / 0 | | DeepInfra | 178 | 178 | 92 / 92 | 0 / 0 | 0 / 0 | | Venice | 414 | 414 | 142 / 142 | 0 / 0 | 0 / 0 | | NVIDIA (no proof) | 39 | 0 | 29 / 29 | – | – | | Ollama library | 24 | 24 | 23 / 23 | 0 / 0 | 0 / 0 | | models.dev | 9,878 | 9,545 | 9,414 / 9,414 | 0 / 0 | 0 / 0 | - **OpenAI wrongly hidden (3):** `gpt-4o-mini` and `o3` fall under the pre-GPT-5 rule and run by typed ref. `gpt-5-search-api` is Chat-Completions-only. - **OpenAI rows refused pre-run:** 46 on main, 0 on this branch. 38 of the 46 are now unlikely; 8 hit the pre-GPT-5 drop. - **TokenHub:** its authenticated listing is uncaptured, so a fixture of that shape is tested instead. **Real Gateway (built dist, real OpenAI key).** - **Setup:** each side ran under `env -i` with only PATH, a temp HOME, TMPDIR, `OPENCLAW_STATE_DIR` and `OPENCLAW_CONFIG_PATH`. The key came through stdin only. - **Isolation:** loopback, its own port and token, no channels (the harness refuses one). Reads waited for a `ready` live listing. | | main | branch | |---|---|---| | OpenAI rows: default `models list` / `--all --provider openai` | 39 / 39 | 36 / 102 | | `gpt-5.6-cyber` default / all | shown / shown | absent / shown | | `gpt-image-2` default / all | absent / absent | absent / shown | | typed `openai/o3` turn (absent from default on both) | reply `ok` | reply `ok` | | typed `openai/gpt-image-2` turn | refused pre-run `model_chat_unsupported` | sent; provider 404 | - **Cleanup:** 0 key hits in outputs and state, both Gateways exited and ports closed. The host Gateway was untouched. - `models list --provider X` already uses the `all` view (openclaw#142063). **Tests and gates.** - **New cases** are red on `6851ad05` and green here: - the gate table (shown / unlikely / declared no) and the provider prior; - visibility: default, `all` and configured views; - discovery → prepared snapshot → visibility → `resolveModelAsync`: the bare ID-pattern row passes the pre-run check, and the declared-no pin test still rejects; - the setup picker; - the OpenAI API-key catalog; - a Tencent ID-only listing; - an old-reader schema fixture; - the v3 reader keeping the marker. - **Consumer suites updated and green:** live-runtime, OpenCode Zen/Go, oMLX, Bifrost, LiteLLM, Anthropic discovery, Codex cyber-failover, utility model. - **Typecheck and lint:** `tsgo:core`, `tsgo:extensions`, `check:test-types`, oxlint and oxfmt are clean. - **Prefix stability:** `agent-tools.prefix-stability.test.ts` passes (14/14). - **Ratchets:** test lines +178 (allowance 400); line-cap passes. - **Builds:** `ocx build --dts` and `build:plugin-sdk:strict-smoke` pass on this head. - **`plugin-sdk:api:diff`:** one changed signature, `ModelInferenceCapabilitiesSchema` (optional `chatEvidence`), digest `47bba3f8`. - **Size:** production +96 / −40 in 10 files; no new module, state, cache or config. **Accepted edges (no code)** - The existing route-change overlay replaces a route-moved row's `inference` with `chat: false`, as it already does for any such row. - A future `chatEvidence` value would fail this build's schema, so a later state should use a new key. - Main or nightly state saved under openclaw#199998 keeps an ID-pattern row as `chat: false` until rediscovery. ## Merge danger - **Two-way door:** a revert restores openclaw#199998's behavior, and older builds read the marker as plain chat. No migration, config or protocol change. - **Blast radius if wrong:** listed non-chat models appear in `all` views. A typed ref to one gets the provider error instead of the pre-run refusal. <!-- openclaw-publication:8af8ed4a-ce4e-471b-9465-c401900ac501 --> Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Fixes: listed models are refused before any request when OpenClaw only guesses they are not chat models. Examples are an ID that names a non-text family, an OpenAI live/cyber/exp/alpha ID, or an unfamiliar kind value. Other guesses show a model that fails for the listing key, such as
gpt-5.6-cyber.User Impact
openai/o3replies while it is absent from the default list.Why This Change Was Made
#199998 made "no evidence" unknown, but kept an interim rule: an ID that names a non-text family got
chat: false. This PR separates guesses from declarations:inference, orchat: trueinference: { chat: true, chatEvidence: "unlikely" }inference: { chat: false }chatEvidencekey insideinference;chatis not widened. Old readers drop it and see plain chat:z.object;inferenceat all (v1/v2 bundles only);inferencekeys.ModelChoiceis a closed protocol object, so there is no "unverified" badge.unknownModelChatEvidence: "unlikely".models.list,/models) treats unlikely likedeprecated: listed only inall, configured and retained views.chat === false.live|cyber|exp|alphaIDs are demoted instead of dropped, and thegpt-5.6-cyberexception is removed.searchIDs stay dropped: Responses rejects them with a 400, dated snapshots too.model-catalogs.mdandsrc/plugins/AGENTS.mdeach state the rule once, citing fix: hide non-chat models from chat selection #198288 and fix(models): read provider model kinds at one owner; unknown is not chat:false #199998. The OpenAI and Tencent provider pages are updated to match.Evidence
Replay of saved real listings, main
84a378cfvs this head. Same truth labels as #199998.gpt-4o-miniando3fall under the pre-GPT-5 rule and run by typed ref.gpt-5-search-apiis Chat-Completions-only.Real Gateway (built dist, real OpenAI key).
env -iwith only PATH, a temp HOME, TMPDIR,OPENCLAW_STATE_DIRandOPENCLAW_CONFIG_PATH. The key came through stdin only.readylive listing.models list/--all --provider openaigpt-5.6-cyberdefault / allgpt-image-2default / allopenai/o3turn (absent from default on both)okokopenai/gpt-image-2turnmodel_chat_unsupportedmodels list --provider Xalready uses theallview (refactor(models): read published catalog inventory through the Gateway #142063).Tests and gates.
84a378cfand green here:alland configured views;resolveModelAsync: the bare ID-pattern row passes the pre-run check, and the declared-no pin test still rejects;tsgo:core,tsgo:extensions,check:test-types, oxlint and oxfmt are clean.agent-tools.prefix-stability.test.tspasses (14/14).ocx build --dtsandbuild:plugin-sdk:strict-smokepass on this head.plugin-sdk:api:diff: one changed signature,ModelInferenceCapabilitiesSchema(optionalchatEvidence), digest47bba3f8.Accepted edges (no code)
inferencewithchat: false, as it already does for any such row.chatEvidencevalue would fail this build's schema, so a later state should use a new key.chat: falseuntil rediscovery.Merge danger
allviews. A typed ref to one gets the provider error instead of the pre-run refusal.