Skip to content

fix(models): show every chat model a signed-in provider lists - #167462

Merged
obviyus merged 5 commits into
mainfrom
fix/admit-listed-models
Oct 9, 2026
Merged

obviyus merged 5 commits into
mainfrom
fix/admit-listed-models

Conversation

@obviyus

@obviyus obviyus commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: when you sign in to OpenAI with an API key, or to xAI or any provider that uses the shared live model listing, chat models the provider lists stay hidden from the model pickers until an OpenClaw release adds them.

User Impact

User impact: signed-in users see every chat model their provider lists, including models released after their OpenClaw version. Catalog rows still supply names, prices and context limits for models OpenClaw already knows. Embedding, image, video, audio, realtime, speech, transcription, moderation, legacy-completions and retired models stay hidden.

On the OpenAI API-key listing, pre-GPT-5 families (GPT-3.5, GPT-4, GPT-4o, GPT-4.1, o1, o3, o4, and fine-tunes of them) are now hidden from models list and the pickers, including the 11 such rows main shows today. Ayaan chose this over changing the default runtime: these models fail on the default runtime, so listing them offers a choice that breaks on the first turn. GPT-5+ and IDs OpenClaw does not recognize keep appearing without a release.

Existing setups keep working: a pre-GPT-5 model named as the default model, an agents.defaults.models key, an allowlist entry or a session model override still resolves, with the same conservative metadata the listing used to give it. To use one, reference it and pin the OpenClaw runtime:

{
  agents: {
    defaults: {
      model: { primary: "openai/gpt-4o" },
      models: { "openai/gpt-4o": { agentRuntime: { id: "openclaw" } } },
    },
  },
}

Why This Change Was Made

  • Shared listing. buildLiveModelProviderConfig without projectRows used to keep only the static rows whose IDs were listed. It now runs listed rows through the existing shared chat classifier, the same one that liveModelDiscovery already uses. Static rows describe matching IDs, and other chat IDs get conservative rows. The plugin's readModelId selector still runs first (default: id on object: "model" rows, as on main): the ID it returns names the row, and a row it rejects stays out. Strict and advisory failure handling is unchanged: a failed listing keeps the fallback rows, and a successful empty listing stays empty. The direct consumer is the xAI API-key catalog. Third-party plugins that call this helper without projectRows get the same behavior; docs/plugins/sdk-provider-plugins/model-catalogs.md now describes this default and how readModelId restricts it.

  • Classifier. The classifier also excludes realtime, audio, bare image/video IDs and legacy completions models (babbage, davinci, gpt-3.5-turbo-instruct), plus rows whose shutdown_date has passed. On the real OpenAI listing, all 25 rows with a past shutdown date fail on /v1/responses (22 × 404, 3 × 400). Exclusions also apply to IDs in the static catalog. <modality>-text-to-text kinds (Hugging Face vision/audio chat models) stay admitted.

  • OpenAI API key. The catalog now uses the same shared builder. This removes the GPT-4o/4.1/5+/o family allowlist and the broad deny list from fix(openai): show account chat models missing from the manifest for API-key users #162563. OpenClaw sends API-key turns through the Responses API, so narrow, named exclusions remain:

    • Pre-GPT-5 families (^(?:ft:)?(?:gpt-3\.5|gpt-4|o[134])): on the default runtime the Codex harness rejects every one of them with 400 Invalid value: 'custom', and 13 of them (gpt-3.5, gpt-4, gpt-4-turbo, gpt-4.1-nano, o1, o3-mini and snapshots) also reject hosted web search on the OpenClaw runtime. The rule also applies to catalog rows; the OpenAI manifest has none of these families (on main they came only from fix(openai): show account chat models missing from the manifest for API-key users #162563's allowlist). Hiding only affects browsing: the OpenAI provider's resolveDynamicModel hook, which core calls only for a specific selected ref, returns the same conservative row for these IDs, so config defaults, allowlist entries and session overrides still resolve.
    • search models: Chat Completions only, per the official model page. On our key, /v1/responses returned 400 "not supported with the Responses API".
    • live, cyber, experiment (exp) and alpha codename IDs: our key lists them, but /v1/responses returns 404 or a persistent 500 for them.
    • Subscription-only route IDs (gpt-5.3-codex-spark) stay hidden, so the platform and ChatGPT routes stay separate.

    OpenAI IDs without a catalog row keep the existing conservative metadata from fix(openai): show account chat models missing from the manifest for API-key users #162563 (Responses, text input, 128k context, 16,384 max output, reasoning for GPT-5+ and o-series, unknown cost). The shared prefix template is not used for OpenAI: every OpenAI ID starts with gpt-, so an unknown ID would inherit GPT-5 reasoning settings from an unrelated row.

  • xAI. Multi-agent models stay hidden: they reject the client-side tools that every OpenClaw turn sends (documented xAI limitation).

  • Retained gates: Anthropic acceptUnknownModel, OpenAI OAuth visibility, xAI OAuth backend eligibility, Google, Bedrock, Copilot, routed providers, replace mode and allowlists are unchanged.

Evidence

Regression tests (each fails on main, passes here):

  • src/plugin-sdk/provider-catalog-live-runtime.test.ts: a listed unknown chat ID shows. Realtime, audio, image, video, legacy-completions and past-shutdown rows stay out, including a static ID with image-only output. A Hugging Face image-text-to-text row stays. A failed listing keeps the static rows. The existing strict test still covers authoritative empty and failure.
  • src/plugin-sdk/provider-catalog-live-runtime.test.ts (selector): a strict plugin whose selector reads slug keeps static model-a, admits an unknown fresh-chat slug, drops a fresh-embedding slug, and keeps out an ordinary { id: "model-b", object: "model" } row the selector rejects. On ceaccc6 it fails (received only model-b); on this head it passes.
  • extensions/openai/openai-api-key-catalog.test.ts: dated snapshots, gpt-5.3-codex and a future gpt-6.2 show with conservative metadata. gpt-4-0613, gpt-4.1-mini, o3 and an ft:gpt-4.1-mini:... fine-tune stay hidden, as do search, live, cyber, experiment, alpha, subscription-only, non-chat and retired IDs. Without the pre-GPT-5 rule the test fails (1 failed, 6 passed); with it, 7/7 pass. A listing with only non-chat IDs is authoritative-empty.
  • extensions/xai/index.test.ts: an unknown grok-5-preview shows. Multi-agent and grok-imagine-* stay hidden.
  • extensions/openai/openai-dynamic-model.test.ts: selected gpt-4o, o3 and ft:gpt-4.1-mini:... refs resolve through resolveDynamicModel with the conservative listing row (reasoning only for o3). Without the hook change, all 3 fail; with it, the 3 OpenAI suites pass 84/84.

Real OpenAI API key, isolated profiles (pnpm openclaw --profile <p> models list --provider openai --all --refresh --plain; key read into process memory only):

  • /v1/models listed 168 rows. main (6070074, this branch's base) shows 33, this branch shows 36. The 11 main rows that disappear are all pre-GPT-5: gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, gpt-4o, gpt-4o-mini, o1, o1-pro, o3, o3-mini, o3-pro, o4-mini. The 14 new rows are dated GPT-5 snapshots and gpt-5.3-codex.
  • Each listed ID got one direct /v1/responses call. Every row shown here returned 200, except gpt-daybreak-red-latest (a manifest row main also shows; 404 for this key).
  • Rows hidden on this branch, by family: image 10, realtime 10, transcription 7, TTS 7, audio 6, embeddings 3, moderation 2, gpt-3.5-turbo-instruct 2, Sora 2, Whisper 1, Babbage 1, Davinci 1, past shutdown date 18 (the other 7 already fall under a family above), experiment 22, search 4, cyber 2, alpha 2, live 1, pre-GPT-5 31.

Real turns through an isolated Gateway:

  • main: openai/gpt-4o-2024-11-20 fails with Unknown model.
  • Branch, default runtime: every shown row was run in the earlier matrix, including the *-pro rows (only o1-pro, now hidden, was skipped for cost). All 35 shown rows other than gpt-daybreak-red-latest reply on the default (Codex) runtime. chat-latest and gpt-5.5-2026-04-23 were re-run on 897f27f and reply ROW_OK with agentHarnessId: "codex". gpt-daybreak-red-latest fails on both runtimes with "model not found" for this key; main shows it too.
  • Before the pre-GPT-5 rule, 29 shown rows failed on the default runtime with Invalid value: 'custom'; all 29 are now hidden.
  • Upgrade check, main (6070074) vs this branch, one turn each, isolated profiles:
    1. agents.defaults.model.primary: "openai/gpt-4o" plus its agentRuntime.id: "openclaw", nothing else: main replies C1_OK. Before the hook change, the branch failed with Unknown model: openai/gpt-4o; on this head it replies C1_OK (agentHarnessId: "openclaw").
    2. Existing session with a gpt-4o override set through sessions.patch (modelOverride: "gpt-4o"), then a turn in that session: main replies C2_OK. Before the hook change, the branch failed with Unknown model; on this head it replies C2_OK (agentHarnessId: "openclaw").
  • With a models.providers.openai row for gpt-4o as well, it replies GPT4O_OK on 897f27f.
  • models list --provider openai --all --refresh --plain on this head still shows 36 rows, none of them pre-GPT-5.
  • Hosted web search on old models: a direct /v1/responses call to o3-mini with tools: [{ type: "web_search" }] returns 400 "Tool 'web_search_preview' is not supported with o3-mini."; the same call without the tool returns 200. docs/providers/openai/models.md now says these models need tools.web.search.provider set to a managed provider or tools.web.search.enabled: false (the two switches resolveNativeWebSearch in extensions/openai/native-web-search-policy.ts checks, documented in docs/tools/web.md#native-openai-web-search).

Shared default listing through a third-party plugin and a fake OpenAI-compatible server (the xAI API-key path uses the same builder; no xAI key was available):

  • main: models list --provider listing-fixture --all --refresh --plain shows only fixture-known, and a turn on fixture-chat-next fails with Unknown model.
  • Branch: the same command shows fixture-known and fixture-chat-next. Embedding, realtime, image and audio rows stay hidden. The turn replies FIXTURE_OK from fixture-chat-next.

Checks: On f6e1266, node scripts/check-changed.mjs passes every lane except the dead-export scan, which fails only on src/talk/client-voice-session-store.ts: ClientVoiceToolEffect, a file this PR does not touch (same as on 897f27f). pnpm exec oxlint --type-aware on the changed SDK files is clean. Focused tests on f6e1266: SDK live-runtime + strict 25/25, OpenAI API-key catalog + dynamic-model 44/44, xAI 47/47.

Known gaps: gpt-5.6 would show with conservative metadata if listed, because the manifest has no row for it. The hosted-search restriction for gpt-3.5, gpt-4, gpt-4-turbo, gpt-4.1-nano, o1 and o3-mini is now documented and was checked with a raw o3-mini API call; a full OpenClaw turn on one of these models with web search off was not run. A selected pre-GPT-5 ref now resolves even when the key does not list it (main reported Unknown model for unlisted IDs), so such a turn fails at OpenAI instead of before the request.

Merge danger: two-way door. There are no schema, config, stored-data or protocol changes, and a revert restores the old lists. Blast radius: model pickers and models list for signed-in OpenAI API-key users, xAI API-key users, and plugins that call buildLiveModelProviderConfig without projectRows. The shared classifier's new exclusions also apply to every liveModelDiscovery provider. Pre-GPT-5 OpenAI models drop out of the browse lists but still resolve when referenced; on the default runtime they fail as they do on main. Worst case otherwise, a listed model that OpenClaw cannot drive shows up and fails on its first turn instead of being hidden.

@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: openai extensions: xai size: M labels Oct 8, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

The branch publishes unfamiliar chat models from provider listings, filters unsupported models, and preserves explicitly selected older OpenAI references.

Example: An OpenAI API-key user selects openai/gpt-5.5-2026-04-23

  • Before: The dated model is excluded from the account catalog.
  • After: The model appears, and the recorded Gateway turn replies ROW_OK on the default runtime.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful shared-owner implementation with convincing runtime evidence, resolved prior findings, and accepted compatibility tradeoffs.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The fully read body records real OpenAI CLI discovery and isolated Gateway replies through the changed catalog path, plus a third-party plugin completing a newly discovered model turn. Existing gpt-4o defaults and session overrides recover with C1_OK and C2_OK; the selector repair has focused regression evidence. xAI coverage is synthetic, and no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Signed-in users cannot choose some chat models their provider lists until OpenClaw adds catalog entries.
Reason: Broader discovery has demonstrated user value, and the area’s recorded decision approves the shared default. Older-model browsing exclusions retain explicit selection support.

Merge readiness

✅ Ready for maintainer review

This PR remains useful because current main does not provide the broader discovery behavior. Both prior findings are resolved, the shared-default direction is accepted, and no actionable patch defect remains.

Priority: P2
Reviewed head: f6e12660abb5ab94f4d7d41174d42444c19499ff

Before merge

None.

Findings

None.

Agent review details

How this fits together

Provider plugins combine account model listings with known model metadata to populate OpenClaw’s model pickers and CLI. The shared plugin SDK handles discovery, while providers retain their eligibility and transport rules.

flowchart TD
 A[Provider credentials] --> B[Guarded account listing]
 B --> C[Provider model ID selector]
 C --> D[Shared chat model projection]
 E[Known model metadata] --> D
 D --> F[Provider eligibility rules]
 F --> G[Model picker and CLI]
 G --> H[Agent runtime request]
Loading

Technical review

Best possible solution:

Keep discovery in the shared SDK owner, enrich listed models with provider metadata, and retain explicit older-model selections with accurate runtime instructions.

Do we have a high-confidence way to reproduce the issue?

Yes: current-main admission rules establish why unfamiliar listed IDs disappear, and recorded CLI/Gateway comparisons demonstrate the user flow. This review did not execute target code.

Is this the best way to solve the issue?

Yes: the patch reuses the existing shared acquisition and classifier owners, preserves custom selectors, and follows the recorded SDK direction.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 98457908cf3e.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Prior selector finding resolved: The default projection now applies readModelId before classification, preserving both alternate ID fields and rejected rows. The added SDK regression covers slug-based selection, unknown chat admission, embedding exclusion, and rejection of ordinary id rows. (src/plugin-sdk/provider-catalog-live-runtime.ts:139, f6e12660abb5)
  • Prior hosted-search finding resolved: The older-model instructions now name the hosted-search restriction and the existing managed-provider or disabled-search settings; these match the provider's native web-search policy. See https://docs.openclaw.ai/providers/openai/models. (docs/providers/openai/models.md:46, f6e12660abb5)
  • Accepted SDK default direction: The area contributor’s recorded decision explicitly accepts broader default discovery while retaining provider selectors, eligibility rules, failure fallback, and authoritative empty results: fix(models): show every chat model a signed-in provider lists #167462 (comment). Prior merged OpenAI and shared-catalog work establishes relevant area history.
  • Current main still needs this work: Fetched main retains the static-row intersection in the default SDK builder and the narrower OpenAI family admission rules. None of the eleven introduced paths changed between the merge base and fetched main; the related merged PRs establish earlier behavior rather than superseding this proposal. (src/plugin-sdk/provider-catalog-live-runtime.ts:213, 98457908cf3e)
  • Recorded real discovery and agent turns: The complete REST-read PR body records isolated OpenAI CLI discovery changing from 33 to 36 rows, successful default-runtime turns, and a third-party plugin turn returning FIXTURE_OK from fixture-chat-next. Existing gpt-4o defaults and session overrides return C1_OK and C2_OK after the compatibility repair. Captured body identity is a3940dc64defdd87d81ff9117e2943644837d95b7b31c765330e33d581db5218; xAI-specific coverage is synthetic. (f6e12660abb5)
  • Selected-model compatibility: Older OpenAI references receive the previous conservative metadata through dynamic resolution instead of becoming unknown models when removed from browsing. The diff changes no persisted format, schema, user setting, or protocol. (extensions/openai/openai-provider.ts:647, f6e12660abb5)

PR surface

Source +25, Tests +68, Docs +25. Total +118 across 11 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 5 141 116 +25
Tests 4 117 49 +68
Docs 2 31 6 +25
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 289 171 +118

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a bounded, demonstrated model-discovery improvement.
  • merge-risk: 🚨 compatibility: The public helper broadens default catalog membership and older OpenAI models leave browsing; these tradeoffs are explicitly accepted, with selectors and selected references preserved.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (5 earlier review cycles)
  • reviewed 2026-10-08T21:30:49.745Z sha 45e1205 :: blocked before merge. :: [P1] Preserve custom model-ID selectors in the default projection | [P2] Resolve turn compatibility before advertising the added OpenAI models
  • reviewed 2026-10-08T21:37:57.126Z sha 45e1205 :: blocked before merge. :: [P1] Preserve custom model-ID selectors in the default projection | [P2] Resolve turn compatibility before advertising added OpenAI models
  • reviewed 2026-10-08T21:47:11.683Z sha 45e1205 :: blocked before merge. :: [P1] Preserve custom model-ID selectors in the default projection | [P2] Resolve turn compatibility before advertising added OpenAI models
  • reviewed 2026-10-08T22:51:41.578Z sha 897f27f :: blocked before merge. :: [P1] Preserve custom model-ID selectors in the default projection
  • reviewed 2026-10-08T23:31:56.990Z sha ceaccc6 :: blocked before merge. :: [P1] Preserve custom model-ID selectors in the default projection | [P3] Document the hosted-search restriction for older models

Reviewed October 8, 2026, 8:01 PM ET / October 9, 2026, 00:01 UTC (Revision 6).

@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. label Oct 8, 2026
@obviyus
obviyus marked this pull request as ready for review October 8, 2026 23:24
@obviyus

obviyus commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator Author

Maintainer decision: unify default discovery. buildLiveModelProviderConfig admits every chat model the authenticated listing returns by default; static/catalog rows enrich metadata and no longer intersect away unfamiliar IDs. Plugins keep control through their readModelId selector (normalize or reject rows), existing provider eligibility rules, and by not using the helper. Failure keeps fallback rows; an authoritative empty listing stays empty. This is the 2026-09-25 rule ("signed in → every listed model appears without upgrading; catalog only enriches") applied in the shared SDK owner instead of per provider.

The default projection ignored the public readModelId selector, so a
plugin whose rows carry their id elsewhere published an empty catalog and
rows a selector rejects were admitted. Apply the selector (default: id on
object: model rows) before the shared chat classifier, document the
default admission contract, and note that old OpenAI models reject hosted
web search.
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 9, 2026
@obviyus
obviyus merged commit 6b3a4ec into main Oct 9, 2026
123 of 124 checks passed
@obviyus
obviyus deleted the fix/admit-listed-models branch October 9, 2026 00:21
@obviyus

obviyus commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

Landed in 6b3a4ec. Signed-in providers using the shared live listing now show every listed chat model (non-chat, retired and pre-GPT-5 OpenAI families stay out of browse lists; explicitly selected refs still resolve; plugin readModelId selectors still normalize/reject). Proof: real OpenAI /v1/models (main 33 → 36 shown, every shown row answers on the default runtime), a third-party fixture plugin through the shared helper, regressions that failed on main, and a published 2026.9.9 → candidate upgrade.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 9, 2026
…aw#167462)

## What Problem This Solves

Fixes: when you sign in to OpenAI with an API key, or to xAI or any provider that uses the shared live model listing, chat models the provider lists stay hidden from the model pickers until an OpenClaw release adds them.

## User Impact

User impact: signed-in users see every chat model their provider lists, including models released after their OpenClaw version. Catalog rows still supply names, prices and context limits for models OpenClaw already knows. Embedding, image, video, audio, realtime, speech, transcription, moderation, legacy-completions and retired models stay hidden.

On the OpenAI API-key listing, pre-GPT-5 families (GPT-3.5, GPT-4, GPT-4o, GPT-4.1, o1, o3, o4, and fine-tunes of them) are now hidden from `models list` and the pickers, including the 11 such rows `main` shows today. Ayaan chose this over changing the default runtime: these models fail on the default runtime, so listing them offers a choice that breaks on the first turn. GPT-5+ and IDs OpenClaw does not recognize keep appearing without a release.

Existing setups keep working: a pre-GPT-5 model named as the default model, an `agents.defaults.models` key, an allowlist entry or a session model override still resolves, with the same conservative metadata the listing used to give it. To use one, reference it and pin the OpenClaw runtime:

```json5
{
  agents: {
    defaults: {
      model: { primary: "openai/gpt-4o" },
      models: { "openai/gpt-4o": { agentRuntime: { id: "openclaw" } } },
    },
  },
}
```

## Why This Change Was Made

- **Shared listing.** `buildLiveModelProviderConfig` without `projectRows` used to keep only the static rows whose IDs were listed. It now runs listed rows through the existing shared chat classifier, the same one that `liveModelDiscovery` already uses. Static rows describe matching IDs, and other chat IDs get conservative rows. The plugin's `readModelId` selector still runs first (default: `id` on `object: "model"` rows, as on `main`): the ID it returns names the row, and a row it rejects stays out. Strict and advisory failure handling is unchanged: a failed listing keeps the fallback rows, and a successful empty listing stays empty. The direct consumer is the xAI API-key catalog. Third-party plugins that call this helper without `projectRows` get the same behavior; `docs/plugins/sdk-provider-plugins/model-catalogs.md` now describes this default and how `readModelId` restricts it.
- **Classifier.** The classifier also excludes realtime, audio, bare `image`/`video` IDs and legacy completions models (`babbage`, `davinci`, `gpt-3.5-turbo-instruct`), plus rows whose `shutdown_date` has passed. On the real OpenAI listing, all 25 rows with a past shutdown date fail on `/v1/responses` (22 × 404, 3 × 400). Exclusions also apply to IDs in the static catalog. `<modality>-text-to-text` kinds (Hugging Face vision/audio chat models) stay admitted.
- **OpenAI API key.** The catalog now uses the same shared builder. This removes the GPT-4o/4.1/5+/o family allowlist and the broad deny list from openclaw#162563. OpenClaw sends API-key turns through the Responses API, so narrow, named exclusions remain:
  - Pre-GPT-5 families (`^(?:ft:)?(?:gpt-3\.5|gpt-4|o[134])`): on the default runtime the Codex harness rejects every one of them with `400 Invalid value: 'custom'`, and 13 of them (gpt-3.5, gpt-4, gpt-4-turbo, gpt-4.1-nano, o1, o3-mini and snapshots) also reject hosted web search on the OpenClaw runtime. The rule also applies to catalog rows; the OpenAI manifest has none of these families (on `main` they came only from openclaw#162563's allowlist). Hiding only affects browsing: the OpenAI provider's `resolveDynamicModel` hook, which core calls only for a specific selected ref, returns the same conservative row for these IDs, so config defaults, allowlist entries and session overrides still resolve.
  - `search` models: Chat Completions only, per the [official model page](https://developers.openai.com/api/docs/models/gpt-4o-search-preview). On our key, `/v1/responses` returned 400 "not supported with the Responses API".
  - `live`, `cyber`, experiment (`exp`) and `alpha` codename IDs: our key lists them, but `/v1/responses` returns 404 or a persistent 500 for them.
  - Subscription-only route IDs (`gpt-5.3-codex-spark`) stay hidden, so the platform and ChatGPT routes stay separate.

  OpenAI IDs without a catalog row keep the existing conservative metadata from openclaw#162563 (Responses, text input, 128k context, 16,384 max output, reasoning for GPT-5+ and o-series, unknown cost). The shared prefix template is not used for OpenAI: every OpenAI ID starts with `gpt-`, so an unknown ID would inherit GPT-5 reasoning settings from an unrelated row.
- **xAI.** Multi-agent models stay hidden: they reject the client-side tools that every OpenClaw turn sends (documented xAI limitation).
- Retained gates: Anthropic `acceptUnknownModel`, OpenAI OAuth visibility, xAI OAuth backend eligibility, Google, Bedrock, Copilot, routed providers, replace mode and allowlists are unchanged.

## Evidence

**Regression tests (each fails on `main`, passes here):**
- `src/plugin-sdk/provider-catalog-live-runtime.test.ts`: a listed unknown chat ID shows. Realtime, audio, image, video, legacy-completions and past-shutdown rows stay out, including a static ID with image-only output. A Hugging Face `image-text-to-text` row stays. A failed listing keeps the static rows. The existing strict test still covers authoritative empty and failure.
- `src/plugin-sdk/provider-catalog-live-runtime.test.ts` (selector): a strict plugin whose selector reads `slug` keeps static `model-a`, admits an unknown `fresh-chat` slug, drops a `fresh-embedding` slug, and keeps out an ordinary `{ id: "model-b", object: "model" }` row the selector rejects. On `ceaccc6` it fails (received only `model-b`); on this head it passes.
- `extensions/openai/openai-api-key-catalog.test.ts`: dated snapshots, `gpt-5.3-codex` and a future `gpt-6.2` show with conservative metadata. `gpt-4-0613`, `gpt-4.1-mini`, `o3` and an `ft:gpt-4.1-mini:...` fine-tune stay hidden, as do search, live, cyber, experiment, alpha, subscription-only, non-chat and retired IDs. Without the pre-GPT-5 rule the test fails (1 failed, 6 passed); with it, 7/7 pass. A listing with only non-chat IDs is authoritative-empty.
- `extensions/xai/index.test.ts`: an unknown `grok-5-preview` shows. Multi-agent and `grok-imagine-*` stay hidden.
- `extensions/openai/openai-dynamic-model.test.ts`: selected `gpt-4o`, `o3` and `ft:gpt-4.1-mini:...` refs resolve through `resolveDynamicModel` with the conservative listing row (reasoning only for `o3`). Without the hook change, all 3 fail; with it, the 3 OpenAI suites pass 84/84.

**Real OpenAI API key, isolated profiles** (`pnpm openclaw --profile <p> models list --provider openai --all --refresh --plain`; key read into process memory only):
- `/v1/models` listed 168 rows. `main` (`618f4d2`, this branch's base) shows **33**, this branch shows **36**. The 11 `main` rows that disappear are all pre-GPT-5: gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, gpt-4o, gpt-4o-mini, o1, o1-pro, o3, o3-mini, o3-pro, o4-mini. The 14 new rows are dated GPT-5 snapshots and `gpt-5.3-codex`.
- Each listed ID got one direct `/v1/responses` call. Every row shown here returned 200, except `gpt-daybreak-red-latest` (a manifest row `main` also shows; 404 for this key).
- Rows hidden on this branch, by family: image 10, realtime 10, transcription 7, TTS 7, audio 6, embeddings 3, moderation 2, `gpt-3.5-turbo-instruct` 2, Sora 2, Whisper 1, Babbage 1, Davinci 1, past shutdown date 18 (the other 7 already fall under a family above), experiment 22, search 4, cyber 2, alpha 2, live 1, pre-GPT-5 31.

**Real turns through an isolated Gateway:**
- `main`: `openai/gpt-4o-2024-11-20` fails with `Unknown model`.
- Branch, default runtime: every shown row was run in the earlier matrix, including the `*-pro` rows (only `o1-pro`, now hidden, was skipped for cost). All 35 shown rows other than `gpt-daybreak-red-latest` reply on the default (Codex) runtime. `chat-latest` and `gpt-5.5-2026-04-23` were re-run on `897f27f` and reply `ROW_OK` with `agentHarnessId: "codex"`. `gpt-daybreak-red-latest` fails on both runtimes with "model not found" for this key; `main` shows it too.
- Before the pre-GPT-5 rule, 29 shown rows failed on the default runtime with `Invalid value: 'custom'`; all 29 are now hidden.
- Upgrade check, `main` (`618f4d2`) vs this branch, one turn each, isolated profiles:
  1. `agents.defaults.model.primary: "openai/gpt-4o"` plus its `agentRuntime.id: "openclaw"`, nothing else: `main` replies `C1_OK`. Before the hook change, the branch failed with `Unknown model: openai/gpt-4o`; on this head it replies `C1_OK` (`agentHarnessId: "openclaw"`).
  2. Existing session with a `gpt-4o` override set through `sessions.patch` (`modelOverride: "gpt-4o"`), then a turn in that session: `main` replies `C2_OK`. Before the hook change, the branch failed with `Unknown model`; on this head it replies `C2_OK` (`agentHarnessId: "openclaw"`).
- With a `models.providers.openai` row for `gpt-4o` as well, it replies `GPT4O_OK` on `897f27f`.
- `models list --provider openai --all --refresh --plain` on this head still shows 36 rows, none of them pre-GPT-5.
- Hosted web search on old models: a direct `/v1/responses` call to `o3-mini` with `tools: [{ type: "web_search" }]` returns 400 "Tool 'web_search_preview' is not supported with o3-mini."; the same call without the tool returns 200. `docs/providers/openai/models.md` now says these models need `tools.web.search.provider` set to a managed provider or `tools.web.search.enabled: false` (the two switches `resolveNativeWebSearch` in `extensions/openai/native-web-search-policy.ts` checks, documented in `docs/tools/web.md#native-openai-web-search`).

**Shared default listing through a third-party plugin and a fake OpenAI-compatible server** (the xAI API-key path uses the same builder; no xAI key was available):
- `main`: `models list --provider listing-fixture --all --refresh --plain` shows only `fixture-known`, and a turn on `fixture-chat-next` fails with `Unknown model`.
- Branch: the same command shows `fixture-known` and `fixture-chat-next`. Embedding, realtime, image and audio rows stay hidden. The turn replies `FIXTURE_OK from fixture-chat-next`.

**Checks:** On `f6e1266`, `node scripts/check-changed.mjs` passes every lane except the dead-export scan, which fails only on `src/talk/client-voice-session-store.ts: ClientVoiceToolEffect`, a file this PR does not touch (same as on `897f27f`). `pnpm exec oxlint --type-aware` on the changed SDK files is clean. Focused tests on `f6e1266`: SDK live-runtime + strict 25/25, OpenAI API-key catalog + dynamic-model 44/44, xAI 47/47.

**Known gaps:** `gpt-5.6` would show with conservative metadata if listed, because the manifest has no row for it. The hosted-search restriction for gpt-3.5, gpt-4, gpt-4-turbo, gpt-4.1-nano, o1 and o3-mini is now documented and was checked with a raw `o3-mini` API call; a full OpenClaw turn on one of these models with web search off was not run. A selected pre-GPT-5 ref now resolves even when the key does not list it (`main` reported `Unknown model` for unlisted IDs), so such a turn fails at OpenAI instead of before the request.

No overlap with Pash/Sarah changes: `git log origin/main [email protected] [email protected]` shows no commits to the touched files.

**Merge danger:** two-way door. There are no schema, config, stored-data or protocol changes, and a revert restores the old lists. Blast radius: model pickers and `models list` for signed-in OpenAI API-key users, xAI API-key users, and plugins that call `buildLiveModelProviderConfig` without `projectRows`. The shared classifier's new exclusions also apply to every `liveModelDiscovery` provider. Pre-GPT-5 OpenAI models drop out of the browse lists but still resolve when referenced; on the default runtime they fail as they do on `main`. Worst case otherwise, a listed model that OpenClaw cannot drive shows up and fails on its first turn instead of being hidden.

Co-authored-by: Ayaan Zaidi <[email protected]>
scribe-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Oct 15, 2026
Three fork-only test copies still asserted contracts upstream changed:
- usage.sessions-usage-details: openclaw#163182 usage target (red since before the absorb)
- provider-catalog-live-runtime.config: stale split of upstream's rewritten test (openclaw#167462, step 11)
- user-turn-transcript.recorder: openclaw#168394 keeps the admission generation (step 20)

Test files only. GREEN/RED/GREEN, neighbours and static gates recorded in the lane's .lane/DONE.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Jhynq2GVpzuVQQieebEubg
obviyus added a commit that referenced this pull request Nov 16, 2026
… 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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 17, 2026
… 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation extensions: openai extensions: xai merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant