Repository navigation
fix: sandbox agent pins and origin targets, agent payload plugin merge, Access-scoped redirect refusal - #171
LukasParke wants to merge 5 commits into
Conversation
…pluginId module-local The responses client normalizes https://openrouter.ai to https://openrouter.ai/api/v1, and the Kepler allowlist accepts the bare origin, but the sandbox agent target guard compared the raw path and rejected it. The guard now applies the same normalization, so origin-only targets pass while other paths and Previews stay rejected.
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
Original prompt from Luke
|
…ent payload plugins, scope redirect refusal to Access requests Deep SWE and SWE Atlas passed providerOnly/allowFallbacks to inference but not to the sandboxed CLI; the pi extension spread extraBody over the payload and dropped any plugins the agent already set; the Responses client refused redirects on every request instead of only those carrying Cloudflare Access headers, as the shared HTTP client does.
…verrides a generated one
TL;DR
Review findings on the #170 vendoring in openrouter-web #55480: Deep SWE and SWE Atlas dropped provider pins for the sandboxed CLI, the pi extension dropped the agent's own plugins, the Responses client refused redirects on every request, the sandbox target guard rejected the bare
https://openrouter.aiorigin, andpluginIdwas exported without a caller.What changed?
deep-swe/benchmark.ts,swe-atlas/benchmark.ts:agentClioptions now carryproviderOnlyandallowFallbacks(Terminal Bench already did), so the pi extension pinsprovider.only/allow_fallbacksinside the sandbox.agent-cli/harness.ts: the pi extension mergesextraBody.pluginswith the plugins already on the agent payload by id (configured wins on a shared id) before applying the generated router plugins, instead of spread-replacing the array.providers/responses-client.ts:redirect: "error"is set only when the request carriescf-access-*headers; other requests keep Fetch's defaultfollow, matching the shared HTTP client.agent-cli/sandbox-target.ts: the normalized endpoint appends/api/v1when the path does not already end with it (asnormalizeBaseUrlin the responses client does), and a URL with a query or fragment is rejected.https://openrouter.aiandhttps://openrouter.ai/pass;/preview/api/v1,/api/v2,?mode=test,#frag, malformed URLs and api-perf Previews are rejected.providers/router-plugin.ts:pluginIdis module-local.Why?
Perry review threads
4428045639,4428045672,4428045677and Devin Review findings on #55480: a pinned Deep SWE / SWE Atlas pi trial could run on another provider without an error, a payloadwebplugin was lost whenextraBody.pluginswas configured, a custom base URL that redirects to its canonical endpoint failed every request, and a Kepler-allowlisted bare origin was rejected for sandboxed agents.How to test
Expected: all green. New/updated tests:
agent-cli/sandbox-target.test.ts(origin-only accepted; query/fragment/alternate path rejected),agent-cli/harness.test.ts(payload plugins merged with configured plugins; override keeps the payload's own plugins),providers/responses-client.test.ts(redirect refusal only with Access headers).Reviewer focus
extraBody.plugins< generated router plugins, with a configured same-id plugin overriding the generated one.redirectPolicyreads the final request headers, so Access headers added throughtraceHeadersare what toggle the refusal.Checklist
pluginIdhad no external callers)Link to Devin session: https://openrouter.devinenterprise.com/sessions/1f0ee04b0a0846499f37c98842c75206
Open in Devin Desktop: https://openrouter.devinenterprise.com/desktop/session/1f0ee04b0a0846499f37c98842c75206?variant=devin
Requested by: @LukasParke