Repository navigation
refactor(models): consolidate prepared catalog construction - #130654
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
August 27, 2026 03:34
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 27, 2026
…#130654) * refactor(models): consolidate prepared catalog construction * test(models): avoid shadowing registry fixture identifiers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #130600 (model-list preparation cleanup).
What Problem This Solves
Prepared model construction still repeated work already owned by its producers: full provider-static catalogs rebuilt provider request settings once per row, four consumers reparsed the same configured references, and disk-backed versus captured plugin catalogs repeated the same shard ingestion loop.
This is an AI-assisted, maintainer-requested internal cleanup. No intended user-visible behavior change.
Why This Change Was Made
Use the existing inline provider builder once per nonempty provider, carry parsed configured references from agent-fact preparation, and send both catalog-shard sources through the existing ingestion owner. Remove the private static-resolver forwarding function and unused internal cache-reset exports. The public agent-sessions SDK exports neither reset function; command-result caching itself is unchanged.
Production: +58/-134 (net -76). Tests: +152/-68 (net +84). No dependency, public SDK, config/default, protocol, storage or auth-policy change.
User Impact
Model selection and catalog output retain the same behavior. Targeted configured lookup stays lazy; only paths that already enumerate a provider batch use batch projection. Empty providers still skip request-secret resolution. Custom transport APIs, partial costs, zero/false values, and attached request/local-service/generation metadata survive projection.
Configured references keep their order and case: static/dynamic completion may deduplicate case-insensitively, while exact registry lookup must still try a later differently cased reference. Raw collection remains available to provider selection and external CLI auth hydration. Catalog root validation, generated-owner filtering, healthy sibling salvage, and warning order are unchanged.
Evidence
b14bfcc9b74f37d92423468a8d393229a4d8c330, including all 65 selected plugin shards.Focused command (checkout-local Vitest cache used):
The measured suite was 62.68s/1,114,128,384-byte maximum RSS before and 101.39s/1,109,884,928-byte maximum RSS after. The after run overlapped full checks on a shared host, so these are recorded observations, not a speedup claim.
Follow-up batch: remove unreachable/repeated prepared-owner access paths while preserving replacement-gate, timeout, lease and publication semantics. A schema-only registry split was considered and rejected because it merely moves code and adds exports without addressing another demonstrated ownership problem.