Repository navigation
fix(openrouter): isolate custom proxy credentials and transport security - #118773
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 1:25 PM ET / 17:25 UTC. ClawSweeper reviewWhat this changesThe PR makes OpenRouter catalog discovery, dynamic models, usage reporting, and speech use a configured OpenRouter-compatible proxy origin and request transport policy instead of sending those credentialed calls to the public OpenRouter endpoint. Merge readinessKeep this PR open for explicit maintainer review. Current Priority: P0 Review scores
Verification
How this fits togetherThe bundled OpenRouter provider turns model-provider configuration into catalog, inference-model, usage, and text-to-speech HTTP calls. Those calls must retain the selected endpoint, credentials, proxy settings, and SSRF policy so a custom OpenRouter-compatible service receives its own traffic without leaking credentials or bypassing configured transport controls. flowchart LR
A[OpenRouter provider configuration] --> B[Validated request policy]
B --> C[Catalog discovery]
B --> D[Dynamic model resolution]
B --> E[Usage and speech requests]
C --> F[Configured OpenRouter-compatible origin]
D --> F
E --> F
F --> G[Guarded HTTPS and proxy transport]
Decision needed
Why: The patch deliberately changes where existing custom-endpoint credentials and transport settings are applied; that is the intended repair, but it is a provider security and compatibility contract that needs owner acceptance rather than automated policy selection. Before merge
Agent review detailsSecurityNone. PR surfaceSource +132, Tests +696. Total +828 across 8 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use one validated configured OpenRouter API origin and the existing shared HTTP/SSRF request-policy seams for every credentialed OpenRouter path, then land only after the security owner refreshes the full exact-head review against current Do we have a high-confidence way to reproduce the issue? Yes, source inspection gives a high-confidence current-main path: catalog, dynamic-model, and usage owners hard-code the public OpenRouter destination even when a provider configuration can carry a custom base URL and request policy. The PR body also supplies an after-fix loopback TLS and CONNECT-proxy run for the repaired paths. Is this the best way to solve the issue? Yes, the submitted direction is the maintainable fix: it moves each credentialed OpenRouter owner onto the existing configured HTTP-request and SSRF-policy seams instead of adding downstream credential guards or a separate proxy implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8406cfeac162. 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
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
* origin/main: (25 commits) test(qa): cover plugin authoring contracts (#118821) fix(parallels): keep provider keys out of POSIX job logs (#118840) improve: reduce redundant Code Mode test work (#118815) fix(models): report primary OpenRouter limits in scans (#110855) test: speed up setup inference fixtures (#118811) fix(auto-reply): enforce canonical reset authorization (#118580) docs(gateway): fix invalid heartbeat visibility examples (#118827) fix(plugins): unify HTTP route conflict handling (#118203) test(agents): use prepared auth fixtures (#118816) fix(lmstudio): resolve JIT embedding variants fix(lmstudio): preserve embedding preload and model identity fix(ai): reject binary Codex websocket frames (#111138) fix(deps): bump brace-expansion override to 5.0.9 for HIGH advisory 1130705 (#118804) feat(cli): add session archive and delete commands (#118791) fix(openai): commit eligible final realtime transcription audio safely (#118782) fix(reef): restrict management commands to owners [AI] (#118578) fix(google): honor Cloud SDK credential location and Vertex billing project (#118745) fix(bedrock): preserve private embedding endpoints and AWS routing policy (#118744) fix(voice): make signed callback replay reservations durable and retryable (#118754) fix(openrouter): isolate custom proxy credentials and transport security (#118773) ...
…ity (openclaw#118773) * fix(openrouter): confine custom endpoint credentials and transport policy * test(openrouter): preserve typed fetch arguments in proxy fixtures
Actual configured HTTPS origin and HTTP CONNECT proxy proof
Ran the actual OpenRouter buildOpenrouterLiveProvider, fetchOpenRouterUsage, and speech synthesis owner against an ephemeral local HTTPS server through a real ephemeral HTTP CONNECT corporate proxy, using real Undici guarded dispatch and a temporary in-memory self-signed certificate. No external network, user credential, or persisted certificate was accessed.
This is an actual TLS transport, actual corporate CONNECT proxy, actual configured dispatcher/selected credentials, and actual provider catalog/usage owner; explicit private-network denial provably establishes zero additional connections. Six existing mocked-fetch test annotations are being aligned with the public fetch signature; production code remains unchanged.