Repository navigation
fix(setup): verify and save provider starter aliases correctly - #139339
Conversation
Use the selected provider's model-id hook, preserving its method receiver, for raw authentication starters. Carry the canonical model through the setup probe and persistence, including selected model metadata. Keep guided and custom-provider selections canonical, and simplify copying within the configuration projection's existing deep clone. Preserve the Claude CLI probe/persistence split and current auth rollback ownership. Refs #130706.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 5, 2026, 4:00 PM ET / 20:00 UTC. ClawSweeper reviewWhat this changesThe PR resolves provider starter aliases before setup verification and saves the canonical model name with the selected model metadata. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 3 items remain The alias repair remains useful, but its metadata projection can erase an existing canonical model’s saved settings. This maintainer PR should remain open. Priority: P2 Review scores
Verification
How this fits togetherModel Setup turns provider credentials and a starter model into a verified inference connection. Its preparation step supplies both the live probe and the configuration later saved for the selected agent. flowchart TD
A[Provider credentials and starter model] --> B[Provider alias normalization]
B --> C[Selected model metadata projection]
D[Existing user settings] --> C
C --> E[Live inference verification]
E --> F{Verification succeeds}
F -->|Yes| G[Save model and credential]
F -->|No| H[Show setup failure]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource -4, Tests +21, Docs +2. Total +19 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Normalize at setup preparation, then merge selected metadata into the canonical entry while preserving unspecified existing fields and nested parameters. Do we have a high-confidence way to reproduce the issue? Yes, from source: prepopulate the canonical model entry with parameters, return an empty starter-alias entry from provider authentication, and normalize that alias to the existing model. The projection drops those parameters; execution was not performed in this read-only review. Is this the best way to solve the issue? Not yet. Normalizing at preparation is the right boundary, but wholesale replacement violates the existing model-map merge behavior; weakening winner verification would also leave persistence incorrect. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6b1314938d6d. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Merge starter metadata into existing default and per-agent model entries using the canonical configuration merge helper, preserving unspecified fields and nested parameters. Reuse normalized provider-key lookup with exact-key precedence instead of maintaining a duplicate helper. Extend activation regressions for fresh, partial, and empty starter metadata. The compiled setup path passed authenticated OpenAI completion and persistence proof for both collision cases.
|
Merged via squash.
|
…law#139339) * fix(setup): canonicalize provider starter models before verification Use the selected provider's model-id hook, preserving its method receiver, for raw authentication starters. Carry the canonical model through the setup probe and persistence, including selected model metadata. Keep guided and custom-provider selections canonical, and simplify copying within the configuration projection's existing deep clone. Preserve the Claude CLI probe/persistence split and current auth rollback ownership. Refs openclaw#130706. * fix(setup): preserve canonical model settings during alias projection Merge starter metadata into existing default and per-agent model entries using the canonical configuration merge helper, preserving unspecified fields and nested parameters. Reuse normalized provider-key lookup with exact-key precedence instead of maintaining a duplicate helper. Extend activation regressions for fresh, partial, and empty starter metadata. The compiled setup path passed authenticated OpenAI completion and persistence proof for both collision cases.
What Problem This Solves
Model Setup could reject a working provider when authentication returned a starter alias: inference reported the canonical model while setup compared it against the alias. Selected model metadata also needed to follow the canonical key without deleting existing operator settings. This is a focused extraction from #130706.
Why This Change Was Made
Use the selected provider's normalization hook during preparation, retaining its method receiver, then carry the canonical model through verification and persistence. Reuse the existing model-entry merge owner for both defaults and per-agent settings: explicit starter fields win, while unspecified fields and nested parameters survive. Guided discovery, custom setup and the Claude CLI probe/persist split retain their existing identities. Duplicate cloning and provider-key lookup are removed.
User Impact
API-key, token and provider-login setup can verify and save provider-owned starter aliases with the intended model settings. No configuration option, protocol, model catalog or persistence schema is added. Whole PR production: +51/-58, net -7; tests +91/-13, net +78; docs +4/-2.
Evidence
d6d50d1d45877f57da91c275300032c7f641d642has tree9d7210640a8572129d5c2a8029fde1cf10486520, exactly matching the compiled final live proof. The earlier full build and starter-alias live control also passed.ClawSweeper follow-through: the canonical-settings finding and both Rank-up moves are addressed by merging unspecified canonical fields/nested params and extending activation coverage to fresh, partial and empty starter metadata in both maps. No finding is deferred.