Repository navigation
feat(models): scope implicit catalogs to configured provider endpoints - #142158
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: blocked before merge. Reviewed September 8, 2026, 10:18 AM ET / 14:18 UTC. ClawSweeper reviewWhat this changesFilters automatically supplied model catalogs against configured provider endpoints while preserving explicitly declared models and their settings. Merge readiness⛔ Blocked before merge - 2 items remain This remains useful, distinct work. No actionable correctness defect was found, and the updated compiled CLI, Gateway, and persisted-cache evidence addresses the previous review’s proof gap. Priority: P2 Review scores
Verification
How this fits togetherProvider plugins supply model inventory through manifests, discovery, and cached catalogs. OpenClaw combines that inventory with operator declarations to prepare model lists and runtime definitions. flowchart LR
A[Provider endpoint configuration] --> C[Endpoint eligibility]
B[Plugin endpoint metadata] --> C
D[Implicit and cached catalogs] --> C
C --> E[Eligible model inventory]
F[Explicit model declarations] --> E
E --> G[Model lists and prepared runtimes]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +235, Tests +449, Docs +3. Total +687 across 20 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the shared endpoint rule with the documented explicit-model path and the demonstrated fresh-state and persisted-cache preservation contract. Do we have a high-confidence way to reproduce the issue? Not applicable as a new inventory policy; source inspection and the reported compiled baseline/candidate runs establish the behavior being changed. Is this the best way to solve the issue? Yes. A shared provider-owned eligibility rule covers fresh and retained inventory while preserving explicit definitions, without introducing another configuration switch or catalog store. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1b011fe705ab. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
|
landpr-approve-unrelated-red |
|
Thanks @obviyus! Proof: The compiled CLI and Gateway preserve explicit models and settings while excluding implicit catalogs at custom provider endpoints. Independent acceptance includes a corrected persisted-cache upgrade and the shared Google/Vertex control. Exact-head local ClawSweeper review passed with zero findings and no security concerns.
Native restoration, replace/empty modes and unrelated providers also pass. Baseline build e3d987e97d1bb260f0e4937b3b75393df9d3fd99 and candidate build b04489ff47cbf3cf9d3fb4823ac70f36dbc7f6b8 retain their real identities. Synthetic fixtures and blocked external networking were used; no vendor inference or standalone installation is claimed. The original empty-cache proof assumption was withdrawn and replaced with an observed persisted-sentinel control. CI: Run34233266724 attempt1 completed with19 unrelated infrastructure failures. Every child below had no recorded project steps and the annotation "The self-hosted runner lost communication with the server." The aggregate failed their two categories. This PR changes no runner/workflow control. There is no code-introducing commit or author to blame for this service failure; no current matching-main run was claimed. Executed production, lint/type, docs, security and build checks passed. The guarded merge uses the exact-run standing approval; CI is not described as green. Failed children:
|
openclaw#142158) ## What Problem This Solves A provider configured with a custom endpoint still advertises native models that the endpoint might not support. A retained generated catalog can also restore native rows or the old native URL during catalog preparation. This implements the approved endpoint inventory outcome from openclaw#136257. Explicit model declarations remain authoritative, including models that reuse native or previously generated IDs. ## Why This Change Was Made One provider-owned eligibility rule now covers manifest planning, implicit discovery, static preparation and resolution, runtime augmentation, generated catalog reads, and recovery. It reuses the existing normalized URL, declared host/suffix, alias, and native model URL semantics. Providers without native endpoint declarations keep their discovery behavior. Model-level URL overrides alone do not exclude provider inventory. Shared hooks retain eligible sibling identities. Explicit model definitions, credentials, defaults, aliases, headers, costs, and token settings retain their existing owners. Recovery and registry reads share the generated-provider filter. Request classification and inventory share the endpoint matcher. Static and authored runtime preparation share the inline-model completion owner. No configuration switch, persistence schema, or request authorization policy is added. ## User Impact For a proxy under an existing provider ID, declare its supported models in `models.providers.<id>.models`. A nonmatching provider-level `baseUrl` excludes implicit rows, including retained generated rows. Native endpoint configurations remain eligible. Catalog membership does not prove that a credential or model request will succeed. ## Evidence - Baseline: `openclaw models list --all --provider deepseek --json --refresh` returned the three published native DeepSeek models at both native and synthetic custom endpoints. The retained baseline build was `e3d987e97d1bb260f0e4937b3b75393df9d3fd99`, from raw CI revision `f12624aed3ee3bf2b67b63db0cc8769fc77d7e45`. Affected catalog owners matched pinned main `f315eec6dd277fd289bc44df8124aaa2b88c866e`; this was not a newly built main binary. - Candidate: CI run34233266724 produced artifact10058822670 from merge build `b04489ff47cbf3cf9d3fb4823ac70f36dbc7f6b8`, containing head `76089cab111170c490b481d5ca71607e5d4f0f98`. The exercised endpoint/catalog owners match that head. Artifact digest, complete archive inventory, paths, links and build identity were verified. - Compiled CLI: native inventory3; custom endpoint0; explicitly authored unique/native-named rows2 through refresh and replace; empty replace0; native restoration3. Authored names, context sizes, defaults and aliases remain correct, with unchanged config readback. - Compiled Gateway: provider-config and refreshed views retain the two authored DeepSeek rows; the all-provider view also retains the unrelated authored model. Config readback is unchanged and the owned Gateway exited cleanly. - Persisted upgrade: a synthetic historical generated catalog was written using the baseline's compiled storage owner. The real baseline CLI exposed its three native rows and an extra historical sentinel at the custom endpoint. The candidate read an identical copy of the per-agent database and excluded all four. After explicit declarations reused the sentinel and a native ID, refresh retained their authored names, 24576/49152 context sizes, alias and settings. - Shared-provider control: the actual Google plugin retains ten Vertex models under its native regional endpoint in scoped and unscoped listings while excluding Google rows under a custom endpoint. All public behavior checks used isolated state, fixed synthetic credentials and blocked external networking. No vendor request or inference was performed. The runtime used a verified read-only dependency namespace; these are not standalone installation results. Independent source-blind acceptance passes all five behavior clauses, with a fresh supplemental judgment of both corrected persisted-cache cases. The original report and its withdrawn cache inference remain in the evidence history. Focused manifest, generated registry, recovery, discovery, endpoint and static checks pass. Ten normalization checks and93 shared discovery/static/attribution checks pass. The existing PDF caller test reproduced an authored runtime omission and passes after the owner repair;17 startup/static siblings pass without weakened assertions. Format, lint and whitespace checks pass. CI completed production checks, hosted lint/type checks, docs, security and the build. Nineteen child jobs reported lost self-hosted runner communication with no recorded steps; the aggregate failed those categories. Full annotations and the aggregate log are retained. These infrastructure failures require the existing guarded unrelated-failure disposition; CI is not claimed green. Earlier failures remain recorded: a zero-test routing attempt was corrected and never counted as passing; two initial type errors and the shared-hook/endpoint-normalization review findings were repaired; the preceding run's PDF defect and22 lost-runner failures are retained separately. The initial CLI state copy contained no persisted generated catalog and did not prove upgrade safety; the explicit persisted-catalog control above replaces that claim. Co-authored-by: Ayaan Zaidi <[email protected]>
openclaw#142158) A provider configured with a custom endpoint still advertises native models that the endpoint might not support. A retained generated catalog can also restore native rows or the old native URL during catalog preparation. This implements the approved endpoint inventory outcome from openclaw#136257. Explicit model declarations remain authoritative, including models that reuse native or previously generated IDs. One provider-owned eligibility rule now covers manifest planning, implicit discovery, static preparation and resolution, runtime augmentation, generated catalog reads, and recovery. It reuses the existing normalized URL, declared host/suffix, alias, and native model URL semantics. Providers without native endpoint declarations keep their discovery behavior. Model-level URL overrides alone do not exclude provider inventory. Shared hooks retain eligible sibling identities. Explicit model definitions, credentials, defaults, aliases, headers, costs, and token settings retain their existing owners. Recovery and registry reads share the generated-provider filter. Request classification and inventory share the endpoint matcher. Static and authored runtime preparation share the inline-model completion owner. No configuration switch, persistence schema, or request authorization policy is added. For a proxy under an existing provider ID, declare its supported models in `models.providers.<id>.models`. A nonmatching provider-level `baseUrl` excludes implicit rows, including retained generated rows. Native endpoint configurations remain eligible. Catalog membership does not prove that a credential or model request will succeed. - Baseline: `openclaw models list --all --provider deepseek --json --refresh` returned the three published native DeepSeek models at both native and synthetic custom endpoints. The retained baseline build was `e3d987e97d1bb260f0e4937b3b75393df9d3fd99`, from raw CI revision `f12624aed3ee3bf2b67b63db0cc8769fc77d7e45`. Affected catalog owners matched pinned main `0ed187312e9e37b84751ef32a3c58db15173692b`; this was not a newly built main binary. - Candidate: CI run34233266724 produced artifact10058822670 from merge build `b04489ff47cbf3cf9d3fb4823ac70f36dbc7f6b8`, containing head `76089cab111170c490b481d5ca71607e5d4f0f98`. The exercised endpoint/catalog owners match that head. Artifact digest, complete archive inventory, paths, links and build identity were verified. - Compiled CLI: native inventory3; custom endpoint0; explicitly authored unique/native-named rows2 through refresh and replace; empty replace0; native restoration3. Authored names, context sizes, defaults and aliases remain correct, with unchanged config readback. - Compiled Gateway: provider-config and refreshed views retain the two authored DeepSeek rows; the all-provider view also retains the unrelated authored model. Config readback is unchanged and the owned Gateway exited cleanly. - Persisted upgrade: a synthetic historical generated catalog was written using the baseline's compiled storage owner. The real baseline CLI exposed its three native rows and an extra historical sentinel at the custom endpoint. The candidate read an identical copy of the per-agent database and excluded all four. After explicit declarations reused the sentinel and a native ID, refresh retained their authored names, 24576/49152 context sizes, alias and settings. - Shared-provider control: the actual Google plugin retains ten Vertex models under its native regional endpoint in scoped and unscoped listings while excluding Google rows under a custom endpoint. All public behavior checks used isolated state, fixed synthetic credentials and blocked external networking. No vendor request or inference was performed. The runtime used a verified read-only dependency namespace; these are not standalone installation results. Independent source-blind acceptance passes all five behavior clauses, with a fresh supplemental judgment of both corrected persisted-cache cases. The original report and its withdrawn cache inference remain in the evidence history. Focused manifest, generated registry, recovery, discovery, endpoint and static checks pass. Ten normalization checks and93 shared discovery/static/attribution checks pass. The existing PDF caller test reproduced an authored runtime omission and passes after the owner repair;17 startup/static siblings pass without weakened assertions. Format, lint and whitespace checks pass. CI completed production checks, hosted lint/type checks, docs, security and the build. Nineteen child jobs reported lost self-hosted runner communication with no recorded steps; the aggregate failed those categories. Full annotations and the aggregate log are retained. These infrastructure failures require the existing guarded unrelated-failure disposition; CI is not claimed green. Earlier failures remain recorded: a zero-test routing attempt was corrected and never counted as passing; two initial type errors and the shared-hook/endpoint-normalization review findings were repaired; the preceding run's PDF defect and22 lost-runner failures are retained separately. The initial CLI state copy contained no persisted generated catalog and did not prove upgrade safety; the explicit persisted-catalog control above replaces that claim. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit f9ea6db)
배치 A 체리픽이 이 포크에 없는 중간 리팩터링에 걸린 지점을 포크 코드에 맞춰 정리했다. - 문자열 이스케이프 복구: attempt-prompt-build.ts, attempt-prompt-context.test.ts - openclaw#140859: session-accessor.entry-mutation.ts 의 transcript 헤더 import 복원 - openclaw#141247: runs.ts 에서 포크에 없는 projectSessionActive 조건 제거 - openclaw#141471: execute-plugin.test-support.js 가 없어 native-bash 테스트 파일 제거 - openclaw#141960: quickjs-wasi 3.6.0 의 MAX_STACK_SIZE 를 쓸 수 없어 되돌림(포크는 3.5.0 핀) - openclaw#142130: agents.ts 의 assertCurrent 호출 제거, cleanup-utils 는 선택 인자로 유지 - openclaw#142158: manifest-planner.ts 의 remoteModelIds·manifestModelsById 복원 - openclaw#143308: simple-completion-runtime.ts 에 acquireSimpleCompletionModelForAgent 래퍼 추가 - openclaw#143899: src/infra/file-descriptor.ts 의 fingerprint 비교 헬퍼 이식, backup-shared 의 configCapture 참조 제거 Co-Authored-By: Claude Fable 5.1 <[email protected]>
Related: #136257.
What Problem This Solves
A custom provider endpoint could advertise unsupported native models. Retained generated catalogs could also restore native rows or the previous endpoint during preparation.
Why This Change Was Made
One provider-owned eligibility rule covers discovery, static preparation, runtime augmentation, generated catalog reads, and recovery. It shares endpoint matching and inline-model completion with existing owners. Explicit model definitions remain authoritative.
User Impact
For a custom proxy under an existing provider ID, declare its supported models explicitly. A nonmatching provider-level endpoint excludes implicit and generated rows. Native endpoints remain eligible, and model-level overrides alone do not exclude inventory. Credentials, defaults, aliases, and model settings retain their behavior.
Consumers: catalog planning, discovery, runtime preparation, generated inventory, and recovery now apply the same endpoint rule.
Evidence
Compiled command-line and Gateway checks verified native inventory, custom-endpoint exclusions, and explicit rows. A persisted historical catalog reproduced stale rows before the fix and excluded them afterward. Shared-provider controls retained eligible siblings. Focused tests and production checks passed. Nineteen continuous-integration jobs lost communication before recording steps; the run was not green. Credentials were synthetic and external networking blocked; inference and standalone installation were not tested.