Skip to content

feat(models): use the v2 catalog and price each route by who bills it - #156535

Merged
obviyus merged 15 commits into
mainfrom
feat/catalog-v2-consumer-20260923
Sep 24, 2026
Merged

obviyus merged 15 commits into
mainfrom
feat/catalog-v2-consumer-20260923

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Related: #156507

What Problem This Solves

Fixes wrong cost estimates when OpenRouter runs a promotion: OpenRouter's price list was treated as every vendor's price list, so OpenAI direct and the Vercel, Kilo and Cloudflare gateways all showed OpenRouter's discounted rate. It also moves clients to the smaller v2 hosted catalog.

User Impact

Cost estimates now use the price of whoever bills the request. During OpenRouter's current 50% promotion on openai/gpt-5.6-sol, OpenAI direct, Vercel, Kilo and Cloudflare show $4/$20 per million tokens instead of $2/$10, while OpenRouter keeps $2/$10.

Clients download /models/v2/catalog.json by default: 1.6 MB instead of v1's 3.0 MB. Prices for models outside the catalog, such as gateway routes and older model IDs, still resolve. Released clients keep reading v1, which the same publisher run keeps in step.

Existing installs keep their downloaded catalog across the upgrade, including offline default installs whose stored catalog came from the v1 default URL. Subscription routes such as Kimi Code keep showing pay-as-you-go estimates.

After merge, the catalog repository's publish run regenerates both feeds from main, so released clients also receive the corrected prices through v1. 762 keys stop resolving; the route audit below shows none is a supported route with a vendor or gateway price.

Rollout (maintainer decision: land as one PR): the hosted v2 file gains upstreamPricing/providerPricing on the first publish after merge (every 4 hours). Released clients read v1 and are unaffected. Only main/nightly builds that download v2 before that publish briefly lack estimates for routes outside catalog rows; the next publish restores them.

Why This Change Was Made

  • v2 wire format: each model carries its price. Two optional sections cover models without a catalog row:
    • upstreamPricing holds each vendor's rate once, with its source, instead of v1's per-gateway copies.
    • providerPricing holds a provider's own rate.
  • Price sources follow who bills the request:
    • A new modelsDev source prices each provider from its own models.dev entry, reusing the models.dev download the publisher already makes. The entry is chosen by the plugin's existing modelCatalog.modelsDev mapping or its modelsDev.provider policy.
    • OpenRouter's feed prices only openrouter/* keys.
    • Gateways with their own list (Kilo, Vercel) use it first. Gateways that bill vendor rates (Cloudflare, per its Unified Billing docs) use the vendor's own catalog row.
    • Plugin manifest policies are updated to match.
  • Storage: v2 is stored in its own slot so older clients never read it. Until the new client writes that slot, it reads the older client's catalog. With the default config, a catalog downloaded from the retired v1 default URL stays active until the v2 download lands; configured mirrors must match exactly. A 304 adopts the older client's row only when that row, read inside the same write transaction, matches the revalidated one; otherwise the v2 slot stays empty. The older slot is never written.

Evidence

  • Pricing, through resolveModelCostConfig:

    • For openai/gpt-5.6-sol, OpenAI, Vercel, Kilo and Cloudflare now resolve $4/$20, and OpenRouter keeps $2/$10. The references are OpenRouter's endpoint list (discount: 0.5), models.dev, Vercel's and Kilo's live model lists, and Cloudflare's Unified Billing docs.
    • Across 13,198 keys, compared with the head before the billing change: 11,842 unchanged, 269 changed (for example Kilo google/gemini-3.5-flash now matches Kilo's live $0.75/$4.5, and Qwen routes use Alibaba's pay-as-you-go rate), 120 newly priced, 762 no longer priced.
    • Route audit of the 762 (maintainer decision: accepted):
      • 294 are OpenRouter batch-mode variants (:batch), which no OpenClaw route sends.
      • 423 are Cloudflare/Vercel keys under OpenRouter-only names: ~vendor/…-latest aliases, dotted Anthropic IDs (claude-opus-4.5; Anthropic's API uses dashes), and OpenRouter variants such as openai/gpt-5.6-sol-pro that neither the vendor's own list nor the catalog contains (OpenAI direct already had no price for them). None is a vendor catalog row. One (inclusionai/ling-3.0-flash-fin) is in Vercel's live model list and is priced by Vercel's runtime discovery.
      • 45 are direct-provider keys: retired models the vendor no longer lists (kimi-k2*, claude-opus-4-1, claude-sonnet-4, Gemma, image variants), OpenRouter-style IDs, zai/glm-4.7-flash (free on Z.ai; the old number was OpenRouter's), and qwen/qwen3-coder-next (only Coding Plan at $0 and resellers list it).
      • The audit found and fixed two real gaps: Qwen catalog rows (and gateways passing them through) now use Alibaba's pay-as-you-go list, like Kimi Code's subscription routes; vendors whose models.dev slug differs from their provider ID (moonshotai) are also keyed by that slug, so gateway pass-through finds them.
    • Before the billing change, v2 with the standalone sections matched v1 on all 13,198 keys, with no lost or changed prices.
  • Real clients against a local mirror of the new feeds:

    • This PR's CLI downloaded v1 and v2 (44 providers, 1,071 models) and revalidated with 304, and its built Gateway started with v2 stored.
    • Released 2026.9.4 and 2026.8.1 accepted the new v1 and rejected v2 cleanly (schemaVersion: expected 1, exit 1). A rejected v2 fetch left their stored v1 intact.
    • 2026.7.1 predates hosted catalog refresh.
  • Upgrade:

    • A real 2026.9.4 state directory (schema 17) upgraded by this PR's CLI revalidated its existing v1 mirror catalog with 304, with no full download, and copied it into the v2 slot. The older client's slot was unchanged.
    • Default install: 2026.9.4 downloaded the live catalog.openclaw.ai/models/v1 catalog into fresh state. This PR's code then served that row under the default config, refused it for a configured mirror, and on a mismatched check left the v2 slot empty and the v1 slot byte-identical.
    • Published driver × candidate: npm-global 2026.9.4 holding that default v1 catalog ran its own openclaw update --tag <candidate tarball> --yes --no-restart onto the package built from 2582b9dd; the final head adds only a price-projection fix in remote-bundle.ts and its test, with no update, Doctor or storage changes. All 11 steps exited 0: global update, candidate migration rehearsal, Doctor lint, config validation, plugin resolution, migration continuation, Gateway canary, install swap, openclaw doctor, service reconciliation, and post-plugin Doctor lint. The candidate Gateway then stored the live v2 feed (schema 2, same generation) in its own slot. The v1 slot's bytes were identical (same SHA3) before the update, after it, and after the Gateway ran.
  • Tests: regressions cover:

    • OpenRouter's promotion
    • gateway own-list and vendor-row precedence
    • pass-through source policy
    • standalone parity
    • a mirror's standalone price colliding with an unknown catalog row (the row wins)
    • the upgrade fallback, including offline default installs and a legacy row changed by an older client before a 304 (both fail on the previous head)

    Publisher, catalog, pricing, session-cost, usage-format, Gateway startup and state-database suites pass.

    Cost, pnpm test <file> --maxWorkers=1 (new or changed files; mostly transform time on a cold cache):

    File Tests Duration
    packages/model-catalog-core/src/remote-catalog-bundle.test.ts 16 0.6 s
    test/scripts/publish-model-catalog-v2.test.ts 4 1.0 s
    src/model-catalog/pricing.routing.test.ts 4 12.2 s
    src/model-catalog/pricing.v2.test.ts 9 13.1 s
    src/model-catalog/remote-overlay.test.ts 21 13.7 s
    src/model-catalog/pricing.v2-standalone.test.ts 12 13.5 s
    src/model-catalog/remote-store.test.ts 3 14.8 s
    src/model-catalog/remote-refresh.test.ts 10 17.6 s
    src/infra/session-cost-usage.test.ts 62 22.1 s
    test/scripts/publish-model-catalog.test.ts 73 23.3 s
    src/model-catalog/pricing.test.ts 59 28.4 s
    src/gateway/server.catalog-startup.test.ts 3 32.5 s

    server.catalog-startup.test.ts is over 30 s because it boots a real Gateway, which it already did before this PR; this PR only updates its fixture URL and expected prices.

  • Checks:

    • Hosted CI is running on this head.
    • Changed-file typecheck on every lane, core and scripts lint, and dead-code scans pass.
    • The extension lint lane runs in hosted CI, because the local worktree is nested inside another install. The extension changes are manifest JSON only.
  • Review: an independent pricing audit and code reviews. Their findings were fixed, except the follow-ups below.

Follow-ups, not in this PR:

  • LiteLLM long-prompt tiers (_above_Nk_tokens) are dropped.
  • A missing cache-read rate publishes as $0.
  • OpenAI and Copilot built-in seeds for gpt-5.6 are stale; the hosted catalog corrects them after the first refresh.

@vincentkoc vincentkoc self-assigned this Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 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 gateway Gateway runtime size: M labels Sep 23, 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. 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 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 11:44 AM ET / 15:44 UTC (Revision 14).

ClawSweeper review

What this changes

The branch makes the catalog publisher and client use a v2 feed, preserves older downloaded catalogs during upgrades, and estimates each route using the biller's price list.

Merge readiness

✅ Ready for maintainer review

Current main still lacks the client cutover. The pinned head has no remaining code finding from the prior review, and the catalog owner has now explicitly accepted the audited 762-key pricing-coverage change.

Priority: P2
Reviewed head: 0b5230aebdb448bd4a71ae066c8a848ad68f3b1a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The branch has substantial route and upgrade proof, focused regressions, and no remaining actionable finding; its broad compatibility surface keeps the patch rating at the normal good tier.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The PR body reports real CLI and Gateway use of the changed catalog path against v1/v2 feeds, including 304 revalidation and an update from released 2026.9.4 state; afterward v2 occupied its own slot and v1 bytes were unchanged. The focused tests cover price routing and legacy-row races. This read-only review did not replay the reported run, and the supplied existing-state observations support upgrade compatibility.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body reports real CLI and Gateway use of the changed catalog path against v1/v2 feeds, including 304 revalidation and an update from released 2026.9.4 state; afterward v2 occupied its own slot and v1 bytes were unchanged. The focused tests cover price routing and legacy-row races. This read-only review did not replay the reported run, and the supplied existing-state observations support upgrade compatibility.
Evidence reviewed 8 items Current main still defaults to v1: The fetched main revision retains the v1 catalog URL, so it has not adopted this PR's v2 client cutover.
Route-specific price selection: The introduced publisher code reads each provider's models.dev prices under its own namespace and confines OpenRouter prices to OpenRouter route keys.
Upgrade-state compatibility: The PR uses a separate v2 state key, reads the legacy key until v2 is stored, and leaves a mismatched legacy row unadopted. Focused tests cover later writes by an older client.
Findings None None.
Security None None.

How this fits together

The catalog publisher combines model data, price feeds, and plugin policies into hosted files. The Gateway downloads a file into local state, then model lookup and usage displays use it for metadata and cost estimates.

flowchart LR
  A[Vendor price feeds] --> B[Catalog publisher]
  C[Plugin pricing policies] --> B
  B --> D[Hosted v1 and v2 catalogs]
  D --> E[Gateway catalog store]
  E --> F[Model and route pricing]
  F --> G[Usage cost estimates]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +278, Tests +587, Docs +20, Other +167. Total +1052 across 34 files.

View PR surface stats
Area Files Added Removed Net
Source 18 359 81 +278
Tests 12 668 81 +587
Docs 2 29 9 +20
Config 0 0 0 0
Generated 0 0 0 0
Other 2 197 30 +167
Total 34 1253 201 +1052

Review metrics

Metric Value Why it matters
Production and test lines production +526/-102; tests +668/-81 The stated growth supports versioned ingestion and focused pricing and upgrade regressions.
Price-coverage audit 762 formerly estimated keys audited The catalog owner explicitly accepted this route-specific coverage change.

Stored data model

Persistent data-model change detected: database schema: src/model-catalog/remote-bundle.ts, database schema: src/model-catalog/remote-refresh.ts. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #156507
Summary: This PR is the client-ingestion and billing-policy candidate for the assigned v2 catalog program; the merged schema and publisher PRs are prerequisites.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Complete the coordinated catalog rollout through the existing merge gates, retaining v1 service for released clients and legacy-cache access during upgrades.

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

Yes, by comparing direct OpenAI and OpenRouter routes against a feed where OpenRouter discounts the same model: current-main publisher keying can apply the promotional rate to both. This read-only review did not execute the comparison.

Is this the best way to solve the issue?

Yes. The existing publisher owns price-source selection, plugin manifests describe route policy, and the client projects both wire versions through one ingestion boundary while preserving stored v1 state.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 0440fa7f72db.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a scoped catalog and cost-estimate improvement with substantial proof and no demonstrated urgent runtime outage.
  • merge-risk: 🚨 compatibility: The v2 default, separate stored slot, and accepted pricing-coverage change affect upgrades and existing cost estimates even though the supplied compatibility proof addresses the identified failures.
  • 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 (terminal): The PR body reports real CLI and Gateway use of the changed catalog path against v1/v2 feeds, including 304 revalidation and an update from released 2026.9.4 state; afterward v2 occupied its own slot and v1 bytes were unchanged. The focused tests cover price routing and legacy-row races. This read-only review did not replay the reported run, and the supplied existing-state observations support upgrade compatibility.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body reports real CLI and Gateway use of the changed catalog path against v1/v2 feeds, including 304 revalidation and an update from released 2026.9.4 state; afterward v2 occupied its own slot and v1 bytes were unchanged. The focused tests cover price routing and legacy-row races. This read-only review did not replay the reported run, and the supplied existing-state observations support upgrade compatibility.

Evidence

What I checked:

  • Current main still defaults to v1: The fetched main revision retains the v1 catalog URL, so it has not adopted this PR's v2 client cutover. (src/model-catalog/remote-config.ts:3, 0440fa7f72db)
  • Route-specific price selection: The introduced publisher code reads each provider's models.dev prices under its own namespace and confines OpenRouter prices to OpenRouter route keys. (scripts/publish-model-catalog.mts:690, 0b5230aebdb4)
  • Upgrade-state compatibility: The PR uses a separate v2 state key, reads the legacy key until v2 is stored, and leaves a mismatched legacy row unadopted. Focused tests cover later writes by an older client. (src/model-catalog/remote-store.ts:33, 0b5230aebdb4)
  • Previously raised row-collision finding: The projection excludes provider prices that collide with catalog rows and keeps upstream prices for such rows available only to passing gateways; the new pricing tests cover unknown rows and aliases. (src/model-catalog/remote-bundle.ts:49, 0b5230aebdb4)
  • Accepted coverage tradeoff: In the captured discussion, obviyus explicitly accepted the audited 762 keys in catalog-owner capacity: 294 batch variants, 423 OpenRouter-named gateway keys, and 45 retired or OpenRouter-named direct keys. This addresses the sole rank-up move in the previous completed review. feat(models): use the v2 catalog and price each route by who bills it #156535 (comment).
  • Real client and upgrade evidence: The captured PR body reports v1/v2 downloads and 304 revalidation, Gateway startup with v2, and an update driven by released 2026.9.4 over existing v1 state. It reports that the candidate stored v2 while the legacy slot remained byte-identical. The read-only review did not rerun that scenario. (0b5230aebdb4)

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • 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)
  • Ayaan Zaidi: 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 (13 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-24T08:59:49.655Z sha 8ce749f :: blocked before merge. :: [P1] Preserve the legacy default catalog until v2 is available | [P1] Adopt legacy cache data only after a transaction-current match
  • reviewed 2026-09-24T09:10:17.013Z sha 8ce749f :: blocked before merge. :: [P1] Keep the released default catalog active during offline upgrades | [P1] Adopt a legacy row only after its metadata still matches | [P2] Add the new runtime import to the PR wrapper inventory | [P2] Preserve the vendor slug for gateway fallback prices
  • reviewed 2026-09-24T09:29:46.366Z sha 1d18452 :: blocked before merge. :: [P2] Include the new parser in the PR wrapper inventory | [P2] Preserve the vendor slug in gateway fallback pricing
  • reviewed 2026-09-24T09:53:07.599Z sha b4746c2 :: blocked before merge. :: [P2] Reject standalone prices that collide with v2 model rows
  • reviewed 2026-09-24T10:06:38.971Z sha 2582b9d :: blocked before merge. :: [P2] Keep unflagged upstream rates from reviving v2 model rows
  • reviewed 2026-09-24T10:37:23.241Z sha a9bea8b :: blocked before merge. :: [P2] Prevent aliased upstream prices from reviving unpriced v2 rows
  • reviewed 2026-09-24T11:03:16.806Z sha f51d239 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-24T15:35:45.425Z sha 0b5230a :: blocked before merge. :: none

Base automatically changed from feat/catalog-v2-schema-20260923 to main September 23, 2026 14:19
@vincentkoc
vincentkoc force-pushed the feat/catalog-v2-consumer-20260923 branch from d3dac3c to 9360742 Compare September 23, 2026 14:22
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 23, 2026
@obviyus

obviyus commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

Pushed a follow-up to this branch: v2 keeps the price that sits on each model row, and gets back the prices for models outside the catalog, without copying them per gateway.

Why

v2 as landed dropped v1's standalone pricing map. That map also served models OpenClaw can use but doesn't ship as catalog rows:

  • Gateway routes. Cloudflare AI Gateway, Vercel AI Gateway, Kilocode and OpenRouter declare passthroughProviderModel: they charge the vendor's price.
  • Older IDs. Direct lookups such as openai/gpt-4-turbo-2024-04-09 or anthropic/claude-3-haiku.

Resolving the live v1 and v2 feeds through resolveModelCostConfig, 11,741 of those prices worked with v1 and returned nothing with v2. Cloudflare AI Gateway has no other price source, so its estimates went blank.

Most of v1's map was copies, though: 11,332 of its 14,990 entries repeat an upstream price under each gateway's prefix. In the live v1 feed, Cloudflare and Vercel carried the same 3,617 keys with identical values.

Before and after

One model, Claude Sonnet 4.5:

v1 repeats the price under every route:

"pricing": {
  "anthropic/claude-sonnet-4.5":                        { "input": 3, "output": 15, … },
  "openrouter/anthropic/claude-sonnet-4.5":             { "input": 3, "output": 15, … },
  "cloudflare-ai-gateway/anthropic/claude-sonnet-4.5":  { "input": 3, "output": 15, … },
  "vercel-ai-gateway/anthropic/claude-sonnet-4.5":      { "input": 3, "output": 15, … },
  "kilocode/openrouter/anthropic/claude-sonnet-4.5":    { "input": 3, "output": 15, … }
  // …14,990 entries
}

v2 as landed keeps the price on each catalog row and has no standalone prices:

"models": [
  { "id": "claude-sonnet-4-5", "provider": "anthropic",
    "pricing": { "status": "known", "currency": "USD", "unit": "million_tokens", "input": 3, "output": 15, … } }
]

v2 with this change keeps the model rows and adds two optional sections:

"models": [ …unchanged… ],
"upstreamPricing": {
  "anthropic/claude-sonnet-4.5": { "input": 3, "output": 15, …, "source": "openRouter", "passthroughOnly": true },
  "openai/gpt-4-turbo-2024-04-09": { "input": 10, "output": 30, "source": "liteLLM" }
},
"providerPricing": {
  "anthropic/claude-3-haiku": { "input": 0.25, "output": 1.25, …, "source": "openRouter" }
}
  • upstreamPricing holds one rate per upstream vendor/model key, with its source.
    • A gateway resolves cloudflare-ai-gateway/anthropic/claude-sonnet-4.5 by looking up anthropic/claude-sonnet-4.5. It does so only when the gateway's manifest policy lists that source as passthrough; OpenRouter has liteLLM: false, so it never reads LiteLLM rates.
    • When OpenRouter and LiteLLM both price a key (67 keys), the second rate is kept under alternatives, so a provider that allows only LiteLLM still gets LiteLLM's rate.
    • Entries marked passthroughOnly belong to a catalog row, so direct lookups skip them and an unknown row is never priced from them.
  • providerPricing holds a provider's own rate for a model that has no catalog row. It is the non-gateway part of v1's map, with v1's rules: a $0 rate counts only for an authoritative owner.

A provider's own price still wins, in this order: a configured or discovered model cost, then the provider's catalog row, then providerPricing, and last upstreamPricing, which a gateway only reads when it charges the vendor's rate.

Keys

Section v1 v2 as landed v2 with this change
Catalog models 1,071 rows 1,071 rows 1,071 rows
Per-gateway copies 11,332 0 0
Upstream vendor/model rates 3,270 0 3,733 (500 passthroughOnly, 67 with alternatives)
Provider-owned standalone rates 388 0 388
Total standalone price entries 14,990 0 4,121

upstreamPricing has more entries than v1's upstream section because v1 deleted catalog-covered keys and then recopied them under each gateway prefix. v2 keeps each of them once, flagged passthroughOnly.

Size

Both files come from the same publisher run, same source snapshot:

File Bytes gzip
v1 2,543,305 190,939
v2 as landed 569,622 32,245
v2 with this change 1,225,439 79,693

That's about half of v1's size; compressed, v1 is 2.4× larger. The client limit is 4 MiB.

Proof

  • Parity: I ran both files from that run through the real resolveModelCostConfig path for 13,198 keys: every catalog row plus every v1 standalone key for a real OpenClaw provider.
    • Catalog rows: 773 priced the same under both, 298 unpriced under both.
    • Standalone keys: 12,100 priced the same, 27 unpriced under both.
    • Lost, changed, or gained: 0.
  • Tests:
    • New cases cover gateway passthrough, sources a policy disables, the LiteLLM-only alternative, passthroughOnly rates not reviving an unknown row, provider-owned rates, and authoritative free rates.
    • Publisher tests check that the v2 standalone rates equal their v1 prices and that no gateway/… keys are emitted.
    • The existing publisher, schema, catalog, pricing, session-cost, usage-format and Gateway-startup suites pass.
  • Checks: changed-file typecheck, lint, and dead-code checks passed. The existing v1 publisher tests pass, and v1 serialization is untouched.
  • Review: an independent review found two issues, both fixed before pushing: the missing alternative-source rate, and a type error.

Notes

  • I also merged current main into the branch. It now includes feat(models): publish v2 catalog beside unchanged v1 #156530. test/scripts/publish-model-catalog.test.ts was failing on this branch because it stored v1 bundles under the v1 URL while the default is now v2; it now configures the v1 URL as a mirror.
  • The hosted v2 file only gains these sections after this merges, because the catalog repo's publish workflow runs the publisher from main.
  • Not included:
    • models.dev and LiteLLM ideas (batch and priority price modes, release and deprecation dates, source URLs): nothing reads them yet, so they'd be dead data today.
    • Pruning LiteLLM-prefixed keys like fireworks_ai/…: gateways could technically pass through to them, so removing them would change what gateways resolve.
  • Still open: the P1 ClawSweeper finding on the modelCatalog.remote.v2 storage key, which leaves upgraded installs without their stored catalog, is not addressed here.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: L and removed size: M labels Sep 24, 2026
@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 24, 2026
@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 status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 24, 2026
@obviyus

obviyus commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

Catalog owner decision (@obviyus; @vincentkoc handed catalog ownership over earlier in this PR): I accept the price-coverage change. The 762 keys that lose an estimate are the audited set in the PR body: 294 OpenRouter :batch variants, 423 Cloudflare/Vercel keys that exist only under OpenRouter's naming, and 45 retired or OpenRouter-named direct keys. They only had prices because OpenRouter's numbers were copied to every gateway. No supported route loses a real vendor or gateway price. My answer when asked: "accept, go for it".

@obviyus

obviyus commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

Head: 0b5230a (unchanged). The only remaining item was direct catalog-owner acceptance of the 762-key change, now posted above by the catalog owner. Review only; no repair or merge automation requested.

@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@obviyus
obviyus merged commit f1f18d7 into main Sep 24, 2026
206 checks passed
@obviyus
obviyus deleted the feat/catalog-v2-consumer-20260923 branch September 24, 2026 15:51
@obviyus

obviyus commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

Landed as f1f18d7.

Bug: OpenRouter's price feed was treated as every vendor's price, so a promotion like OpenRouter's 50% off openai/gpt-5.6-sol showed up on OpenAI direct, Vercel, Kilo and Cloudflare.
Fix: clients use the v2 catalog, and each route is priced from the list of whoever bills it. Vendors use their own models.dev entry, with LiteLLM as fallback. Gateways use their own list or pass through the vendor's rate. OpenRouter's feed prices only openrouter/*. Upgraded installs keep their downloaded catalog until v2 arrives, and the older client's slot is never written.
Proof: real-catalog price checks across 13,198 keys; released 2026.9.4 and 2026.8.1 clients against the new feeds; a published 2026.9.4 updater installing the candidate over a default install; hosted review ready and green CI on the exact head.

Thanks @vincentkoc for the v2 catalog this builds on, and for the source review that caught the legacy-adoption bug. The hosted catalog picks this up on its next publish from main.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
…openclaw#156535)

Related: openclaw#156507

## What Problem This Solves

Fixes wrong cost estimates when OpenRouter runs a promotion: OpenRouter's price list was treated as every vendor's price list, so OpenAI direct and the Vercel, Kilo and Cloudflare gateways all showed OpenRouter's discounted rate. It also moves clients to the smaller v2 hosted catalog.

## User Impact

Cost estimates now use the price of whoever bills the request. During OpenRouter's current 50% promotion on `openai/gpt-5.6-sol`, OpenAI direct, Vercel, Kilo and Cloudflare show $4/$20 per million tokens instead of $2/$10, while OpenRouter keeps $2/$10.

Clients download `/models/v2/catalog.json` by default: 1.6 MB instead of v1's 3.0 MB. Prices for models outside the catalog, such as gateway routes and older model IDs, still resolve. Released clients keep reading v1, which the same publisher run keeps in step.

Existing installs keep their downloaded catalog across the upgrade, including offline default installs whose stored catalog came from the v1 default URL. Subscription routes such as Kimi Code keep showing pay-as-you-go estimates.

After merge, the catalog repository's publish run regenerates both feeds from `main`, so released clients also receive the corrected prices through v1. 762 keys stop resolving; the route audit below shows none is a supported route with a vendor or gateway price.

Rollout (maintainer decision: land as one PR): the hosted v2 file gains `upstreamPricing`/`providerPricing` on the first publish after merge (every 4 hours). Released clients read v1 and are unaffected. Only `main`/nightly builds that download v2 before that publish briefly lack estimates for routes outside catalog rows; the next publish restores them.

## Why This Change Was Made

- **v2 wire format:** each model carries its price. Two optional sections cover models without a catalog row:
  - `upstreamPricing` holds each vendor's rate once, with its source, instead of v1's per-gateway copies.
  - `providerPricing` holds a provider's own rate.
- **Price sources follow who bills the request:**
  - A new `modelsDev` source prices each provider from its own models.dev entry, reusing the models.dev download the publisher already makes. The entry is chosen by the plugin's existing `modelCatalog.modelsDev` mapping or its `modelsDev.provider` policy.
  - OpenRouter's feed prices only `openrouter/*` keys.
  - Gateways with their own list (Kilo, Vercel) use it first. Gateways that bill vendor rates (Cloudflare, per its Unified Billing docs) use the vendor's own catalog row.
  - Plugin manifest policies are updated to match.
- **Storage:** v2 is stored in its own slot so older clients never read it. Until the new client writes that slot, it reads the older client's catalog. With the default config, a catalog downloaded from the retired v1 default URL stays active until the v2 download lands; configured mirrors must match exactly. A `304` adopts the older client's row only when that row, read inside the same write transaction, matches the revalidated one; otherwise the v2 slot stays empty. The older slot is never written.

## Evidence

- **Pricing, through `resolveModelCostConfig`:**
  - For `openai/gpt-5.6-sol`, OpenAI, Vercel, Kilo and Cloudflare now resolve $4/$20, and OpenRouter keeps $2/$10. The references are OpenRouter's endpoint list (`discount: 0.5`), models.dev, Vercel's and Kilo's live model lists, and Cloudflare's Unified Billing docs.
  - Across 13,198 keys, compared with the head before the billing change: 11,842 unchanged, 269 changed (for example Kilo `google/gemini-3.5-flash` now matches Kilo's live $0.75/$4.5, and Qwen routes use Alibaba's pay-as-you-go rate), 120 newly priced, 762 no longer priced.
  - **Route audit of the 762 (maintainer decision: accepted):**
    - 294 are OpenRouter batch-mode variants (`:batch`), which no OpenClaw route sends.
    - 423 are Cloudflare/Vercel keys under OpenRouter-only names: `~vendor/…-latest` aliases, dotted Anthropic IDs (`claude-opus-4.5`; Anthropic's API uses dashes), and OpenRouter variants such as `openai/gpt-5.6-sol-pro` that neither the vendor's own list nor the catalog contains (OpenAI direct already had no price for them). None is a vendor catalog row. One (`inclusionai/ling-3.0-flash-fin`) is in Vercel's live model list and is priced by Vercel's runtime discovery.
    - 45 are direct-provider keys: retired models the vendor no longer lists (`kimi-k2*`, `claude-opus-4-1`, `claude-sonnet-4`, Gemma, image variants), OpenRouter-style IDs, `zai/glm-4.7-flash` (free on Z.ai; the old number was OpenRouter's), and `qwen/qwen3-coder-next` (only Coding Plan at $0 and resellers list it).
    - The audit found and fixed two real gaps: Qwen catalog rows (and gateways passing them through) now use Alibaba's pay-as-you-go list, like Kimi Code's subscription routes; vendors whose models.dev slug differs from their provider ID (`moonshotai`) are also keyed by that slug, so gateway pass-through finds them.
  - Before the billing change, v2 with the standalone sections matched v1 on all 13,198 keys, with no lost or changed prices.
- **Real clients against a local mirror of the new feeds:**
  - This PR's CLI downloaded v1 and v2 (44 providers, 1,071 models) and revalidated with `304`, and its built Gateway started with v2 stored.
  - Released 2026.9.4 and 2026.8.1 accepted the new v1 and rejected v2 cleanly (`schemaVersion: expected 1`, exit 1). A rejected v2 fetch left their stored v1 intact.
  - 2026.7.1 predates hosted catalog refresh.
- **Upgrade:**
  - A real 2026.9.4 state directory (schema 17) upgraded by this PR's CLI revalidated its existing v1 mirror catalog with `304`, with no full download, and copied it into the v2 slot. The older client's slot was unchanged.
  - Default install: 2026.9.4 downloaded the live `catalog.openclaw.ai/models/v1` catalog into fresh state. This PR's code then served that row under the default config, refused it for a configured mirror, and on a mismatched check left the v2 slot empty and the v1 slot byte-identical.
  - Published driver × candidate: npm-global 2026.9.4 holding that default v1 catalog ran its own `openclaw update --tag <candidate tarball> --yes --no-restart` onto the package built from `2582b9dd`; the final head adds only a price-projection fix in `remote-bundle.ts` and its test, with no update, Doctor or storage changes. All 11 steps exited 0: global update, candidate migration rehearsal, Doctor lint, config validation, plugin resolution, migration continuation, Gateway canary, install swap, `openclaw doctor`, service reconciliation, and post-plugin Doctor lint. The candidate Gateway then stored the live v2 feed (schema 2, same generation) in its own slot. The v1 slot's bytes were identical (same SHA3) before the update, after it, and after the Gateway ran.
- **Tests:** regressions cover:
  - OpenRouter's promotion
  - gateway own-list and vendor-row precedence
  - pass-through source policy
  - standalone parity
  - a mirror's standalone price colliding with an unknown catalog row (the row wins)
  - the upgrade fallback, including offline default installs and a legacy row changed by an older client before a `304` (both fail on the previous head)

  Publisher, catalog, pricing, session-cost, usage-format, Gateway startup and state-database suites pass.

  Cost, `pnpm test <file> --maxWorkers=1` (new or changed files; mostly transform time on a cold cache):

  | File | Tests | Duration |
  |---|---|---|
  | `packages/model-catalog-core/src/remote-catalog-bundle.test.ts` | 16 | 0.6 s |
  | `test/scripts/publish-model-catalog-v2.test.ts` | 4 | 1.0 s |
  | `src/model-catalog/pricing.routing.test.ts` | 4 | 12.2 s |
  | `src/model-catalog/pricing.v2.test.ts` | 9 | 13.1 s |
  | `src/model-catalog/remote-overlay.test.ts` | 21 | 13.7 s |
  | `src/model-catalog/pricing.v2-standalone.test.ts` | 12 | 13.5 s |
  | `src/model-catalog/remote-store.test.ts` | 3 | 14.8 s |
  | `src/model-catalog/remote-refresh.test.ts` | 10 | 17.6 s |
  | `src/infra/session-cost-usage.test.ts` | 62 | 22.1 s |
  | `test/scripts/publish-model-catalog.test.ts` | 73 | 23.3 s |
  | `src/model-catalog/pricing.test.ts` | 59 | 28.4 s |
  | `src/gateway/server.catalog-startup.test.ts` | 3 | 32.5 s |

  `server.catalog-startup.test.ts` is over 30 s because it boots a real Gateway, which it already did before this PR; this PR only updates its fixture URL and expected prices.
- **Checks:**
  - Hosted CI is running on this head.
  - Changed-file typecheck on every lane, core and scripts lint, and dead-code scans pass.
  - The extension lint lane runs in hosted CI, because the local worktree is nested inside another install. The extension changes are manifest JSON only.
- **Review:** an independent pricing audit and code reviews. Their findings were fixed, except the follow-ups below.

Follow-ups, not in this PR:
- LiteLLM long-prompt tiers (`_above_Nk_tokens`) are dropped.
- A missing cache-read rate publishes as $0.
- OpenAI and Copilot built-in seeds for gpt-5.6 are stale; the hosted catalog corrects them after the first refresh.

Co-authored-by: Ayaan Zaidi <[email protected]>
roboclaw-bot added a commit that referenced this pull request Sep 27, 2026
Apply explicitly requested #158863 / 09a6051,
crediting Ayaan Zaidi (obviyus). Reuse Vincent Koc's dormant parser (#156518)
and opt-in paired generator (#156530). Retain only the optional wire-schema
and negative-test compatibility from #156535, not runtime/client/store
activation, StandalonePricing infrastructure or billing policy.

Provider recommendations preserve order and trim/validate IDs against the
same provider. Invalid optional manifest lists are omitted; strict v2 rejects
invalid remote lists. V1 output excludes the field and keeps its released
contract. No bundled manifest or runtime/picker activates recommendations.

Fix the review-exposed paired-output failure: prepare both candidate/previous
sets before replacing final paths and retain cross-referenced recovery after
interruption or uncertain publication. Do not automatically roll back over
foreign replacements. Cleanup after success warns without claiming failure.
This is recoverability, not multi-file atomicity or power-loss durability.

Fixed-input actual default/priced v1 output remains byte-identical; v2 output
remains identical across the settlement repair, and the parser matches the
requested upstream source. 59 focused and165 caller cases pass; settlement
adds real boundary/interruption proof,13 paired tests and73 publisher tests.
Affected types, lint, format, MDX/docs links and frozen eb377ac ratchets pass.
Final independent P0-P2 review is scoped-clean on exact tree
2e67a78.

No SQLite schema, package version, dependency, runtime activation or public
publication change. Version remains2026.9.6 and fs-safe0.20.0. Requested npm
preflight/stable FRV still require their separate source/version/admission
gates; no CI run or platform clearance is claimed by this commit.

## Work sessions

- Original discussion, review and integration:
  https://team.openclaw.ai/chat/roboclaw/dashboard/db4d78ac-b19b-4f64-adfb-0ca7973a62e4
- Dormant catalog implementation and verification:
  https://team.openclaw.ai/chat/roboclaw/subagent/5bc0e124-d2e6-4193-9f9b-d2767d326b30
- Paired-output correction and verification:
  https://team.openclaw.ai/chat/roboclaw/subagent/90593a20-97bf-4134-9221-ff30d55a618a

Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: jalehman <[email protected]>
obviyus added a commit that referenced this pull request Oct 1, 2026
…8000)

Related: #140086, #141885, #156535, #157838

## What Problem This Solves

A running Gateway doesn't see a newly downloaded hosted model catalog until it restarts. This PR publishes each accepted catalog through the existing prepared-runtime owner, without a restart. Model rows and their prices switch together as one generation, which keeps the invariant from #140086.

## User Impact

- Compatible downloads are adopted at the Gateway's background catalog check, or after an explicit `models.list` refresh. That refresh returns the currently accepted rows right away and runs adoption afterward.
- A turn admitted on catalog N keeps N's rows and prices until it finishes. New turns use N+1. Rows and prices are never mixed.
- A concurrent auth or config publication no longer postpones adoption to the next scheduled check (up to 6 h). Adoption waits for that publication to settle, then retries, up to 3 attempts.
- An owner whose build failed or timed out ends the adoption instead of waiting on unbounded work. Gateway shutdown cancels an adoption that is still preparing.
- Malformed, schema-invalid, too-new (`minVersion`) and older catalogs are rejected, and the previously accepted catalog stays in use.
- Changing `models.catalogRefresh.url` no longer needs a restart: the previous source's catalog stops applying, and the mirror's catalog is adopted at the next catalog check.

**Bad-catalog exposure:** with live apply, a *valid but wrong* published catalog reaches running Gateways at their next catalog check (at most every 6 h) or on the next explicit `models.list` refresh. It no longer waits for a restart. Recovery uses existing mechanisms only:
- Republish a corrected catalog with a newer `generatedAt`; Gateways adopt it the same way.
- Operators can set `models.catalogRefresh.enabled: false`, which withdraws remote rows and prices without a restart (covered by the Gateway integration test).

This PR adds no new kill switch, config option or env knob.

### Compatibility

No config keys, defaults, types, validation, stored rows, protocol or SDK contracts change. The only config-surface change is the `models.catalogRefresh.url` help text, which drops the stale "Changes apply after a Gateway restart" sentence, and its regenerated config-doc baseline hash. Existing configs validate unchanged and need no Doctor migration (maintainer confirmation: #158000 (comment)). Startup behavior is unchanged. Upgrade impact for existing installs: an accepted download activates at the next catalog check instead of the next restart.

## Why This Change Was Made

- `prepared-model-runtime.configured-refresh.ts` builds a complete candidate generation of the configured owners under the new catalog. One serialized commit then publishes rows, the accepted bundle, the pricing context and the reply-dispatch projection together.
- Adoption re-reads the stored catalog until the config it read under is still current, so a stale caller can't cancel a current adoption.
- Each preparation attempt has its own abort signal. A config advance restarts only the attempt; a newer catalog or shutdown ends the whole adoption, including pricing preparation.
- Between attempts, adoption waits only on publication gates: a pending replacement or an owner's pending publication.
- Adopted owners install the same plugin-retirement recovery as configured publication (#161267). After commit, a lost Gateway plugin loan republishes them through the normal recovery. Before commit, it restarts the adoption attempt, and the commit refuses any candidate whose plugin generation retired.

### Why downloads were restart-only, and what this keeps

Restart-only activation was a mechanism, not the goal. #140086 chose it to stop rows and prices from different catalog versions mixing, and #157838 was merged as "the prerequisite for applying new remote catalogs without a Gateway restart (rows and prices must switch together)". This PR is that follow-up. Every requirement those PRs set still holds:

| Original requirement | Source | How it holds here |
|---|---|---|
| Rows and prices from one catalog version; never mixed across reloads or new requests | #140086 | One serialized commit publishes owners, bundle, pricing context and dispatch; pricing contexts are keyed by the exact accepted catalog. Integration test: new rows appear only with new prices |
| Admitted work keeps its pair | #140086, #157838 | Runs carry their plugin generation's catalog; usage operations capture one pricing context. Integration test and live proof: the in-flight turn keeps the old price |
| Startup absence is a real state (no downloaded rows without prices) | #140086 | Absence → catalog goes through the same atomic commit; overlay absence tests unchanged |
| Worker replacement inherits the host's accepted pair, not a later download | #140086 | The commit updates the inherited pair; later workers and a worker-exit recovery keep it (overlay and integration tests) |
| Current enablement and source URL still gate eligibility | #140086, #156535 | Checked on every read and before adoption, including the default-install v1 fallback; disablement withdraws rows and prices together (integration test) |
| Bad or superseded downloads never replace the active pair | #140086, #141885 | Compatibility, `minVersion`, revision and `generatedAt` checks; stale reads can't cancel a current adoption (regression test) |
| Failed catalog checks retry at the remaining fresh interval, not a full TTL | #141885 | Unchanged scheduler behavior; the deleted notice test's retry case is restored for failed adoption (fails if the retry falls back to the full TTL) |
| Operators learn when a downloaded catalog is not yet active | #141885 | No longer needed: downloads activate at the next check. The restart notice and its tests are removed; `models refresh` says when a running Gateway applies the update |
| Billing-route prices switch with their rows | #156535 | `upstreamPricing` and `providerPricing` are part of the accepted catalog pair |

## Evidence

**Regressions.** Each fails with its fix reverted and passes with it:
- *Retries a scheduled adoption when its pending auth owner settles.* Runs through the real Gateway update scheduler. Reverted, it logs `remote model catalog check superseded; deferred to the next check`.
- *Does not let a read under a superseded config cancel the current adoption.* Reverted, both calls end `superseded`.
- *Ends adoption instead of joining a timed-out owner build.* Reverted, adoption never settles.
- *Does not hold Gateway shutdown on an adoption's pricing preparation.* Reverted, shutdown waits on the held preparation until the test times out.
- *Recovers adopted owners when their borrowed Gateway plugin retires after commit / before commit.* Without the recovery, both fail: `Prepared model runtime plugin generation retired` and `prepared reply dispatch runtime owner was not published`.
- *Uses the remaining stored TTL after a fresh startup check when adoption fails.* With the retry reverted to the full TTL, the second check doesn't run.

**Suites:**

| Suite | Result |
|---|---|
| `prepared-model-runtime.remote-publication.test.ts` | 10/10 |
| Gateway integration (`models-list.remote-catalog`) | v1 and v2 pass. Config and auth churn during preparation end `published` on the settled owners. Also covers retained admitted runs, rejected and stale bundles, worker replacement and disablement |
| `prepared-model-runtime*`, `server-plugin-reload*`, `update-startup`, and all PR-touched test files | pass |
| `tsgo:core`, all `tsgo:test:src` shards | pass |
| oxlint and oxfmt on changed files; `config:docs:check`, `config:schema:check`; max-lines, assertion-safety and test-timeout-race ratchets | pass |

Tests wait on owned completion signals (`withinTest`), not wall-clock deadlines.

**Live proof** on an isolated Gateway built from `cb8c9197fdc` (no provider mocks). Later commits add plugin-retirement recovery for adopted owners, covered by the regression tests above, and rebases onto `main`. It used a real OpenAI key through `openai/gpt-4.1-mini`, and the build stamp was set before the real catalog's publication date. A client polled `models.list` back to back over one WebSocket for the whole run (1023 polls, no errors). One Gateway process (PID unchanged) and no restart:
1. The stored catalog was seeded with an older revision of the real `catalog.openclaw.ai` v2 catalog: generated 2 days earlier, `gpt-4.1-mini` priced ×10, plus one extra kimi row. `models.list` listed the extra row, and a turn priced **$4.00 / $16.00 per M** input/output.
2. `openclaw models refresh` downloaded the real catalog (`updated`, 1039 models). The listed rows didn't change for the next 7.1 s, and a turn in that window still priced **$4.00 / $16.00 per M**: a download stays inactive until the Gateway adopts it.
3. A long turn was admitted on the older catalog, then `models.list {refresh:true}` returned the older rows (extra kimi row still listed) and started adoption. The new catalog was visible 0.9 s later, while the long turn was still running: the extra kimi row was gone.
4. The in-flight turn finished at **$4.00 / $16.00 per M** (older rows and prices). The next turn priced **$0.40 / $1.60 per M** (real catalog).
5. `models.catalogRefresh.url` was moved to a local mirror of the real catalog through `config.patch`, and the mirror's catalog was adopted without a restart. The mirror then served malformed JSON: `models refresh` failed with `SyntaxError`, the model list was unchanged, and the next turn still priced $0.40 / $1.60 per M.

**Model picker during republication (also on `main`).** Right after the new generation commits, `models.list` shows the new generation's configured and static rows until its full catalog loads, then the full list. In the live run this lasted 109 ms. The same poller against a `main` build shows the same window after a `models.*` config reload (20 → 6 → 16 rows for about 350 ms), so this PR adds a new trigger for an existing behavior. It doesn't change it. The short list comes from the new generation, so rows and prices stay paired.

**Published-driver upgrade cells.** Candidate tarball built from a fresh clone at `6f682c7944e` with the canonical Docker packaging script and no build-time overrides. sha256 `46d881a0…ef0ad`; embedded commit `6f682c7944e2`, version 2026.9.7. `6f682c7944e` already includes the shutdown-cancellation and pricing-deadline commits. The current head the current head differs from it only by rebases onto `main`: `main` had moved the scheduled catalog check into `update-startup-catalog.ts`, and this PR's adoption call moved there unchanged (`git range-diff` shows no other production change; a `remoteCatalog: null` test-fixture field moved to main's relocated `cli-compaction.test-support.ts`).

| Driver → candidate | Scenario | Result |
|---|---|---|
| `[email protected]` | base | passed (930 s); updater outcome success, no recovery |
| `[email protected]` | plugin-deps-cleanup | passed (923 s); updater outcome success, no recovery |
| `[email protected]` (latest) | base | passed (813 s); updater outcome success, no recovery |

In every cell:
- Migration, post-Doctor config validation, survival, plugin-dependency cleanup and runtime-deps repair checks passed.
- The candidate Gateway logged ready, then its catalog check fetched and saved the hosted catalog about 0.2 s after starting. The hosted catalog is older than the candidate's build stamp, so adoption ends `unchanged`, which isn't logged. After a 300 s settlement window, `/readyz` (`ready:true`, nothing failing) and a Gateway `status` RPC passed, and the Gateway shut down cleanly.
- To show a logged terminal outcome, each cell was repeated with a loopback mirror serving a newer copy of the same catalog. Each check logged `remote model catalog applied` about 0.26 s after it started, followed by `/readyz` and `status` passing.

Not run: `[email protected]` plugin-deps-cleanup. At the previous head it failed inside the 2026.9.7 driver's retained-runtime verification (`Retained runtime entry does not reference its inventoried file: dist/a2ui-…mjs`), identically for a merge-base control package with none of this PR's commits.

Harness note for the 2026.9.7 cell: unchanged, the upgrade harness can't run against 2026.9.7. It seeds the retired `tools.toolSearch {mode:"code"}` setting, which 2026.9.7 rejects. The 2026.9.7 cell used the harness's existing Tool Search "absent" mode, a one-line local change that skips only that seed and its check. The 2026.9.6 cells used the unchanged harness.

**CI:** fully green on the final head ([run 36818367970](https://github.com/openclaw/openclaw/actions/runs/36818367970)). Earlier heads hit failures that reproduce on `main` in code this PR doesn't touch: `update-cli.target-schema` (main reproduction: #158000 (comment)), the type-suppression inventory, the Windows partition owner test and the Windows backup-rename test. Main has since fixed the last three. Config compatibility confirmation: #158000 (comment).

No overlap with Pash/Sarah changes.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 2, 2026
…nclaw#158000)

Related: openclaw#140086, openclaw#141885, openclaw#156535, openclaw#157838

## What Problem This Solves

A running Gateway doesn't see a newly downloaded hosted model catalog until it restarts. This PR publishes each accepted catalog through the existing prepared-runtime owner, without a restart. Model rows and their prices switch together as one generation, which keeps the invariant from openclaw#140086.

## User Impact

- Compatible downloads are adopted at the Gateway's background catalog check, or after an explicit `models.list` refresh. That refresh returns the currently accepted rows right away and runs adoption afterward.
- A turn admitted on catalog N keeps N's rows and prices until it finishes. New turns use N+1. Rows and prices are never mixed.
- A concurrent auth or config publication no longer postpones adoption to the next scheduled check (up to 6 h). Adoption waits for that publication to settle, then retries, up to 3 attempts.
- An owner whose build failed or timed out ends the adoption instead of waiting on unbounded work. Gateway shutdown cancels an adoption that is still preparing.
- Malformed, schema-invalid, too-new (`minVersion`) and older catalogs are rejected, and the previously accepted catalog stays in use.
- Changing `models.catalogRefresh.url` no longer needs a restart: the previous source's catalog stops applying, and the mirror's catalog is adopted at the next catalog check.

**Bad-catalog exposure:** with live apply, a *valid but wrong* published catalog reaches running Gateways at their next catalog check (at most every 6 h) or on the next explicit `models.list` refresh. It no longer waits for a restart. Recovery uses existing mechanisms only:
- Republish a corrected catalog with a newer `generatedAt`; Gateways adopt it the same way.
- Operators can set `models.catalogRefresh.enabled: false`, which withdraws remote rows and prices without a restart (covered by the Gateway integration test).

This PR adds no new kill switch, config option or env knob.

### Compatibility

No config keys, defaults, types, validation, stored rows, protocol or SDK contracts change. The only config-surface change is the `models.catalogRefresh.url` help text, which drops the stale "Changes apply after a Gateway restart" sentence, and its regenerated config-doc baseline hash. Existing configs validate unchanged and need no Doctor migration (maintainer confirmation: openclaw#158000 (comment)). Startup behavior is unchanged. Upgrade impact for existing installs: an accepted download activates at the next catalog check instead of the next restart.

## Why This Change Was Made

- `prepared-model-runtime.configured-refresh.ts` builds a complete candidate generation of the configured owners under the new catalog. One serialized commit then publishes rows, the accepted bundle, the pricing context and the reply-dispatch projection together.
- Adoption re-reads the stored catalog until the config it read under is still current, so a stale caller can't cancel a current adoption.
- Each preparation attempt has its own abort signal. A config advance restarts only the attempt; a newer catalog or shutdown ends the whole adoption, including pricing preparation.
- Between attempts, adoption waits only on publication gates: a pending replacement or an owner's pending publication.
- Adopted owners install the same plugin-retirement recovery as configured publication (openclaw#161267). After commit, a lost Gateway plugin loan republishes them through the normal recovery. Before commit, it restarts the adoption attempt, and the commit refuses any candidate whose plugin generation retired.

### Why downloads were restart-only, and what this keeps

Restart-only activation was a mechanism, not the goal. openclaw#140086 chose it to stop rows and prices from different catalog versions mixing, and openclaw#157838 was merged as "the prerequisite for applying new remote catalogs without a Gateway restart (rows and prices must switch together)". This PR is that follow-up. Every requirement those PRs set still holds:

| Original requirement | Source | How it holds here |
|---|---|---|
| Rows and prices from one catalog version; never mixed across reloads or new requests | openclaw#140086 | One serialized commit publishes owners, bundle, pricing context and dispatch; pricing contexts are keyed by the exact accepted catalog. Integration test: new rows appear only with new prices |
| Admitted work keeps its pair | openclaw#140086, openclaw#157838 | Runs carry their plugin generation's catalog; usage operations capture one pricing context. Integration test and live proof: the in-flight turn keeps the old price |
| Startup absence is a real state (no downloaded rows without prices) | openclaw#140086 | Absence → catalog goes through the same atomic commit; overlay absence tests unchanged |
| Worker replacement inherits the host's accepted pair, not a later download | openclaw#140086 | The commit updates the inherited pair; later workers and a worker-exit recovery keep it (overlay and integration tests) |
| Current enablement and source URL still gate eligibility | openclaw#140086, openclaw#156535 | Checked on every read and before adoption, including the default-install v1 fallback; disablement withdraws rows and prices together (integration test) |
| Bad or superseded downloads never replace the active pair | openclaw#140086, openclaw#141885 | Compatibility, `minVersion`, revision and `generatedAt` checks; stale reads can't cancel a current adoption (regression test) |
| Failed catalog checks retry at the remaining fresh interval, not a full TTL | openclaw#141885 | Unchanged scheduler behavior; the deleted notice test's retry case is restored for failed adoption (fails if the retry falls back to the full TTL) |
| Operators learn when a downloaded catalog is not yet active | openclaw#141885 | No longer needed: downloads activate at the next check. The restart notice and its tests are removed; `models refresh` says when a running Gateway applies the update |
| Billing-route prices switch with their rows | openclaw#156535 | `upstreamPricing` and `providerPricing` are part of the accepted catalog pair |

## Evidence

**Regressions.** Each fails with its fix reverted and passes with it:
- *Retries a scheduled adoption when its pending auth owner settles.* Runs through the real Gateway update scheduler. Reverted, it logs `remote model catalog check superseded; deferred to the next check`.
- *Does not let a read under a superseded config cancel the current adoption.* Reverted, both calls end `superseded`.
- *Ends adoption instead of joining a timed-out owner build.* Reverted, adoption never settles.
- *Does not hold Gateway shutdown on an adoption's pricing preparation.* Reverted, shutdown waits on the held preparation until the test times out.
- *Recovers adopted owners when their borrowed Gateway plugin retires after commit / before commit.* Without the recovery, both fail: `Prepared model runtime plugin generation retired` and `prepared reply dispatch runtime owner was not published`.
- *Uses the remaining stored TTL after a fresh startup check when adoption fails.* With the retry reverted to the full TTL, the second check doesn't run.

**Suites:**

| Suite | Result |
|---|---|
| `prepared-model-runtime.remote-publication.test.ts` | 10/10 |
| Gateway integration (`models-list.remote-catalog`) | v1 and v2 pass. Config and auth churn during preparation end `published` on the settled owners. Also covers retained admitted runs, rejected and stale bundles, worker replacement and disablement |
| `prepared-model-runtime*`, `server-plugin-reload*`, `update-startup`, and all PR-touched test files | pass |
| `tsgo:core`, all `tsgo:test:src` shards | pass |
| oxlint and oxfmt on changed files; `config:docs:check`, `config:schema:check`; max-lines, assertion-safety and test-timeout-race ratchets | pass |

Tests wait on owned completion signals (`withinTest`), not wall-clock deadlines.

**Live proof** on an isolated Gateway built from `cb8c9197fdc` (no provider mocks). Later commits add plugin-retirement recovery for adopted owners, covered by the regression tests above, and rebases onto `main`. It used a real OpenAI key through `openai/gpt-4.1-mini`, and the build stamp was set before the real catalog's publication date. A client polled `models.list` back to back over one WebSocket for the whole run (1023 polls, no errors). One Gateway process (PID unchanged) and no restart:
1. The stored catalog was seeded with an older revision of the real `catalog.openclaw.ai` v2 catalog: generated 2 days earlier, `gpt-4.1-mini` priced ×10, plus one extra kimi row. `models.list` listed the extra row, and a turn priced **$4.00 / $16.00 per M** input/output.
2. `openclaw models refresh` downloaded the real catalog (`updated`, 1039 models). The listed rows didn't change for the next 7.1 s, and a turn in that window still priced **$4.00 / $16.00 per M**: a download stays inactive until the Gateway adopts it.
3. A long turn was admitted on the older catalog, then `models.list {refresh:true}` returned the older rows (extra kimi row still listed) and started adoption. The new catalog was visible 0.9 s later, while the long turn was still running: the extra kimi row was gone.
4. The in-flight turn finished at **$4.00 / $16.00 per M** (older rows and prices). The next turn priced **$0.40 / $1.60 per M** (real catalog).
5. `models.catalogRefresh.url` was moved to a local mirror of the real catalog through `config.patch`, and the mirror's catalog was adopted without a restart. The mirror then served malformed JSON: `models refresh` failed with `SyntaxError`, the model list was unchanged, and the next turn still priced $0.40 / $1.60 per M.

**Model picker during republication (also on `main`).** Right after the new generation commits, `models.list` shows the new generation's configured and static rows until its full catalog loads, then the full list. In the live run this lasted 109 ms. The same poller against a `main` build shows the same window after a `models.*` config reload (20 → 6 → 16 rows for about 350 ms), so this PR adds a new trigger for an existing behavior. It doesn't change it. The short list comes from the new generation, so rows and prices stay paired.

**Published-driver upgrade cells.** Candidate tarball built from a fresh clone at `6f682c7944e` with the canonical Docker packaging script and no build-time overrides. sha256 `46d881a0…ef0ad`; embedded commit `6f682c7944e2`, version 2026.9.7. `6f682c7944e` already includes the shutdown-cancellation and pricing-deadline commits. The current head the current head differs from it only by rebases onto `main`: `main` had moved the scheduled catalog check into `update-startup-catalog.ts`, and this PR's adoption call moved there unchanged (`git range-diff` shows no other production change; a `remoteCatalog: null` test-fixture field moved to main's relocated `cli-compaction.test-support.ts`).

| Driver → candidate | Scenario | Result |
|---|---|---|
| `[email protected]` | base | passed (930 s); updater outcome success, no recovery |
| `[email protected]` | plugin-deps-cleanup | passed (923 s); updater outcome success, no recovery |
| `[email protected]` (latest) | base | passed (813 s); updater outcome success, no recovery |

In every cell:
- Migration, post-Doctor config validation, survival, plugin-dependency cleanup and runtime-deps repair checks passed.
- The candidate Gateway logged ready, then its catalog check fetched and saved the hosted catalog about 0.2 s after starting. The hosted catalog is older than the candidate's build stamp, so adoption ends `unchanged`, which isn't logged. After a 300 s settlement window, `/readyz` (`ready:true`, nothing failing) and a Gateway `status` RPC passed, and the Gateway shut down cleanly.
- To show a logged terminal outcome, each cell was repeated with a loopback mirror serving a newer copy of the same catalog. Each check logged `remote model catalog applied` about 0.26 s after it started, followed by `/readyz` and `status` passing.

Not run: `[email protected]` plugin-deps-cleanup. At the previous head it failed inside the 2026.9.7 driver's retained-runtime verification (`Retained runtime entry does not reference its inventoried file: dist/a2ui-…mjs`), identically for a merge-base control package with none of this PR's commits.

Harness note for the 2026.9.7 cell: unchanged, the upgrade harness can't run against 2026.9.7. It seeds the retired `tools.toolSearch {mode:"code"}` setting, which 2026.9.7 rejects. The 2026.9.7 cell used the harness's existing Tool Search "absent" mode, a one-line local change that skips only that seed and its check. The 2026.9.6 cells used the unchanged harness.

**CI:** fully green on the final head ([run 36818367970](https://github.com/openclaw/openclaw/actions/runs/36818367970)). Earlier heads hit failures that reproduce on `main` in code this PR doesn't touch: `update-cli.target-schema` (main reproduction: openclaw#158000 (comment)), the type-suppression inventory, the Windows partition owner test and the Windows backup-rename test. Main has since fixed the last three. Config compatibility confirmation: openclaw#158000 (comment).

No overlap with Pash/Sarah changes.

Co-authored-by: Ayaan Zaidi <[email protected]>
obviyus added a commit that referenced this pull request Oct 16, 2026
…173792)

## What Problem This Solves

Fixes: usage reports show Claude CLI traffic (for example `claude-cli/claude-opus-5-5`, the default CLI model) as "Unpriced", because the CLI reports no cost and the `claude-cli` catalog has no priced rows.

## User Impact

Usage views now estimate Claude CLI usage at Anthropic's API rates, as subscription routes such as Kimi Code already do. The figures are estimates of what the API would cost, not plan charges. Prices apply right away, offline included, from the bundled Anthropic catalog rows, with no catalog publish needed. A Claude CLI turn that used 1h prompt caching is now priced like the CLI's own cost figure.

## Why This Change Was Made

Since #168728, Claude CLI models come from the CLI's own menu with zero placeholder costs. Since #156535, estimates use the provider that handles the request, so `claude-cli/*` never picks up the `anthropic/*` rows.

- **`priceAs`:** a new `modelPricing` provider field names the provider whose catalog rows price this provider's models when it has no price of its own. `resolveModelPricing` tries that provider's row for the same model, one hop only. A provider's own catalog or hosted price still wins.
  - Plugin manifests already let `cliBackends` own `modelCatalog` rows. `modelPricing` now accepts them too.
  - The anthropic manifest declares `claude-cli: { priceAs: "anthropic" }`.
  - Each model has one price fact, and nothing extra is published to the hosted catalog.
- **1h cache writes:** Claude Code splits cache writes by TTL (`cache_creation.ephemeral_1h_input_tokens`). `normalizeUsage` read only the camelCase `cacheWrite1h`, so CLI turns lost the 1h subset and would have been priced at the 5m rate. `normalizeUsage` now reads the split, and CLI usage records and persisted transcript usage carry it to the existing calculator.

## Evidence

- **End to end through the shipped Gateway (`openclaw gateway usage-cost`).**
  - Setup:
    - an isolated state and a build of this branch;
    - one real `openclaw agent --local` turn on `anthropic/claude-opus-5-5` through the `claude-cli` runtime;
    - a synthetic `claude` executable that answered with the repo's spawn-proof protocol and reported 1,000,000 input and 100,000 output tokens with no cost. No provider request was made.

  | Catalog state | `usage-cost` |
  |---|---|
  | Today's live hosted catalog (0 `claude-cli/*` keys), loaded with `openclaw models refresh` | `Total: $6.00 · 1.1m tokens` |
  | Catalog refresh disabled (bundled manifest rows only) | `Total: $6.00 · 1.1m tokens` |
  | Earlier revision's baseline, with no CLI pricing | `$0.0000`, `Missing cost: 1 (claude-cli/claude-opus-5-5 1)` |

- **1h cache writes against the CLI's own cost:**
  - **Recorded Claude 2.1 turn** (`test/fixtures/cli/claude-2.1-thinking-progress.jsonl`): it now prices at $0.40499, equal to the CLI's `costUSD`. Before the fix it priced at $0.26641.
  - **35 real Claude Code sessions on one install:** catalog rates with the 1h split reproduce the CLI's total `costUSD` exactly ($2.5640). Pricing every write at the 5m rate gives $1.763.
- **Tests:**
  - Resolver: `claude-cli/claude-opus-5-5` resolves to the `anthropic` row, and a `claude-cli` hosted price wins over the mapping. The mapping test fails without the fallback.
  - Manifest: `priceAs` is normalized for a CLI backend and dropped for an unowned id.
  - CLI usage: parsing and transcript persistence keep `cacheWrite1h`. The transcript test fails without the carry-through.
  - Pricing, manifest, bundled-manifest contract, session-cost and CLI output suites pass (114 tests).
  - The catalog publisher is unchanged. Its two local `second rename failure` cases also fail on main on this machine.
- **Gap (by design):** for tiered models such as `claude-haiku-5-5`, a multi-call turn whose summed prompt passes the 100k tier boundary stays unpriced. Whole-turn counters cannot show each call's tier.
- **Gap:** a per-agent `models.json` written by older versions can still hold frozen `claude-cli` rows, including zero costs. Those rows outrank the catalog. #174641 removes them.

**Merge risk:**
- A two-way door: a revert removes the field and the mapping. No state is written.
- It adds an optional `priceAs` field to the published `modelPricing` manifest contract and lets `cliBackends` declare pricing policies. Only the Anthropic plugin uses either.
- Blast radius: cost estimates for Claude CLI sessions. Routing and billing do not change.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…penclaw#173792)

## What Problem This Solves

Fixes: usage reports show Claude CLI traffic (for example `claude-cli/claude-opus-5-5`, the default CLI model) as "Unpriced", because the CLI reports no cost and the `claude-cli` catalog has no priced rows.

## User Impact

Usage views now estimate Claude CLI usage at Anthropic's API rates, as subscription routes such as Kimi Code already do. The figures are estimates of what the API would cost, not plan charges. Prices apply right away, offline included, from the bundled Anthropic catalog rows, with no catalog publish needed. A Claude CLI turn that used 1h prompt caching is now priced like the CLI's own cost figure.

## Why This Change Was Made

Since openclaw#168728, Claude CLI models come from the CLI's own menu with zero placeholder costs. Since openclaw#156535, estimates use the provider that handles the request, so `claude-cli/*` never picks up the `anthropic/*` rows.

- **`priceAs`:** a new `modelPricing` provider field names the provider whose catalog rows price this provider's models when it has no price of its own. `resolveModelPricing` tries that provider's row for the same model, one hop only. A provider's own catalog or hosted price still wins.
  - Plugin manifests already let `cliBackends` own `modelCatalog` rows. `modelPricing` now accepts them too.
  - The anthropic manifest declares `claude-cli: { priceAs: "anthropic" }`.
  - Each model has one price fact, and nothing extra is published to the hosted catalog.
- **1h cache writes:** Claude Code splits cache writes by TTL (`cache_creation.ephemeral_1h_input_tokens`). `normalizeUsage` read only the camelCase `cacheWrite1h`, so CLI turns lost the 1h subset and would have been priced at the 5m rate. `normalizeUsage` now reads the split, and CLI usage records and persisted transcript usage carry it to the existing calculator.

## Evidence

- **End to end through the shipped Gateway (`openclaw gateway usage-cost`).**
  - Setup:
    - an isolated state and a build of this branch;
    - one real `openclaw agent --local` turn on `anthropic/claude-opus-5-5` through the `claude-cli` runtime;
    - a synthetic `claude` executable that answered with the repo's spawn-proof protocol and reported 1,000,000 input and 100,000 output tokens with no cost. No provider request was made.

  | Catalog state | `usage-cost` |
  |---|---|
  | Today's live hosted catalog (0 `claude-cli/*` keys), loaded with `openclaw models refresh` | `Total: $6.00 · 1.1m tokens` |
  | Catalog refresh disabled (bundled manifest rows only) | `Total: $6.00 · 1.1m tokens` |
  | Earlier revision's baseline, with no CLI pricing | `$0.0000`, `Missing cost: 1 (claude-cli/claude-opus-5-5 1)` |

- **1h cache writes against the CLI's own cost:**
  - **Recorded Claude 2.1 turn** (`test/fixtures/cli/claude-2.1-thinking-progress.jsonl`): it now prices at $0.40499, equal to the CLI's `costUSD`. Before the fix it priced at $0.26641.
  - **35 real Claude Code sessions on one install:** catalog rates with the 1h split reproduce the CLI's total `costUSD` exactly ($2.5640). Pricing every write at the 5m rate gives $1.763.
- **Tests:**
  - Resolver: `claude-cli/claude-opus-5-5` resolves to the `anthropic` row, and a `claude-cli` hosted price wins over the mapping. The mapping test fails without the fallback.
  - Manifest: `priceAs` is normalized for a CLI backend and dropped for an unowned id.
  - CLI usage: parsing and transcript persistence keep `cacheWrite1h`. The transcript test fails without the carry-through.
  - Pricing, manifest, bundled-manifest contract, session-cost and CLI output suites pass (114 tests).
  - The catalog publisher is unchanged. Its two local `second rename failure` cases also fail on main on this machine.
- **Gap (by design):** for tiered models such as `claude-haiku-5-5`, a multi-call turn whose summed prompt passes the 100k tier boundary stays unpriced. Whole-turn counters cannot show each call's tier.
- **Gap:** a per-agent `models.json` written by older versions can still hold frozen `claude-cli` rows, including zero costs. Those rows outrank the catalog. openclaw#174641 removes them.

**Merge risk:**
- A two-way door: a revert removes the field and the mapping. No state is written.
- It adds an optional `priceAs` field to the published `modelPricing` manifest contract and lets `cliBackends` declare pricing policies. Only the Anthropic plugin uses either.
- Blast radius: cost estimates for Claude CLI sessions. Routing and billing do not change.

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: anthropic extensions: cloudflare-ai-gateway extensions: google extensions: kilocode extensions: kimi-coding extensions: moonshot extensions: openrouter extensions: qwen extensions: vercel-ai-gateway extensions: zai gateway Gateway runtime 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. scripts Repository scripts 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.

2 participants