feat(providers): add ClawRouter managed proxy#93832
Conversation
|
Codex review: needs changes before merge. Reviewed June 16, 2026, 9:31 PM ET / 01:31 UTC. Summary PR surface: Source +564, Tests +588, Docs +85, Config +28, Other +7. Total +1272 across 22 files. Reproducibility: yes. by source inspection: ClawRouter native rows require prepareClawRouterRequestModel, but the normal embedded-agent and compaction callers do not set applyProviderWrapper at the current PR head. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Compose the ClawRouter wrapper on every runtime path that can use boundary transports, then land only after focused runtime coverage and changed-gate proof are green. Do we have a high-confidence way to reproduce the issue? Yes, by source inspection: ClawRouter native rows require prepareClawRouterRequestModel, but the normal embedded-agent and compaction callers do not set applyProviderWrapper at the current PR head. Is this the best way to solve the issue? No. The provider implementation is plausible, but the best fix is to make wrapper composition cover normal runtime paths, not only /btw and the focused helper path. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 43400f8d5b50. Label changesLabel justifications:
Evidence reviewedPR surface: Source +564, Tests +588, Docs +85, Config +28, Other +7. Total +1272 across 22 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
4e440a0 to
1a312aa
Compare
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Dependency graph changes notedThis PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin or a member of
Security review is still recommended before merge when the dependency graph change is intentional. |
8e8da16 to
11a3f74
Compare
Summary
clawrouterprovider backed by ClawRouter's credential-scoped live catalogIntentionally out of scope: silently replacing existing
openai/*,anthropic/*, or other provider namespaces. Users explicitly selectclawrouter/<provider>/<model>.Linked context
Related: openclaw/clawrouter#31
Requested by a maintainer/owner as the OpenClaw integration for ClawRouter.
Real behavior proof (required for external PRs)
https://clawrouter.openclaw.aion ClawRouter commitab73a19ca4a8564007fd54ad196e746e62ccdd8e.Tests and validation
node_modules/.bin/vitest run extensions/clawrouter/index.test.ts extensions/clawrouter/provider-catalog.test.ts src/agents/provider-stream.test.ts src/agents/btw.test.ts(101 passed)oxfmt,oxlint, andgit diff --check.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/mainwith deployed contract context (clean)pnpm check:changedthrough Crabbox (running; draft stays open until green)Regression coverage includes credential-scoped catalog discovery, native route selection, managed secret refs, stable model ids, request-boundary rewriting, native replay policy, direct stream wrappers,
/btw, and runtime auth composition.Risk checklist
Did user-visible behavior change?
YesDid config, environment, or migration behavior change?
Yes- addsCLAWROUTER_API_KEYand a bundled provider.Did security, auth, secrets, network, or tool execution behavior change?
Yes- adds credential-scoped catalog discovery and request dispatch through ClawRouter.Highest risk: composing runtime-managed credentials with native provider transports. Mitigation: request-boundary model rewriting, no process-global credential cache, provider wrappers on direct paths, ClawRouter edge credential stripping, and focused regression coverage.
Current review state
Next action: wait for the authoritative Crabbox changed-gate, mark ready, then use the repo-native prepare and merge flow.
Addressed autoreview findings across native route selection, managed auth isolation, stable catalog ids, Gemini streaming requirements, direct stream paths, and runtime auth composition. The final review is clean.