Repository navigation
fix(litellm): choose models served by the configured proxy - #174818
Conversation
Reuse shared self-hosted discovery during interactive setup, preserving configured credentials and transport policy. Fall back to manual model entry with a visible reason. Keep noninteractive defaults unchanged. Follow-up to #173164 by @midhunvnadh; thanks to @Hylance for reporting #44789.
|
🦞👀 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 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. |
|
Codex review: needs maintainer review before merge. What this changesInteractive LiteLLM setup discovers proxy models, offers manual fallback, and checks configuration authority before sending credentials. Example: The configured LiteLLM proxy advertises only local-qwen.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it fixes a confirmed LiteLLM setup limitation that remains on main. No actionable introduced defect was found; exact-head CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe LiteLLM plugin receives setup configuration and credentials, delegates model listing to shared guarded discovery, and returns a selection through the existing provider-preset and authentication owners. flowchart TD
A[Classic setup wizard] --> B[LiteLLM authentication]
B --> C[Shared model discovery]
C --> D[Guarded proxy request]
D --> E[Model picker or manual entry]
E --> F[Provider preset and auth result]
F --> G[Existing config persistence]
Technical reviewBest possible solution: Land the discovery-backed picker through the existing owners once the required exact-head checks pass. Do we have a high-confidence way to reproduce the issue? Current-main source still seeds the fixed LiteLLM default during interactive authentication, matching the report when the proxy serves only local-qwen; supplied CLI captures additionally demonstrate the stale-authority request before repair. Is this the best way to solve the issue? The patch uses the established discovery, transport-policy, secret-resolution, and preset owners, preserves noninteractive defaults and authored settings, and stops revoked discovery without suppressing ordinary manual fallback. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9a81e55bab1f. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +276, Tests +574, Docs +15, Other -8. Total +857 across 19 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
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 HistoryReviewed October 16, 2026, 11:51 PM ET / October 17, 2026, 03:51 UTC (Revision 3). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…174818) * fix(litellm): select a model served by the configured proxy Reuse shared self-hosted discovery during interactive setup, preserving configured credentials and transport policy. Fall back to manual model entry with a visible reason. Keep noninteractive defaults unchanged. Follow-up to openclaw#173164 by @midhunvnadh; thanks to @Hylance for reporting openclaw#44789. * test(litellm): preserve the generic model picker signature * test(litellm): keep discovery fixtures on public plugin contracts * fix(litellm): preserve headerless discovery requests * fix(setup): revoke stale LiteLLM discovery authority * test(setup): isolate config authority fixtures * test(setup): preserve auth module exports in fixture * test(setup): shrink obsolete mock export exceptions * fix(setup): compare authored revision after agent creation * test: preserve wizard orchestration fixtures with setup authority
* 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: #44789. Follow-up to #173164 and #173300.
What Problem This Solves
Interactive LiteLLM setup seeded
litellm/claude-opus-4-6even when the configured proxy served only another model. It could also send discovery credentials to an old endpoint if the setup config changed during awaited credential preparation.User Impact
After entering the proxy URL and key, users choose an advertised model, with the first model selected by default. Discovery failures show a safe reason and offer manual entry. Revoked setup authority aborts visibly before credential-bearing discovery. Noninteractive defaults remain unchanged. Re-authentication retains an existing primary and makes the selected model available, preserving the published contract.
Why This Change Was Made
The picker extends the existing custom/self-hosted discovery owner. It resolves configured headers and transport SecretRefs through existing policy, retains SSRF/proxy/TLS protections, and records the selection through the provider preset owner. The wizard carries its original config-source authority through auth and verification repair. First-agent creation uses the existing revision precondition; adoption compares the canonical authored revision, which covers root/include inputs, rather than plugin-generated runtime defaults. Revocation cannot become an advisory manual fallback.
Thanks to @midhunvnadh for the URL and canonical-row groundwork in #173164 and @Hylance for reporting #44789.
Evidence
Final head:
4811c2e49d074ca2c207c2b7b8252c43080bbbb5. Real transport and upgrade captures use production head6a118fc0e4bbddc32ce7790c704756977d637a54; subsequent changes only repair orchestration test fixtures and shrink their baseline.Real credential-destination capture
Real
pnpm openclaw onboard --classic --auth-choice litellm-api-keyPTYs on macOS, isolated state/profile/ports, synthetic credentials, and recording relays A/B. The revocation case blocks an exec SecretRef resolver on a relay-controlled event, replaces A with B in the config, then releases preparation; no sleeps determine the interleaving. Captures record method/path, header presence, and SHA-256 prefixes only. Digests below cover each complete header, includingBearerfor Authorization.GET /revoked-before/v1/models28fa5a09fb006fd70bd90acbGET /allowed-inline-final/v1/models28fa5a09fb006fd70bd90acblitellm/local-qwen; exit 0 (350.722s)GET /revoked-ready/v1/modelsconfig changed since last load; no picker/manual fallback; exit 1 (159.906s)GET /compat/v1/models28fa5a09fb006fd70bd90acbPOST /compat/v1/chat/completions28fa5a09fb006fd70bd90acbThe revoked case preserves the replacement endpoint and does not save the pending key. The allowed case uses inline synthetic credentials; the revoked case exercises awaited exec SecretRef preparation. An additional allowed exec-SecretRef run reached discovery once and saved the model, then encountered an unrelated finalization error requiring an active runtime snapshot to read the unresolved header; that limitation is retained rather than claimed as a successful full run.
Published configuration compatibility
The fixture was created by the published
[email protected]CLI in an isolated prefix/state. Registry provenance and package integrity were checked. The published config write completed; the older CLI then lingered during shared-state cleanup and its owned process was stopped. The upgrade preserves the credential value through the expected promotion from inline key to auth-profile pointer, header/request settings, both authored models and their metadata, replace mode, aliases, and workspace sentinel. The profile remains pending because later activation fails; this is not a successful complete upgrade. It folds the mixed-case provider key and displays the existing-primary note while addinglitellm/local-qwenas available.The first upgraded attempt exposed an overly strict runtime-object comparison in this repair. Full and skipped plugin validation produced different defaults from the same source/revision. A regression failed at that guard; the final correction uses authored revision equality and still rejects a foreign revision. Failed-attempt state was retained, and the final fixture was restored from the verified published config. Workspace sentinel bytes stayed unchanged.
The upgraded CLI made one credential-bearing
POST /compat/v1/chat/completionswith the same two digest prefixes as discovery. The relay mapped the preserved public model alias to Ollamaqwen3:4b, returned HTTP 200 in 7.776s, and the CLI displayed “AI access works.” Accepting activation then failed with “Activation failed and recovery could not complete. Newer connection settings superseded this activation. Those settings were preserved.” The identical failure reproduces on exact unchanged basecd57bc91d991ba1350009e935caaf21e70c09c89: real PTY exit 1 in 72.588s after an HTTP-200 Ollama verification (8.809s), with the same credential digests. This attributes the activation limitation independently of this PR; complete upgraded activation is not claimed.Tests and retained inference proof
pnpm build sourcePerformancepassed (452.7s).agent --localreturnedLOCAL_QWEN_OK; the relay forwardedlocal-qwento Ollamaqwen3:4b, HTTP 200 streaming in 7.1s. Earlier HTTP-503 PTY showed the reason, accepted manual entry and saved the model (131.8s). These are retained prior-head results, not claimed as final-head chat reruns.Final-head CI run 38999931474 passed: 51 successful jobs, including
openclaw/ci-gate; 25 skipped. The preceding run passed 46 jobs and exposed the now-repaired wizard test-fixture mismatch. ClawSweeper reviewed this exact head, accepted the real-transport and released-state evidence as sufficient, and reported no findings or before-merge items (ready for maintainer review).Local limitations: extension lint stopped before lint execution when Plugin SDK declaration preparation exceeded its existing 300s deadline. The local max-lines ratchet reports three pre-existing UI baseline/filename mismatches; those files, baseline and checker are byte-identical to base
cd57bc91d991ba1350009e935caaf21e70c09c89. No suppression was added. The import-memory profile remains unqualified. Proof is macOS-only, with a LiteLLM-compatible recording relay rather than an installed LiteLLM server. No operator Gateway or shared model lifecycle was changed.Production: +307/-31 (net +276); tests: +608/-34 (net +574); docs: +30/-15; baseline: 0/-8. Necessary growth implements the picker/manual fallback, configured transport resolution, and source-authority propagation within the existing owners. No second lister, dependency, schema, or public option was introduced.