Repository navigation
fix: keep unfamiliar OpenAI model names selectable - #199545
vincentkoc wants to merge 1 commit into
Conversation
|
🦞👀 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: needs maintainer review before merge. What this changesThis PR replaces OpenAI’s broad model-name exclusion with exact known search-endpoint exclusions. Example: The provider returns the synthetic regression row gpt-7-alpha with chat support declared.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored draft open: current main retains the filter, and this PR contributes a focused change distinct from its shared-catalog prerequisite. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe OpenAI plugin projects authenticated provider inventory into model rows consumed by the Gateway and model pickers, after shared capability classification. flowchart LR
A[Authenticated OpenAI inventory] --> B[Shared capability classification]
B --> C[OpenAI account projection]
D[Catalog metadata] --> C
C --> E[Published Gateway catalog]
E --> F[CLI and model pickers]
Technical reviewBest possible solution: Keep model admission in the existing OpenAI projection, excluding demonstrated endpoint incompatibilities while preserving shared capability and account-policy checks. Do we have a high-confidence way to reproduce the issue? Source deterministically rejects an uncatalogued, explicitly chat-capable gpt-7-alpha row on current main; the stacked patch admits it, but no product execution was performed during this read-only review. Is this the best way to solve the issue? The patch is the smallest complete change within the existing owner, and every hunk serves the admission change; no verified input establishes the speculative dated-search-snapshot concern. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 932b13220bfd. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource 0, Tests +10, Docs +2. Total +12 across 3 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. 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 Reviewed November 15, 2026, 4:43 AM ET / 09:43 UTC. |
|
We probed this against a real OpenAI key before deciding. What we found
What we plan instead: keep these models runnable when typed explicitly, so an entitled account isn't blocked, but drop them from the default picker. That also lets us delete the hard-coded I'd suggest closing this one in favor of that follow-up step. If you want, I can tag you on it when it's up. |
… of being refused (#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 #198288 TTS case) stays out of the default picker without hiding new chat models from typed refs. ## 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: | 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 (#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 (#167462). - **Tencent:** opts into the prior. Its list has IDs and status only and includes speech models (#198288). - **Docs:** `model-catalogs.md` and `src/plugins/AGENTS.md` each state the rule once, citing #198288 and #199998. The OpenAI and Tencent provider pages are updated to match. - **Supersedes #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 `84a378cf` vs this head.** Same truth labels as #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 (#142063). **Tests and gates.** - **New cases** are red on `84a378cf` 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 #199998 keeps an ID-pattern row as `chat: false` until rediscovery. ## Merge danger - **Two-way door:** a revert restores #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]>
|
Thanks, Vincent. #200102 (merged as f360b83) handles this. A |
… 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: account-listed OpenAI models are hidden solely because their names contain
cyber,alpha,exporlive.User Impact
Unfamiliar model names no longer create blanket compatibility restrictions. Known unsupported search endpoints, non-chat capabilities, subscription routing, authentication and user/access policies remain enforced.
Why This Change Was Made
Replace the broad name regex and one-model exception with exact known Responses-incompatible search endpoints. Update the API-key catalog regression and model-selection documentation.
This PR is stacked on #199544 (the shared catalog default-allow fix). Its regression deliberately uses account rows without capability metadata, so it depends on that base rather than weakening the test to hide the dependency. Review only this three-file delta; land the shared fix first and retarget this PR afterward.
Evidence
gpt-5-search-apisnapshot exclusion gap. Official web-search documentation confirms the base endpoint uses Chat Completions, but the reported dated identifier was not confirmed in official model documentation or the pinned SDK. No broader name-based deny rule was added on that evidence; this remains an explicit human-review question, not a clean automated-review claim.extensions/openai/openai-api-key-catalog.test.tspassed under the shared heavy-build lock withnode scripts/run-vitest.mjs extensions/openai/openai-api-key-catalog.test.ts --maxWorkers=1.19c09b60e08a9cdfb982687d3637c9c66f11ee7c; head7c433d4746484b0ae432349bee98fba3946e1dc5. The complete two-commit stack reproduces the independently reviewed aggregate exactly.Full build, broad CI and live-provider requests are unqualified. Draft for human review only; no merge or deployment requested.