Repository navigation
refactor(models): prepare selection policy once - #130413
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Contributor
Author
|
Merged via squash.
|
vincentkoc
added a commit
that referenced
this pull request
Aug 26, 2026
* origin/main: (275 commits) fix(ai): require explicit compatible-provider endpoints (#130453) test(control-ui): guard the hand-mirrored theme --bg copies (#130444) fix(onboard): preserve the saved skills package manager (#130438) improve(worker): diagnose admission-deadline failures and widen daemon revalidation budget (#130435) fix(plugins): align diffs external install metadata (#130362) refactor(models): consolidate config normalization (#130439) fix(browser): accept common keyboard aliases (#130401) fix(release): refresh IMAP plugin baselines (#130351) fix(tests): type sticky model agent fixtures (#130441) fix(qa): track current Slack progress cards (#130354) feat(ui): refine the mobile composer (#130308) fix(ui): clarify gateway disconnect status in tab title (#130364) test(qa): await gateway startup before network probes (#130353) fix(qa): run Buzz profile scenarios with pooled credentials (#130316) fix(crabbox): keep the setup failure reason and name its phase (#130425) fix: dashboard tools target the wrong Gateway after admission (#130112) fix(ui): distinguish inherited model defaults from session pins (#120805) feat(feishu): let agents resend received stickers (#130374) refactor(models): prepare selection policy once (#130413) fix(ui): make dashboard side panels enter split view (#130426) ... # Conflicts: # test/scripts/docker-build-helper.test.ts
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 27, 2026
* refactor(models): prepare selection policy once * style(models): fix selection exports and return consistency
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.
What Problem This Solves
Model selection and catalog visibility repeatedly prepare the same model policy, aliases, and catalog metadata. They also compute and forward an automatic-fallback set that no production code reads. This makes model handling harder to maintain and keeps redundant work in status, selection, and reset paths.
Why This Change Was Made
Use one private preparation path and keep explicit selection authorization separate from automatic failover. Delete the unused fallback set, its reset-command resolver, forwarding wrappers, and the duplicate primary-model string normalizer. The existing fallback execution owner and catalog-retention path remain unchanged.
Policy aliases retain their policy owner's scope; selection/display aliases retain the selected agent's scope. Exact visibility refs are resolved once. Existing callable names remain exported, and the public allowed-set result retains the three fields published in v2026.7.1-2. The removed fallback property is absent throughout that stable tag and has no production readers on current main.
Production: +91/-287 (net -196). Tests/support: +4/-12 (net -8). One assertion-count baseline entry is reduced to match the deleted assertion; no new config, auth, persistence, SDK entrypoint, or default surface.
User Impact
No intended behavior change. Model selection, inherited allowlists, per-agent aliases, configured fallback execution, and reset behavior keep their existing contracts with less duplicate code.
Release context: internal model-policy cleanup following #130381; no operator action required.
Evidence
models status --json --agent workermatches its before-edit baseline: agent aliasapproved -> lab/agent, inherited allowed refslab/allowedandlab/primary, automatic fallbacklab/fallbackretained but excluded from explicit selection.57cbb38e9dca602f7583498bb0afeaf55674a6e0; the prior run failed lint.Focused test command:
No provider request transport or live Gateway configuration changed. The CLI proof uses only synthetic configuration and isolated state.