Repository navigation
fix(litellm): preserve provider settings through reauthentication - #174824
Conversation
|
🦞👀 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: needs real behavior proof before merge. What this changesPreserves LiteLLM proxy settings during reauthentication and removes obsolete provider aliases when activating a saved sign-in. Example: Reauthenticate a saved LiteLLM provider configured as LiteLLM with baseUrl https://proxy.example/v1.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 4 items remain This PR repairs two source-confirmed configuration-preservation bugs, and the previous catalog finding is fixed. No introduced code defect was found. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe LiteLLM plugin prepares provider configuration, and shared setup projects the selected endpoint and credential binding into configuration used for verification and activation. flowchart LR
A[Saved provider configuration] --> B[LiteLLM authentication]
B --> C[Prepared provider snapshot]
C --> D[Shared setup projection]
D --> E[Provider verification]
E --> F[Activated configuration]
Technical reviewBest possible solution: Retain the focused resolver and projection repair, supported by inspectable upgrade and credential-destination captures. Do we have a high-confidence way to reproduce the issue? Current-main source shows both failures: a mixed-case-only provider misses the onboarding URL lookup, and projection retains equivalent old keys; no target code was executed during this review. Is this the best way to solve the issue? The patch repairs the existing setup owners, reuses the public resolver, preserves unrelated providers, and restores the original paired catalog lookup. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 49940485315c. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: No reachable credential leak was found, but the changed endpoint-selection path needs inspectable final-effect evidence. EvidenceWhat I checked:
PR surfaceSource +7, Tests +67, Docs +3. Total +77 across 6 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 16, 2026, 8:30 PM ET / October 17, 2026, 00:30 UTC (Revision 2). |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Addressed the catalog URL/path mismatch by retaining the shared catalog builder's original lookup. The new conflicting-version-suffix case failed before the correction; all 20 registered LiteLLM tests now pass. The final built head also passed native activation, explicit catalog refresh, real Ollama chats, and all eight credential-isolation switch/reset cases. The PR body contains the updated evidence. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…enclaw#174824) * fix(litellm): preserve mixed-case proxy URLs during reauthentication Resolve the authored provider row before choosing onboarding defaults, so unattended reauthentication keeps its proxy and catalog instead of staging localhost:4000. Reuse the same existing resolver for prompt and discovery reads. Related: openclaw#173300, openclaw#173164 * fix(setup): retain provider alias folding during activation * fix(setup): prefer canonical provider snapshots during activation * fix(litellm): keep discovery URL and path selection aligned
* test(llm): consolidate s0841 observation coverage Remove the catalog/fast-mode replay: prepared-model-runtime.catalog-auth.test.ts already covers downgrade/recovery clearing in 'notifies downgrade, recovery, and expiry while refreshing repeats and canceling retired timers'; openai.test.ts covers 'preserves Ultrafast on the API boundary at %s'. Preserve observer forwarding and repeated-observation log severity in the retry-attribution case. Keep the real-transport cooldown and run-isolation cases. * test(litellm): deslop s0840 tests Consolidate authored noninteractive setup into the existing setup table and reuse onboarding model/config assertions. Keep interactive profile and normalized-key proof in the authored-settings cases, configured-URL fallback in the URL table, and merge-mode proof in onboarding's authored-metadata cases. Preserve the alias and discovery regressions from #174824 and #174818. No production or routing changes. * test(litellm): consolidate s0840 owner-boundary coverage Retire the mocked interactive harness in index.test.ts. The onboarding tests 'normalizes %j to %j and selects the first served model', 'rejects invalid proxy URL %s', and 'preserves authored metadata in %s mode with canonical row %s' now carry URL, validation, credential and canonical-row assertions through discovery-backed setup. Keep noninteractive defaults, alias preservation and catalog endpoint selection in index.test.ts. Remove the provider-local credential persistence replay and internal mock call inventory. The shared owner test src/plugins/provider-api-key-auth.test.ts 'persists non-interactive credentials through the runtime auth owner' retains actual persistence proof. LiteLLM keeps its public flag/env wiring and resulting auth configuration assertions. No production or Vitest routing changes. Static checks only, per campaign CI-only mode. * test(google-meet): deslop s0842 tests Replace hand-built registration capture arrays with typed API spies and simplify the child-process mock factory. Keep all lazy-load, policy failure, URL validation, diagnostic, and lifecycle assertions. Drop the active-pair SIGTERM-resistance table row: shares SIGTERM-resistant cleanup across concurrent stopByUrl calls retains the same stopSession/process termination path. Keep the retired-output row for its distinct cleanup ownership. CI-only validation: oxfmt, git diff --check, and plain oxlint passed. No tests or coverage run. Lines 492 -> 459 (6.7%); retain unique behavior rather than force the 25% target. * test(google-meet): remove redundant lazy import replay Keep cold registration, node-owner activation and both policy failure boundaries. Consolidate observation launch setup and remove duplicate process counts, response inventories and backend metadata assertions. Remaining proof: src/shared/lazy-runtime.test.ts caches imported modules; index.test.ts keeps test-listen probes on the agent that invoked the tool, creates and joins a Meet through the create tool action by default, refreshes blocked realtime browser health read-only when status is requested, and registers the node-host command used by chrome-node transport. CLI proof remains in src/cli.test.ts accepts --json on session status and runs a listen-first health probe. Transcript lifecycle remains in src/meeting-bot/transcripts-bridge.test.ts retires simultaneous tool subscribers when meeting metadata finalization fails; native backend defaults remain in src/meeting-bot/configured-node-host.test.ts selects the native backend for macOS and Linux. CI-only validation: oxfmt, plain oxlint and git diff --check pass; no test runs. Shard base lines: lazy-import 208 -> 121, node-host 284 -> 247; total 492 -> 368 (-25.2%). * test(ui): deslop s0844 tests Share scroll fixtures and frame assertions while retaining replacement, readiness, font, cancellation and disposal coverage. Remove the duplicate in-place projection case: publishes local mutations while observed and reconnects after the last reader leaves retains its synchronous-read, deferred-notification and revision assertions. * test(ui): consolidate s0844 owner-boundary proof Table mutable/callback adapter lifecycles and share settled-value assertions. Keep explicit-subscriber identity and pending-disposal ordering checks. Simplify restore inputs without repeating the request producer. Covering sibling tests: shared-owner-projection.test.ts / shares the fixed projection across independent consumers, owners, and read contracts retains lazy acquisition, first/last release, reconnect and same-object mutation proof. scroll-state-observer.test.ts / releases retired publishers while fonts load and remeasures active views retains font event and retirement proof; batches geometry and scrolls retains event coalescing. Shard replacement, hidden-content and live-target disposal cases retain Solid binding lifecycle proof. * test(comfy): deslop s0845 tests Share workflow and response fixtures; reuse mock call recording and compact assertions without dropping any of the 24 expanded cases. Retain all private-network, redirect, credential, terminal-error, timeout, seed isolation, upload and download contracts. Static gates pass; runtime proof deferred to batch CI. * test(comfy): consolidate s0845 provider proof Retain all 24 expanded cases while consolidating readiness and redirect fixtures, reusing the real SSRF harness for cloud authentication, and removing internal call-count and audit-label assertions. Keep endpoint, credential, blocked-request, response-limit and lifecycle assertions. Reduce the shard from 555 original lines to 414. Static lint and formatting pass; runtime proof remains deferred to hosted CI. * test(acpx): deslop s0843 tests Share native-catalog registration defaults and simplify the setup probe fixture. Keep every catalog, environment-policy, error-redaction and runtime lifecycle case. The startup/first-use test in register.runtime.test.ts now owns the service ID assertion; its start/stop behavior covers the removed index.test.ts function-shape checks. Preserve both pre-publication and post-publication shutdown races. * test(acpx): consolidate s0843 registration suite Move register.runtime.test.ts into index.test.ts under the same ACPX Vitest include. Table the before-publication and pending-probe shutdown races while retaining concurrent admission, stale proxy, cleanup ordering and successor ownership assertions. The current-config native inspection case covers the removed repeated disabled inventory read after re-registration. Retain representative installed, missing and unverified states instead of copying the entire agent inventory. Share discovery setup across ready, auth-rejected and unavailable outcomes, keeping env policy and private error-data assertions. * test(gateway): deslop s0846 tests Share discovery setup, remove a single-use blocked-probe wrapper, and simplify deadline fixtures without removing distinct behavior. Retain public redaction, credential-discovery exclusions, ingress pressure/privacy, aggregate deadlines, wall-clock steps, drain ownership, and cross-collection permit retention. CI-only validation: oxfmt, oxlint, and diff checks; no test runs. * test(gateway): consolidate s0846 health coverage Combine admitted/configured-unavailable discovery into one catalog scenario, retaining public redaction, bindings, disabled accounts, failure reporting, and credential-discovery exclusion. Preserve ingress pressure forwarding in the queue admission-failure scenario. Remove the retry-floor construction replay: src/channels/message/ingress-queue-health.test.ts covers it in 'reports durable pressured lanes without leaking private or null-lane rows'. Retrying account field preservation remains in channels.status.test.ts's 'reports admitted accounts safely without resolving removed configuration' matrix. Session SQLite paths remain covered by collector.session-store-path.test.ts's 'scopes template stores and recovers from transient reads'. Consolidate elapsed-preparation and forward/backward clock cases into one table with all three executed branches. Retain slow-summary public negative redaction, mixed healthy/deadline results, unfinished-work draining, and cross-collection permit ownership. No production changes. CI-only checks: oxfmt, oxlint, git diff --check; no tests run. * test(onepassword): deslop s0848 tests * test(onepassword): consolidate s0848 broker scenarios Share rejection and live-policy cases, unify grant/cache lifetime proof, and combine nonce session correlation checks. Preserve approval, replay, expiry, and pending-write race boundaries. Remove duplicate list-state assertions covered by tool-list.test.ts: validates selected grants. CI-only: formatting, oxlint and diff checks passed; no tests run. * test(llm): deslop s0847 tests Remove the host-function identity probe; the retained installed-host test proves wrapping through the prepared request header, and the authority matrix proves empty full-completion context. Consolidate same-path read-tool source fixtures while preserving every original payload assertion. Keep distinct authority, redaction, pacing, recovery, and callback-retention cases. * test(llm): consolidate s0847 host boundary proof Fold installed-wrapper proof into the prepared/full authority matrix; keep both dispatch paths and current, retired, and aborted outcomes. Remove options-identity and fixture-state assertions, share embedded-stream setup, and derive ordering observations from the provider spy. Remaining covering tests: isolated-completion.usage.test.ts retains the host's returned usage exactly once when its caller is accepted, retired, or aborted; session-tool-result-guard.test.ts preserves read bytes in model context and transcript through a real read; tool-result-redaction.test.ts preserves structured fields and source strings; packages/ai/src/providers/anthropic.test.ts preserves mixed text and image tool-result order; packages/ai/src/stream.host-scope.test.ts accepts frozen provider streams and preserves producer completion identity. The retained callback-retention probe covers iteration and result consumption lifecycles. Keep exact installed-host image bytes, MIME/base64 normalization, both registered-secret diagnostic boundaries, and full raw source-byte fidelity in Anthropic and OpenAI-compatible payloads. Remove duplicate fake filesystem and structured-extractor layers and per-input replays through the same text path. CI-only validation: formatting, diff-check, and plain oxlint passed; no test or build runs. * test(devices): deslop s0849 tests Share approval snapshots, row selectors, pairing props, and pending-state assertions without dropping any case or distinct behavior. Preserve approval ownership, native read-only policy, binding loss/recovery, retry retirement, access gating, and live-region assertions. * test(devices): consolidate s0849 behavior coverage Remove duplicate creation-error/retry and mobile help proof covered by ui/src/e2e/mobile-pairing.e2e.test.ts: retires exact setup credentials across success, expiry, regeneration, and errors. RPC status routing remains covered by ui/src/lib/device-pair-setup.test.ts: retries an unknown outcome without minting a replacement credential. Share the scope picker render with wildcard/agent policy assertions and the waiting node render with command, expiry, help, and persistent live-region assertions. Keep exact-ID and ambiguous-name binding paths, both default and agent bindings, loss/recovery, authority callbacks, and close/reopen late-response retirement. Supply dirty state so native-policy read-only proof cannot pass merely because the form is clean. No production changes; CI-only static validation. * test(discord): deslop s0851 tests Share HTTP and store fixtures, table pending-launch decision paths, and retain OAuth, body limits, session, channel, CSP, and account-isolation assertions. The global-capacity case now checks the budget both before and after settlement; the vendor retry case reads the real generated asset path. Remove redundant internal lookup/read counts and shell path-slicing source text checks. * test(deepgram): deslop s0850 tests Verify nested realtime configuration through the loopback request rather than duplicating its normalized object. Keep default model and endpointing assertions on the existing default-config scenario. Flux protocol cases cover successful model routing, including case/whitespace normalization; audio.test.ts covers nova-3 HTTP routing. Keep missing-transcript rejection as the representative of the shared non-string guard. Preserve lifecycle, deadline, redaction, and private-network assertions. CI-only shard: oxlint, oxfmt, and diff checks passed; tests and coverage not run. Retain remaining distinct behaviors despite falling short of the 25 percent LOC target. * test(deepgram): consolidate s0850 transport fixtures Share only the loopback server, upgrade capture and cleanup; keep Flux process/provider mocks isolated from the realtime suite. Consolidate turn, config-rejection and finalization cases into branch tables without dropping their lifecycle or security assertions. Preserve both finalized/provisional reconnect paths, provider-reply/fallback close paths, silence gaps, transcript bounds, private-network rejection, URL redaction and Flux wire/query checks. Retain all 22 cases from the prior shard commit. Original shard: 562 lines. Final: realtime 217 + Flux 177 + shared support 27 = 421 lines (25.1 percent reduction). CI-only: oxfmt, plain oxlint and diff checks pass; no tests or coverage run. * test(brave): deslop s0853 tests Remove repeated shared-cache TTL coverage; web-search-provider-common.test.ts retains the reader TTL contract, while Brave result-cap and credential tests retain cache-hit and isolation proof. Simplify fixtures and remove exact diagnostic metadata/error wording snapshots, preserving cancellation, endpoint policy, publication dates, and log redaction assertions. * test(brave): consolidate s0853 boundary fixtures Consolidate publication-date and wrapped-content assertions into maps-and-caches cases; retain caller cancellation as a distinct transport-table case. Move locale rejection cases into the validation table, minimize logger fixtures, and remove duplicate cache/diagnostic wiring assertions. Keep DNS handoff, cancellation, deadline, endpoint policy, credential isolation, and diagnostic privacy contracts. CI-only: formatting, diff checks, and plain oxlint passed; no test runs. * test(github): deslop s0852 tests Consolidate check aggregation, cache transitions, log redaction, and rejection fixtures while retaining security and lifecycle assertions. Drop the duplicate cooldown replay covered by detail.test.ts: normalizes and caches rate limits; optional-check body preservation remains in keeps the PR after HTTP. Metadata tone projection remains covered by index.test.ts: maps badges and metadata. CI-only validation: plain oxlint, oxfmt, and git diff --check. * test(ui): deslop s0854 tests Consolidate Labs toggle cases, exact patch assertions, and pending-save setup. Preserve all 37 expanded cases, including reconnect/navigation retirement and unavailable decision preferences. Reduce labs-page.test.tsx from 557 to 417 lines. Static oxlint, formatting, and diff checks pass; runtime proof is deferred to hosted CI per campaign instructions. * test(link-understanding): deslop s0855 tests * test(link-understanding): consolidate s0855 boundary coverage Move Markdown variants and dedupe/limit proof into the real-transport extraction case. The prepared-model-text table now owns successful processing, empty-output fallback, and timeout selection; the streaming table retains separate cancellation and timeout branches. Remove redundant command call-shape instrumentation while retaining SSRF, privacy, cleanup ordering, and descendant cancellation assertions. * test(google-meet): deslop s0856 tests * test(google-meet): consolidate s0856 harness cleanup * test: retain independent provider boundary coverage * test: align consolidated fixtures with current types * test: preserve mock isolation and bound catalog methods * test: prune retired mock export allowances * test(llm): preserve structural image payload assertions * test(llm): retain transport logger fixture contract
) * test(llm): consolidate s0841 observation coverage Remove the catalog/fast-mode replay: prepared-model-runtime.catalog-auth.test.ts already covers downgrade/recovery clearing in 'notifies downgrade, recovery, and expiry while refreshing repeats and canceling retired timers'; openai.test.ts covers 'preserves Ultrafast on the API boundary at %s'. Preserve observer forwarding and repeated-observation log severity in the retry-attribution case. Keep the real-transport cooldown and run-isolation cases. * test(litellm): deslop s0840 tests Consolidate authored noninteractive setup into the existing setup table and reuse onboarding model/config assertions. Keep interactive profile and normalized-key proof in the authored-settings cases, configured-URL fallback in the URL table, and merge-mode proof in onboarding's authored-metadata cases. Preserve the alias and discovery regressions from openclaw#174824 and openclaw#174818. No production or routing changes. * test(litellm): consolidate s0840 owner-boundary coverage Retire the mocked interactive harness in index.test.ts. The onboarding tests 'normalizes %j to %j and selects the first served model', 'rejects invalid proxy URL %s', and 'preserves authored metadata in %s mode with canonical row %s' now carry URL, validation, credential and canonical-row assertions through discovery-backed setup. Keep noninteractive defaults, alias preservation and catalog endpoint selection in index.test.ts. Remove the provider-local credential persistence replay and internal mock call inventory. The shared owner test src/plugins/provider-api-key-auth.test.ts 'persists non-interactive credentials through the runtime auth owner' retains actual persistence proof. LiteLLM keeps its public flag/env wiring and resulting auth configuration assertions. No production or Vitest routing changes. Static checks only, per campaign CI-only mode. * test(google-meet): deslop s0842 tests Replace hand-built registration capture arrays with typed API spies and simplify the child-process mock factory. Keep all lazy-load, policy failure, URL validation, diagnostic, and lifecycle assertions. Drop the active-pair SIGTERM-resistance table row: shares SIGTERM-resistant cleanup across concurrent stopByUrl calls retains the same stopSession/process termination path. Keep the retired-output row for its distinct cleanup ownership. CI-only validation: oxfmt, git diff --check, and plain oxlint passed. No tests or coverage run. Lines 492 -> 459 (6.7%); retain unique behavior rather than force the 25% target. * test(google-meet): remove redundant lazy import replay Keep cold registration, node-owner activation and both policy failure boundaries. Consolidate observation launch setup and remove duplicate process counts, response inventories and backend metadata assertions. Remaining proof: src/shared/lazy-runtime.test.ts caches imported modules; index.test.ts keeps test-listen probes on the agent that invoked the tool, creates and joins a Meet through the create tool action by default, refreshes blocked realtime browser health read-only when status is requested, and registers the node-host command used by chrome-node transport. CLI proof remains in src/cli.test.ts accepts --json on session status and runs a listen-first health probe. Transcript lifecycle remains in src/meeting-bot/transcripts-bridge.test.ts retires simultaneous tool subscribers when meeting metadata finalization fails; native backend defaults remain in src/meeting-bot/configured-node-host.test.ts selects the native backend for macOS and Linux. CI-only validation: oxfmt, plain oxlint and git diff --check pass; no test runs. Shard base lines: lazy-import 208 -> 121, node-host 284 -> 247; total 492 -> 368 (-25.2%). * test(ui): deslop s0844 tests Share scroll fixtures and frame assertions while retaining replacement, readiness, font, cancellation and disposal coverage. Remove the duplicate in-place projection case: publishes local mutations while observed and reconnects after the last reader leaves retains its synchronous-read, deferred-notification and revision assertions. * test(ui): consolidate s0844 owner-boundary proof Table mutable/callback adapter lifecycles and share settled-value assertions. Keep explicit-subscriber identity and pending-disposal ordering checks. Simplify restore inputs without repeating the request producer. Covering sibling tests: shared-owner-projection.test.ts / shares the fixed projection across independent consumers, owners, and read contracts retains lazy acquisition, first/last release, reconnect and same-object mutation proof. scroll-state-observer.test.ts / releases retired publishers while fonts load and remeasures active views retains font event and retirement proof; batches geometry and scrolls retains event coalescing. Shard replacement, hidden-content and live-target disposal cases retain Solid binding lifecycle proof. * test(comfy): deslop s0845 tests Share workflow and response fixtures; reuse mock call recording and compact assertions without dropping any of the 24 expanded cases. Retain all private-network, redirect, credential, terminal-error, timeout, seed isolation, upload and download contracts. Static gates pass; runtime proof deferred to batch CI. * test(comfy): consolidate s0845 provider proof Retain all 24 expanded cases while consolidating readiness and redirect fixtures, reusing the real SSRF harness for cloud authentication, and removing internal call-count and audit-label assertions. Keep endpoint, credential, blocked-request, response-limit and lifecycle assertions. Reduce the shard from 555 original lines to 414. Static lint and formatting pass; runtime proof remains deferred to hosted CI. * test(acpx): deslop s0843 tests Share native-catalog registration defaults and simplify the setup probe fixture. Keep every catalog, environment-policy, error-redaction and runtime lifecycle case. The startup/first-use test in register.runtime.test.ts now owns the service ID assertion; its start/stop behavior covers the removed index.test.ts function-shape checks. Preserve both pre-publication and post-publication shutdown races. * test(acpx): consolidate s0843 registration suite Move register.runtime.test.ts into index.test.ts under the same ACPX Vitest include. Table the before-publication and pending-probe shutdown races while retaining concurrent admission, stale proxy, cleanup ordering and successor ownership assertions. The current-config native inspection case covers the removed repeated disabled inventory read after re-registration. Retain representative installed, missing and unverified states instead of copying the entire agent inventory. Share discovery setup across ready, auth-rejected and unavailable outcomes, keeping env policy and private error-data assertions. * test(gateway): deslop s0846 tests Share discovery setup, remove a single-use blocked-probe wrapper, and simplify deadline fixtures without removing distinct behavior. Retain public redaction, credential-discovery exclusions, ingress pressure/privacy, aggregate deadlines, wall-clock steps, drain ownership, and cross-collection permit retention. CI-only validation: oxfmt, oxlint, and diff checks; no test runs. * test(gateway): consolidate s0846 health coverage Combine admitted/configured-unavailable discovery into one catalog scenario, retaining public redaction, bindings, disabled accounts, failure reporting, and credential-discovery exclusion. Preserve ingress pressure forwarding in the queue admission-failure scenario. Remove the retry-floor construction replay: src/channels/message/ingress-queue-health.test.ts covers it in 'reports durable pressured lanes without leaking private or null-lane rows'. Retrying account field preservation remains in channels.status.test.ts's 'reports admitted accounts safely without resolving removed configuration' matrix. Session SQLite paths remain covered by collector.session-store-path.test.ts's 'scopes template stores and recovers from transient reads'. Consolidate elapsed-preparation and forward/backward clock cases into one table with all three executed branches. Retain slow-summary public negative redaction, mixed healthy/deadline results, unfinished-work draining, and cross-collection permit ownership. No production changes. CI-only checks: oxfmt, oxlint, git diff --check; no tests run. * test(onepassword): deslop s0848 tests * test(onepassword): consolidate s0848 broker scenarios Share rejection and live-policy cases, unify grant/cache lifetime proof, and combine nonce session correlation checks. Preserve approval, replay, expiry, and pending-write race boundaries. Remove duplicate list-state assertions covered by tool-list.test.ts: validates selected grants. CI-only: formatting, oxlint and diff checks passed; no tests run. * test(llm): deslop s0847 tests Remove the host-function identity probe; the retained installed-host test proves wrapping through the prepared request header, and the authority matrix proves empty full-completion context. Consolidate same-path read-tool source fixtures while preserving every original payload assertion. Keep distinct authority, redaction, pacing, recovery, and callback-retention cases. * test(llm): consolidate s0847 host boundary proof Fold installed-wrapper proof into the prepared/full authority matrix; keep both dispatch paths and current, retired, and aborted outcomes. Remove options-identity and fixture-state assertions, share embedded-stream setup, and derive ordering observations from the provider spy. Remaining covering tests: isolated-completion.usage.test.ts retains the host's returned usage exactly once when its caller is accepted, retired, or aborted; session-tool-result-guard.test.ts preserves read bytes in model context and transcript through a real read; tool-result-redaction.test.ts preserves structured fields and source strings; packages/ai/src/providers/anthropic.test.ts preserves mixed text and image tool-result order; packages/ai/src/stream.host-scope.test.ts accepts frozen provider streams and preserves producer completion identity. The retained callback-retention probe covers iteration and result consumption lifecycles. Keep exact installed-host image bytes, MIME/base64 normalization, both registered-secret diagnostic boundaries, and full raw source-byte fidelity in Anthropic and OpenAI-compatible payloads. Remove duplicate fake filesystem and structured-extractor layers and per-input replays through the same text path. CI-only validation: formatting, diff-check, and plain oxlint passed; no test or build runs. * test(devices): deslop s0849 tests Share approval snapshots, row selectors, pairing props, and pending-state assertions without dropping any case or distinct behavior. Preserve approval ownership, native read-only policy, binding loss/recovery, retry retirement, access gating, and live-region assertions. * test(devices): consolidate s0849 behavior coverage Remove duplicate creation-error/retry and mobile help proof covered by ui/src/e2e/mobile-pairing.e2e.test.ts: retires exact setup credentials across success, expiry, regeneration, and errors. RPC status routing remains covered by ui/src/lib/device-pair-setup.test.ts: retries an unknown outcome without minting a replacement credential. Share the scope picker render with wildcard/agent policy assertions and the waiting node render with command, expiry, help, and persistent live-region assertions. Keep exact-ID and ambiguous-name binding paths, both default and agent bindings, loss/recovery, authority callbacks, and close/reopen late-response retirement. Supply dirty state so native-policy read-only proof cannot pass merely because the form is clean. No production changes; CI-only static validation. * test(discord): deslop s0851 tests Share HTTP and store fixtures, table pending-launch decision paths, and retain OAuth, body limits, session, channel, CSP, and account-isolation assertions. The global-capacity case now checks the budget both before and after settlement; the vendor retry case reads the real generated asset path. Remove redundant internal lookup/read counts and shell path-slicing source text checks. * test(deepgram): deslop s0850 tests Verify nested realtime configuration through the loopback request rather than duplicating its normalized object. Keep default model and endpointing assertions on the existing default-config scenario. Flux protocol cases cover successful model routing, including case/whitespace normalization; audio.test.ts covers nova-3 HTTP routing. Keep missing-transcript rejection as the representative of the shared non-string guard. Preserve lifecycle, deadline, redaction, and private-network assertions. CI-only shard: oxlint, oxfmt, and diff checks passed; tests and coverage not run. Retain remaining distinct behaviors despite falling short of the 25 percent LOC target. * test(deepgram): consolidate s0850 transport fixtures Share only the loopback server, upgrade capture and cleanup; keep Flux process/provider mocks isolated from the realtime suite. Consolidate turn, config-rejection and finalization cases into branch tables without dropping their lifecycle or security assertions. Preserve both finalized/provisional reconnect paths, provider-reply/fallback close paths, silence gaps, transcript bounds, private-network rejection, URL redaction and Flux wire/query checks. Retain all 22 cases from the prior shard commit. Original shard: 562 lines. Final: realtime 217 + Flux 177 + shared support 27 = 421 lines (25.1 percent reduction). CI-only: oxfmt, plain oxlint and diff checks pass; no tests or coverage run. * test(brave): deslop s0853 tests Remove repeated shared-cache TTL coverage; web-search-provider-common.test.ts retains the reader TTL contract, while Brave result-cap and credential tests retain cache-hit and isolation proof. Simplify fixtures and remove exact diagnostic metadata/error wording snapshots, preserving cancellation, endpoint policy, publication dates, and log redaction assertions. * test(brave): consolidate s0853 boundary fixtures Consolidate publication-date and wrapped-content assertions into maps-and-caches cases; retain caller cancellation as a distinct transport-table case. Move locale rejection cases into the validation table, minimize logger fixtures, and remove duplicate cache/diagnostic wiring assertions. Keep DNS handoff, cancellation, deadline, endpoint policy, credential isolation, and diagnostic privacy contracts. CI-only: formatting, diff checks, and plain oxlint passed; no test runs. * test(github): deslop s0852 tests Consolidate check aggregation, cache transitions, log redaction, and rejection fixtures while retaining security and lifecycle assertions. Drop the duplicate cooldown replay covered by detail.test.ts: normalizes and caches rate limits; optional-check body preservation remains in keeps the PR after HTTP. Metadata tone projection remains covered by index.test.ts: maps badges and metadata. CI-only validation: plain oxlint, oxfmt, and git diff --check. * test(ui): deslop s0854 tests Consolidate Labs toggle cases, exact patch assertions, and pending-save setup. Preserve all 37 expanded cases, including reconnect/navigation retirement and unavailable decision preferences. Reduce labs-page.test.tsx from 557 to 417 lines. Static oxlint, formatting, and diff checks pass; runtime proof is deferred to hosted CI per campaign instructions. * test(link-understanding): deslop s0855 tests * test(link-understanding): consolidate s0855 boundary coverage Move Markdown variants and dedupe/limit proof into the real-transport extraction case. The prepared-model-text table now owns successful processing, empty-output fallback, and timeout selection; the streaming table retains separate cancellation and timeout branches. Remove redundant command call-shape instrumentation while retaining SSRF, privacy, cleanup ordering, and descendant cancellation assertions. * test(google-meet): deslop s0856 tests * test(google-meet): consolidate s0856 harness cleanup * test: retain independent provider boundary coverage * test: align consolidated fixtures with current types * test: preserve mock isolation and bound catalog methods * test: prune retired mock export allowances * test(llm): preserve structural image payload assertions * test(llm): retain transport logger fixture contract
Related: #173300, #173164
What Problem This Solves
Fixes two LiteLLM reauthentication failures after upgrading a config created by published OpenClaw 2026.10.4: a mixed-case provider loses its proxy URL, and activating the saved sign-in restores duplicate
LiteLLM/litellmrows.User Impact
Users can reauthenticate without repeating
--custom-base-url, retain their authored models and provider settings, and activate the saved sign-in with one canonical provider row. There is no schema or public API change.Why This Change Was Made
LiteLLM selected defaults from only the lowercase key before the existing merger folded provider casing, replacing the saved URL with
http://localhost:4000. It now uses the existing public provider-config resolver for setup defaults and URL handling. Catalog URL/path selection keeps its original paired lookup.A successful live activation then exposed setup projection appending the selected row to the old config. Projection now selects the authoritative prepared row using the same canonical-first resolver and removes equivalent old keys before publishing that complete snapshot. Unrelated providers stay intact.
Production LOC: +21/-14 (net +7). Tests: +109/-42. Docs: +4/-1. Removed duplicate LiteLLM lookup logic pays for most of the projection repair; the remaining seven lines perform canonical selection and remove obsolete aliases at the publishing owner. Existing test matrices cover omitted URLs, conflicting prepared rows, eight credential forms, and unrelated provider preservation.
Evidence
qwen3:4b. Direct chats requestqwen3:4b; no canned responses.Read-only Doctor preserved config bytes; supported noninteractive Doctor repair migrated stable database schema 24 with service management disabled and provider objects unchanged. No operator state, Gateway, LaunchAgent, or real credentials used. Platform scope: macOS arm64 CLI/embedded-agent upgrade; other operating systems and managed-service update paths were not exercised. The first unaliased native probe correctly reached the saved endpoint but returned 404 because Ollama does not serve the LiteLLM starter alias; that fixture result is retained separately from the final passing proof.
ClawSweeper reviewed the final head with no code findings; its proof-only/auth-provider hold requests public captures, while the final-head upgrade and relay evidence remains local for the campaign lead’s review.
CI passed on
6bf0f2b64c08d43eb0242b2c783c396e9120fcd9, includingopenclaw/ci-gate: https://github.com/openclaw/openclaw/actions/runs/38986285616. No landing performed.