Repository navigation
fix(models): use the configured proxy for local catalog refresh - #168554
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 maintainer review before merge. What this changesThis PR uses the existing managed proxy during standalone model catalog refresh and releases it afterward. Example: Run openclaw models list --refresh without a Gateway against an Ollama endpoint reachable through the configured proxy.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR: current main still skips managed proxy activation during standalone catalog refresh, and the focused repair has no identified correctness defect. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe models CLI selects Gateway inventory or a standalone catalog owner, acquires provider models on explicit refresh, and renders the resulting inventory. flowchart TD
A[Models CLI] --> B[Gateway selection]
B --> C[Gateway inventory]
B --> D[Standalone catalog owner]
D --> E[Managed proxy during refresh]
E --> F[Provider discovery]
C --> G[Model rows]
F --> G
Technical reviewBest possible solution: Use the existing managed proxy lifecycle around standalone refresh while preserving passive reads and Gateway-owned requests. Do we have a high-confidence way to reproduce the issue? Current-main source shows explicit standalone discovery after CLI startup bypasses managed proxy activation; the contributor also reports failing baseline regressions and successful CLI discovery after the fix. Is this the best way to solve the issue? The patch repairs routing at the standalone discovery boundary using the existing lifecycle owner, without adding networking policy or changing catalog ownership. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 471035c7b7c8. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +6, Tests +29, Docs +2. Total +37 across 3 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label 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 10, 2026, 2:17 PM ET / 18:17 UTC (Revision 3). |
|
Landed in 4b1de20. |
…claw#168554) ## What Problem This Solves Fixes: `openclaw models list --refresh` skips the configured managed proxy when no Gateway is running. ## User Impact Users can refresh provider models through their configured proxy without starting a Gateway. Cached lists and Gateway requests still bypass CLI proxy startup. No config changes are required. ## Why This Change Was Made The CLI startup policy bypasses the proxy for model lists. Local refresh can make provider requests after that decision. Start the existing managed proxy only around local refresh, and release it in `finally`, including when discovery fails. ## Evidence - The regression test on main (`53f4d20b1f0`) failed in two cases: local refresh did not start the proxy, and failed discovery did not release its handle. With this change, all 24 tests in `list.prepared-catalog.test.ts` passed. These cases also cover cached lists and Gateway refresh without proxy startup. - Ran the CLI with an isolated profile and no Gateway, using a local HTTP proxy and a synthetic Ollama server. The proxy logged `CONNECT 192.168.254.254:19875`, `GET /api/tags`, and `POST /api/show`. The CLI returned `ollama/proxy-proof:latest` as available, with a `ready` provider outcome. - Targeted lint passed. The formatter ran on the changed test, and `git diff --check` passed. Full-repository checks were not run locally. - The cached CLI command exited successfully with no proxy startup message and no new proxy log entries. It returned an empty cached inventory. Merge risk: two-way door; a revert restores the prior behavior without a state migration. The change affects only provider discovery during local `models list --refresh`. Cached lists and Gateway transport keep their current policy. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Fixes:
openclaw models list --refreshskips the configured managed proxy when no Gateway is running.User Impact
Users can refresh provider models through their configured proxy without starting a Gateway. Cached lists and Gateway requests still bypass CLI proxy startup. No config changes are required.
Why This Change Was Made
The CLI startup policy bypasses the proxy for model lists. Local refresh can make provider requests after that decision. Start the existing managed proxy only around local refresh, and release it in
finally, including when discovery fails.Evidence
8bb392d9810) failed in two cases: local refresh did not start the proxy, and failed discovery did not release its handle. With this change, all 24 tests inlist.prepared-catalog.test.tspassed. These cases also cover cached lists and Gateway refresh without proxy startup.CONNECT 192.168.254.254:19875,GET /api/tags, andPOST /api/show. The CLI returnedollama/proxy-proof:latestas available, with areadyprovider outcome.git diff --checkpassed. Full-repository checks were not run locally.Merge risk: two-way door; a revert restores the prior behavior without a state migration. The change affects only provider discovery during local
models list --refresh. Cached lists and Gateway transport keep their current policy.