Skip to content

fix(models): preserve DeepInfra and NVIDIA catalogs on discovery failure - #139749

Merged
obviyus merged 3 commits into
mainfrom
codex/custom-catalog-acquisition
Sep 6, 2026
Merged

obviyus merged 3 commits into
mainfrom
codex/custom-catalog-acquisition

Conversation

@obviyus

@obviyus obviyus commented Sep 6, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #136257, #139357, #139649. AI-assisted.

What Problem This Solves

Two catalog providers could lose learned models or report success after failed refreshes. Empty discovery could restore starters, and an optional featured feed could remove a model still present in inference inventory.

Why This Change Was Made

Both plugins use the shared acquisition owner, removing duplicate fetches and a live builder. Validated metadata retains original HTTP failures for strict discovery, while the published builder keeps its advisory defaults. Optional pricing and featured metadata remain separate from membership.

User Impact

Failures retain compatible inventory with an explicit outcome. Successful empty results stay empty through later failure. Account changes retire old learned rows. Public metadata neither rejects credentials nor claims profile attribution. Explicit models and request defaults remain unchanged.

Consumers: both registered catalog hooks and their metadata caches now distinguish failure, empty membership, and optional enrichment.

Evidence

Regressions reproduced hidden failures, restored starters, and featured-feed loss. Compiled checks covered retention, recovery, empty results, account changes, and helper compatibility. The final correction passed 52 checks. Public feeds returned inventory and pricing; request records confirmed anonymous discovery. Cache expiry used controlled clock changes. Picker appearance and real inference were not tested.

@obviyus obviyus self-assigned this Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 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: nvidia extensions: deepinfra size: XL maintainer Maintainer-authored PR labels Sep 6, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 1:23 AM ET / 05:23 UTC.

ClawSweeper review

What this changes

The PR routes DeepInfra and NVIDIA discovery failures through shared catalog retention, preserves successful empty results, and keeps DeepInfra’s public builder advisory.

Merge readiness

✅ Ready for maintainer review

This PR remains necessary: main has the shared retention infrastructure but still hides these providers’ discovery failures. The prior public-API blocker and both rank-up requests are addressed; no new blocking defect was found.

Priority: P2
Reviewed head: e36e4468b86b8cc41103e14aa930418f13146847

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with substantial production-boundary evidence and the prior compatibility blocker resolved.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Reported built-Gateway observations exercise the changed discovery owners through real HTTPS clients with controlled failures, showing retention, empty-result handling, recovery, and account isolation; exact-head API probes additionally verify the corrected advisory/strict behavior. Earlier NVIDIA evidence retains its original build identity.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): Reported built-Gateway observations exercise the changed discovery owners through real HTTPS clients with controlled failures, showing retention, empty-result handling, recovery, and account isolation; exact-head API probes additionally verify the corrected advisory/strict behavior. Earlier NVIDIA evidence retains its original build identity.
Evidence reviewed 9 items Public API blocker resolved: The public builder defaults to advisory discovery, while the registered catalog hook explicitly selects strict mode and wraps acquisition with the existing outcome owner. This addresses the previously retained P1 finding.
Failure and empty-result separation: DeepInfra caches validated public facts, propagates original failures for strict acquisition, returns authoritative empty chat membership before checking pricing failure, and appends bundled choices only for advisory callers.
NVIDIA acquisition boundary: Inventory failure and featured-feed failure propagate to the registered strict hook; successful empty inventory remains authoritative. Existing fixed HTTPS endpoints, guarded fetching, model filtering, and request defaults remain intact. NVIDIA’s public api.ts does not export the removed live builder.
Findings None None.
Security None None.

How this fits together

Provider plugins fetch model inventory and metadata, then supply acquisition results to OpenClaw’s shared catalog publisher. The publisher combines compatible retained inventory with current configured models for model-selection surfaces.

flowchart TD
  A[Provider credentials] --> B[Provider discovery hooks]
  C[Public model feeds] --> B
  B --> D{Acquisition result}
  D -->|Success including empty| E[Replace discovered inventory]
  D -->|Failure| F[Retain compatible inventory]
  E --> G[Published model choices]
  F --> G
  H[Configured models] --> G
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -96, Tests -236, Docs +7, Other 0. Total -325 across 16 files.

View PR surface stats
Area Files Added Removed Net
Source 5 213 309 -96
Tests 8 250 486 -236
Docs 2 20 13 +7
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 2 0
Total 16 485 810 -325

Review metrics

None.

Technical review

Best possible solution:

Keep one shared publication owner for failure retention and authoritative empty results while preserving the released advisory API and explicitly configured models.

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

Yes, source establishes the failure path: main converts failed discovery into fallback success, and NVIDIA can discard learned featured models. The supplied baseline observations corroborate it; this read-only review did not execute a reproduction.

Is this the best way to solve the issue?

Yes. The patch repairs the acquisition producers and reuses existing retention, with an advisory public adapter preserving the released DeepInfra contract.

AGENTS.md: found and applied where relevant.

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

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. Sufficient (live_output): Reported built-Gateway observations exercise the changed discovery owners through real HTTPS clients with controlled failures, showing retention, empty-result handling, recovery, and account isolation; exact-head API probes additionally verify the corrected advisory/strict behavior. Earlier NVIDIA evidence retains its original build identity.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This repairs bounded model-discovery failures for two providers without changing inference or operator configuration.
  • 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. Sufficient (live_output): Reported built-Gateway observations exercise the changed discovery owners through real HTTPS clients with controlled failures, showing retention, empty-result handling, recovery, and account isolation; exact-head API probes additionally verify the corrected advisory/strict behavior. Earlier NVIDIA evidence retains its original build identity.
  • proof: sufficient: Contributor real behavior proof is sufficient. Reported built-Gateway observations exercise the changed discovery owners through real HTTPS clients with controlled failures, showing retention, empty-result handling, recovery, and account isolation; exact-head API probes additionally verify the corrected advisory/strict behavior. Earlier NVIDIA evidence retains its original build identity.

Evidence

What I checked:

  • Public API blocker resolved: The public builder defaults to advisory discovery, while the registered catalog hook explicitly selects strict mode and wraps acquisition with the existing outcome owner. This addresses the previously retained P1 finding. (extensions/deepinfra/provider-catalog.ts:24, e36e4468b86b)
  • Failure and empty-result separation: DeepInfra caches validated public facts, propagates original failures for strict acquisition, returns authoritative empty chat membership before checking pricing failure, and appends bundled choices only for advisory callers. (extensions/deepinfra/provider-models.ts:419, e36e4468b86b)
  • NVIDIA acquisition boundary: Inventory failure and featured-feed failure propagate to the registered strict hook; successful empty inventory remains authoritative. Existing fixed HTTPS endpoints, guarded fetching, model filtering, and request defaults remain intact. NVIDIA’s public api.ts does not export the removed live builder. (extensions/nvidia/provider-catalog.ts:107, e36e4468b86b)
  • Shared publication owner: The existing publisher retains failed-provider inventory only with compatible credential facts, preserves successful empty membership, and supplies static starters for cold failures. The PR reuses this implementation without changing persistence or authorization. (src/agents/prepared-model-runtime.full-catalog.ts:96, e36e4468b86b)
  • Still needed on main: The checked provider owners are unchanged between the pinned merge base and fetched main. Main’s DeepInfra registered hook still invokes the advisory builder directly, and the provider implementations retain the failure-swallowing paths changed here. (extensions/deepinfra/provider-catalog.ts:36, bcef3b3526dd)
  • Released compatibility contract: The v2026.9.2 implementation returns fallback metadata or unknown-cost models after acquisition failures. The corrected public builder preserves that contract while the registered hook adopts explicit acquisition outcomes. (extensions/deepinfra/provider-models.ts, 3928bad9badf)

Likely related people:

  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Agustin Rivera: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-06T04:46:37.034Z sha be098d9 :: blocked before merge. :: [P1] [P1] Preserve advisory behavior for the public DeepInfra builder
  • reviewed 2026-09-06T04:54:24.266Z sha 15960c3 :: blocked before merge. :: [P1] [P1] Preserve advisory behavior for the public DeepInfra builder

@obviyus

obviyus commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the public builder finding and both rank-up moves in e36e4468b86.

  • Confirmed the regression using the actual published @openclaw/[email protected] API and the first compiled candidate: metadata/pricing outages resolved advisory data in the published package but rejected in the candidate.
  • The public builder now keeps its advisory default. The registered hook explicitly selects strict acquisition; there is still one acquisition/cache pipeline.
  • Four regression cases failed before repair. All 52 affected owner/registration cases and incremental independent review pass.
  • Exact-build independent acceptance passes all four changed API/Gateway clauses, including six same-process default/strict pairs, HTTP failure, healthy/failed-pricing empty results, native price fields, and Gateway retention/recovery. All 41 catalog requests were anonymous.
  • Removed the unused augmentation-only auth helper and corrected optional description typing. The change remains net-negative: 96 production and 325 total lines removed.

Earlier baseline and NVIDIA/composite evidence retain their original build identities. Final exact-head CI and the guarded landing gate remain required.

@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. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 6, 2026
@obviyus

obviyus commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator Author

landpr-approve-unrelated-red
pr: 139749
head: e36e446
run: 34013595927 attempt: 1
failed: check-test-types-core-2 job=101433551784 conclusion=failure
check: openclaw/ci-gate

@obviyus
obviyus merged commit e10a556 into main Sep 6, 2026
149 of 153 checks passed
@obviyus
obviyus deleted the codex/custom-catalog-acquisition branch September 6, 2026 05:46
@obviyus

obviyus commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator Author

Landed in e10a556a1fb0 from reviewed head e36e4468b86b. Landed provider, test and documentation bytes match the reviewed head; Ayaan attribution is verified.

Bug: DeepInfra and NVIDIA could hide acquisition failures, replace learned choices during an outage, or refill a successfully empty catalog.

Fix: One strict registered acquisition path reports truthful outcomes to the existing publication owner. It preserves compatible inventory and authoritative empty results. DeepInfra's shipped public builder remains advisory; duplicate augmentation and obsolete auth policy are removed.

Proof: 52 focused owner/registration cases, four exact-build public API/Gateway clauses, retained seven-clause composite acceptance, and clean exact-head review. Same-process public default/strict calls preserve cache separation. Real HTTPS fault responses exercise retention, empty and recovery; no inference or picker-appearance claim. Net −96 production / −236 test-support / +7 docs = −325 lines, with net-zero assertion metadata.

Approved unrelated CI exception: The only failed child was check-test-types-core-2, TS2353 at src/gateway/session-history-state.test.ts:398, on candidate run 34013595927 / job 101433551784. Main run 34013195358 / job 101432500182 fails with the identical diagnostic.

The frozen extraction source remains unchanged. All earlier failures and original build identities are retained.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
…ure (openclaw#139749)

Related: openclaw#136257, openclaw#139357, openclaw#139649.

## What Problem This Solves

Fixes an issue where operators refreshing DeepInfra or NVIDIA model choices could lose previously discovered models or see catalog failures reported as success. DeepInfra also restored bundled rows after a successful empty response. NVIDIA could drop a learned model when its featured metadata feed failed while its inference inventory still listed the model.

## Why This Change Was Made

Both plugins now publish through the existing shared acquisition outcome owner. This removes duplicate chat augmentation fetches and NVIDIA's duplicate live builder. DeepInfra caches validated surface metadata and preserves original HTTP failures for strict registered discovery. Its published builder keeps its advisory default; the registered hook explicitly selects strict acquisition. The existing media fallback remains separate.

## User Impact

- Failed refreshes retain compatible last-good inventory. On a cold outage, the existing publication owner exposes non-retired starters with an explicit failed acquisition outcome.
- Successful empty inventories in registered discovery remove discovered membership, even if pricing or featured metadata is unavailable. A later failure does not restore starters over that successful empty result.
- Existing public DeepInfra builder callers retain advisory choices during outages and unknown-cost live metadata when native pricing fails. This does not turn a failed registered acquisition into success.
- Public catalog failures do not reject inference credentials or attach credential-profile provenance. A changed account cannot inherit the previous account's learned inventory.
- Explicit configured models, static metadata, native pricing, and NVIDIA's request defaults keep their existing owners. No new configuration, schema, dependency, or static model dataset.

## Evidence

- Built baseline `4aa060878864581f072df427648af32c9d1495be`: actual HTTPS failures produced no provider failure outcomes; an empty DeepInfra response still exposed twelve rows; a featured-only NVIDIA failure lost a learned model while its sibling advanced.
- Reviewed producer build `b5caac408a761f302d9b1f0a25a0e384ceb18c08`: focused owner/registration checks and type-aware lint pass. Independent review is clean through P2 after reproducing and fixing HTTP-status erasure and malformed tag arrays. Source-blind acceptance covers malformed metadata, HTTP rejection, socket disconnects, empty with failed pricing, recovery, configured rows, supported logout, and NVIDIA retirement/republishing.
- Final composite build `296bfa19ec7663044ce50b8ebb3652555900d531`: all seven supplemental independent clauses pass, including cold starters, exact warm retention, successful empty through failure, and supported same-profile account credential replacement under failed feeds. All 36 catalog requests across nine model-list calls were anonymous; outcomes carried no profile provenance.
- NVIDIA and shared acquisition/preparation owners remain unchanged from the tested composite. The later DeepInfra correction preserves the shipped public builder contract, removes its now-unused augmentation-only auth helper, and narrows optional metadata descriptions. Original build identities and both earlier failed composite reports are retained.
- Published-package reproduction confirmed the DeepInfra API gap: the stable public builder resolved advisory data on metadata/pricing failures while the first candidate rejected. Four new regression cases failed before repair; all 52 affected owner/registration cases now pass and incremental independent review is clean through P2. Exact corrected build `e36e4468b86b8cc41103e14aa930418f13146847` passes all four independent public API/Gateway clauses. Same-process default/strict probes verify cache separation, native price fields, HTTP failures and authoritative empty; all 41 catalog requests were anonymous.
- Public-feed checks: built DeepInfra acquisition returned 104 chat models, including 97 with positive native prices and seven unknown/qualified estimates. NVIDIA's existing public inventory/featured live test passed. No real inference credentials or real-provider inference calls were used.
- Net change: **96 production lines removed, 236 test/support lines removed, seven documentation lines added; 325 lines removed overall.** Two assertion-baseline counts shrink with the deleted casts; this metadata change is net zero lines.

Proof uses an isolated built Gateway and controlled HTTPS responses. Cache expiry uses disclosed process-wall-clock advances, not real multi-day elapsed time. A separately configured DeepInfra default remains when discovered membership is empty. Numeric prices and private request defaults have owner coverage; picker appearance and real inference are outside the public API proof. Separate fixture-rejected background inference attempts and a timeout cooldown remain disclosed in the retained evidence.

AI-assisted.

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: deepinfra extensions: nvidia maintainer Maintainer-authored PR 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: XL 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