Skip to content

refactor: simplify Google, Qwen, and xAI model catalogs - #119627

Merged
steipete merged 1 commit into
mainfrom
codex/loc-0805-provider-catalogs-dmvazq
Aug 5, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/loc-0805-provider-catalogs-dmvazq

Conversation

@steipete

@steipete steipete commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Bundled Google/Vertex, Qwen, and xAI catalogs repeated the same model-object assembly across 42 entries, increasing maintenance cost and the risk that equivalent provider metadata drifts.

Why This Change Was Made

Replace duplicate provider-owned model literals with typed, provider-local catalog rows and canonical assembly. The change removes 247 production lines (+142/-389) across exactly three files while preserving the existing provider boundaries, configuration, authentication, routing, and public contracts.

User Impact

No user-visible behavior changes: all 42 catalog records remain identical—9 Google/Vertex, 18 Qwen across Token Plan and Standard, and 15 xAI. Model IDs, ordering, object/property shapes, reasoning and input capabilities, context/output limits, pricing, public aliases, OAuth selection, and stored model preferences remain unchanged.

Google and Vertex still share their catalog; input arrays and compatibility objects retain their original independent identities; Qwen plan-specific capabilities and public catalog aliases remain distinct or shared exactly as before; and xAI preserves all four pricing-reference groups, alias resolution, and the Grok Build private maxTokens omission/public default.

Evidence

  • Exact-source before/after runtime differential passed for all 42 records, including serialized bytes, own-property order, shared/distinct object references, aliases, provider builders, and cross-plan capability differences.
  • Focused trusted Blacksmith Testbox proof: 366/366 tests passed across 20 files and four Vitest shards, covering Google/Vertex discovery and provider registration, Qwen Token Plan/Standard catalogs and routing, xAI model aliases, preferences, onboarding and OAuth, and shared provider-discovery/model-routing behavior.
  • Targeted provider lint passed: 0 warnings, 0 errors across 245 rules.
  • Full unmodified pnpm check:changed passed, including production and test extension typechecks, formatting, plugin-boundary and dependency guards, dead-export checks, changed-file lint, database-first guards, and runtime import-cycle checks.
  • Fresh exact review: .agents/skills/autoreview/scripts/autoreview --mode local --engine codex --model gpt-5.6-sol --thinking xhigh; zero accepted/actionable findings, confidence 0.99.
  • Blacksmith Testbox run: https://github.com/openclaw/openclaw/actions/runs/31009450914

@steipete
steipete marked this pull request as ready for review August 5, 2026 13:44
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 5, 2026
@clawsweeper

clawsweeper Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 5, 2026, 10:23 AM ET / 14:23 UTC.

ClawSweeper review

What this changes

The PR replaces repeated Google, Qwen, and xAI model-definition literals with compact provider-local catalog rows and assembly helpers while preserving catalog behavior.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

No blocking correctness or security finding. This is a well-scoped, net-negative provider-catalog refactor, but the protected maintainer label and behind-base status require normal exact-head maintainer review before merge.

Priority: P3
Reviewed head: 013176abbf7c297893c20a0f398c49d57611d23b
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) The focused refactor has strong behavioral-equivalence evidence, a clean provider boundary, and no actionable review finding.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The PR body supplies after-fix runtime-differential evidence for all 42 records and links a successful trusted Testbox run.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The PR body supplies after-fix runtime-differential evidence for all 42 records and links a successful trusted Testbox run.
Evidence reviewed 6 items Google catalog equivalence: The nine-row mapper preserves field order, shared cost identity, per-row input and compatibility object allocation, and the shared Google/Vertex static catalog.
Qwen catalog equivalence: The two catalog constructions retain the ordered Token Plan and Standard rows, field order, shared default cost, aliases, and plan-specific filtering behavior.
xAI catalog equivalence: The row mapper retains input-array and cost-reference behavior, public conversion, and the intentional Grok Build private maxTokens omission.
Findings None None.
Security None None.

How this fits together

Bundled provider plugins construct model catalogs that feed provider registration, onboarding, stored model preferences, and routing. This changes only the local construction of those catalog objects.

flowchart LR
  A[Provider catalog rows] --> B[Catalog assembly]
  B --> C[Provider model catalogs]
  C --> D[Registration and onboarding]
  D --> E[Model selection and routing]
Loading

Decision needed

Question Recommendation
Should this protected maintainer-scoped refactor proceed through normal merge review after its exact-head status is refreshed? Proceed with normal review: Refresh the exact-head merge and check state, then merge if the protected-label owner agrees.

Why: The code review found no defect, but the protected maintainer label requires an explicit maintainer judgment rather than automated cleanup.

Before merge

  • Resolve merge risk (P1) - GitHub reports the PR as behind its base and the supplied check set is not complete, so the final merge gate must refresh against the exact reviewed head.
  • Complete next step (P2) - A protected maintainer label and behind-base status require human merge judgment and an exact-head status refresh; no mechanical repair is identified.
Agent review details

Security

None.

PR surface

Source -247. Total -247 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 3 142 389 -247
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 142 389 -247

Review metrics

Metric Value Why it matters
Production vs test LOC production +142/-389 (net -247), tests +0/-0 The production reduction is justified by consolidating duplicated provider-owned catalog assembly without adding a new contract surface.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the provider-local row assemblers and complete the protected-label maintainer review after the exact-head merge and check state is refreshed.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the provider-local row assemblers and complete the protected-label maintainer review after the exact-head merge and check state is refreshed.

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

Not applicable: this is a behavior-preserving refactor, so the relevant verification is catalog-output equivalence rather than reproduction of a bug.

Is this the best way to solve the issue?

Yes: provider-local typed rows and one assembler remove repeated policy while retaining each provider’s ownership boundary and existing public catalog shape.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 1b4a60be15a1.

Labels

Label changes:

  • add P3: This is a behavior-preserving internal maintenance refactor with no reported user-facing regression.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies after-fix runtime-differential evidence for all 42 records and links a successful trusted Testbox run.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The PR body supplies after-fix runtime-differential evidence for all 42 records and links a successful trusted Testbox run.

Label justifications:

  • P3: This is a behavior-preserving internal maintenance refactor with no reported user-facing regression.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The PR body supplies after-fix runtime-differential evidence for all 42 records and links a successful trusted Testbox run.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies after-fix runtime-differential evidence for all 42 records and links a successful trusted Testbox run.

Evidence

What I checked:

  • Google catalog equivalence: The nine-row mapper preserves field order, shared cost identity, per-row input and compatibility object allocation, and the shared Google/Vertex static catalog. (extensions/google/provider-catalog.ts:17, 013176abbf7c)
  • Qwen catalog equivalence: The two catalog constructions retain the ordered Token Plan and Standard rows, field order, shared default cost, aliases, and plan-specific filtering behavior. (extensions/qwen/models.ts:79, 013176abbf7c)
  • xAI catalog equivalence: The row mapper retains input-array and cost-reference behavior, public conversion, and the intentional Grok Build private maxTokens omission. (extensions/xai/model-definitions.ts:71, 013176abbf7c)
  • Consumer and regression coverage: Existing provider consumers and tests continue to exercise catalog registration, discovery, aliases, filtering, onboarding, and model metadata. (extensions/qwen/provider-catalog.test.ts:41, 1b4a60be15a1)
  • Feature provenance: Blame and history trace the original catalog implementation to the same area owner, with this PR as a focused follow-up refactor. (extensions/google/provider-catalog.ts:17, 57122c965c65)
  • After-fix behavior proof: The PR body reports an exact runtime differential across all 42 records, including serialized output and reference identities, plus a linked trusted Testbox run and focused provider coverage. (013176abbf7c)

Likely related people:

  • steipete: History attributes the original Google, Qwen, and xAI catalog work and this focused refactor to the same contributor. (role: feature owner and recent area contributor; confidence: high; commits: 57122c965c65, 013176abbf7c; files: extensions/google/provider-catalog.ts, extensions/qwen/models.ts, extensions/xai/model-definitions.ts)
  • Oliver Mee: History includes Token Plan work in the Qwen catalog area. (role: historical adjacent contributor; confidence: medium; commits: ae11ea5ba9a0; files: extensions/qwen/models.ts)

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.

@steipete
steipete merged commit 8db2cb7 into main Aug 5, 2026
156 of 160 checks passed
@steipete
steipete deleted the codex/loc-0805-provider-catalogs-dmvazq branch August 5, 2026 14:40
@steipete

steipete commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to VACInc/openclaw that referenced this pull request Aug 5, 2026
* origin/main: (130 commits)
  refactor(qa): consolidate scenario runtime helpers (openclaw#119623)
  fix(telegram): bind Mini App auth to dashboard launches
  refactor(agent-core): unify session projection and compaction summaries (openclaw#119639)
  fix(codex): allow natural reactions in the current conversation (openclaw#119649)
  refactor(providers): deduplicate bundled model catalogs (openclaw#119627)
  fix(ui): observe the active service worker after asset refresh (openclaw#119622)
  fix(agents): strip echoed base64 image payloads so photo-heavy turns no longer hit the per-turn output cap (openclaw#119488)
  improve: make state-heavy test suites faster (openclaw#119617)
  perf(agents): add concurrency benchmark (openclaw#119569)
  fix(browser): visibly report failed pairing and tab-sharing actions (openclaw#119526)
  refactor(lobster): consolidate embedded workflow execution (openclaw#119630)
  fix(plugin-sdk): stabilize tuple-derived API baseline ordering (openclaw#119635)
  docs(skills): make full-authority maintainer runs unattended (openclaw#119629)
  fix(managed-child): honor process groups that vanish before cleanup (openclaw#119614)
  fix(ci): stop label-driven automation churn (openclaw#119610)
  fix(media): keep the ttl sweep out of the managed outgoing tree (openclaw#119127)
  fix(claws): remove owner-qualified skills (openclaw#119606)
  fix(clawrouter): show stable error for malformed usage responses (openclaw#119580)
  fix(gateway): claim malformed plugin icon routes (openclaw#119559)
  fix(telegram): preserve truthful empty-content delivery (openclaw#88810)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: google extensions: xai maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: L 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