Skip to content

refactor(agents): consolidate model normalization - #112772

Merged
steipete merged 2 commits into
mainfrom
codex/loc-model-normalization
Jul 22, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/loc-model-normalization

Conversation

@steipete

@steipete steipete commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

src/agents split provider/model reference normalization across model-ref-shared.ts and model-selection-normalize.ts, forcing callers to choose between overlapping owners and making the normalization order harder to audit.

Why This Change Was Made

This maintainer-commissioned, AI-assisted refactor makes model-ref-shared.ts the canonical owner for provider IDs, static and configured model IDs, model refs, keys, manifest policy, and runtime plugin normalization. The shipped Plugin SDK declarations for parseModelRef and findNormalizedProviderValue remain at model-selection-normalize.ts, preserving the public agent-runtime API hash. The lazy provider-model-normalization.runtime.ts boundary is unchanged, and unrelated provider-config, model-compatibility, and tool-call normalization paths remain separate.

User Impact

No user-visible behavior changes. Provider/model inputs retain the same trimming, casing, aliases, manifest policies, runtime plugin hooks, and OpenRouter compatibility behavior, with one fewer internal normalization owner.

Evidence

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime commands Command implementations agents Agent runtime and tooling size: M maintainer Maintainer-authored PR labels Jul 22, 2026
@steipete
steipete marked this pull request as ready for review July 22, 2026 21:32
@steipete
steipete requested a review from a team as a code owner July 22, 2026 21:32
@steipete
steipete force-pushed the codex/loc-model-normalization branch from 7880a7f to 12bfc74 Compare July 22, 2026 21:39
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@steipete
steipete merged commit cdb8d32 into main Jul 22, 2026
125 checks passed
@steipete
steipete deleted the codex/loc-model-normalization branch July 22, 2026 23:19
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling commands Command implementations gateway Gateway runtime maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant