You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resolveModalRegions now strips the openrouter/ routing prefix before matching MODAL_REGION_PINS, so openrouter/sakana/fugu-ultra lands in a US sandbox like sakana/fugu-ultra does.
What changed?
New src/harness/model-slug.ts with stripRoutingPrefix, the logic previously inlined in agent-cli/runner.ts#normalizeAgentModel. normalizeAgentModel is now an alias of it, so existing importers are unaffected.
resolveModalRegions matches pins against the stripped slug.
Regression tests for the prefixed Fugu slug and for the helper (openrouter/auto stays intact).
Why?
Follow-up to #92. Region selection ran against the raw config model while the agent env ran against the normalized one, so a run configured with the routing-prefixed slug got default placement and the provider 403 the pin exists to avoid. Flagged by Devin Review on openrouter-web#44769.
How to test
bun test src/sandbox/modal-regions.test.ts src/harness/model-slug.test.ts
I'll be helping with this pull request! Here's what you should know:
✅ I will automatically:
Address comments on this PR that start with 'DevinAI' or '@devin'.
Look at CI failures and help fix them
Note: I can only respond to comments from users who have write access to this repository.
⚙️ Control Options:
Disable automatic comment, CI, and merge conflict monitoring
Original prompt from Ayush
SYSTEM:
<latest_message>
Ayush Patel (U0B8L6RNMA9) [ts=1789652370.558029]: > ◦ provider region 403 from the modal sandbox, Fugu Ultra/Max terminal-bench blocked. needs sandbox region pinning or egress through OR. no PR. maybe we just support pinning sandbox region? modal accepts a param @Devin can you make a pr to enable this and default to US in benchmark-harness / openrouter-web
read modal upstream docs if needed, see the price diff if we region pin
</latest_message>
=== BEGIN THREAD HISTORY (in #agents) ===
Ayush Patel (U0B8L6RNMA9) [ts=1789652370.558029]: > ◦ provider region 403 from the modal sandbox, Fugu Ultra/Max terminal-bench blocked. needs sandbox region pinning or egress through OR. no PR. maybe we just support pinning sandbox region? modal accepts a param @Devin can you make a pr to enable this and default to US in benchmark-harness / openrouter-web
read modal upstream docs if needed, see the price diff if we region pin
=== END THREAD HISTORY ===
Channel ID: C07UF9XLTFF
Thread URL: https://openrouter.slack.com/archives/C07UF9XLTFF/p1789652370558029?thread_ts=1789652370.558029&cid=C07UF9XLTFF
The <latest_message> is the message that you should use to guide your goals + task for this session, and you should use the rest of the slack thread as context.
A [ts=...] marker on a Slack message is that message's timestamp. To act on a specific message with the slack tool (e.g. adding an emoji reaction via the reaction command), pass that value as timestamp along with the Channel ID — no extra lookup call is needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
resolveModalRegionsnow strips theopenrouter/routing prefix before matchingMODAL_REGION_PINS, soopenrouter/sakana/fugu-ultralands in a US sandbox likesakana/fugu-ultradoes.What changed?
src/harness/model-slug.tswithstripRoutingPrefix, the logic previously inlined inagent-cli/runner.ts#normalizeAgentModel.normalizeAgentModelis now an alias of it, so existing importers are unaffected.resolveModalRegionsmatches pins against the stripped slug.openrouter/autostays intact).Why?
Follow-up to #92. Region selection ran against the raw config model while the agent env ran against the normalized one, so a run configured with the routing-prefixed slug got default placement and the provider 403 the pin exists to avoid. Flagged by Devin Review on openrouter-web#44769.
How to test
bun test src/sandbox/modal-regions.test.ts src/harness/model-slug.test.tsExpected:
resolveModalRegions("openrouter/sakana/fugu-ultra", undefined)returns["us"].Reviewer focus
src/sandbox/modal-regions.ts: the pin match now goes throughstripRoutingPrefix.sandbox/depends onharness/, not onbenchmarks/agent-cli/.Checklist
Link to Devin session: https://openrouter.devinenterprise.com/sessions/4a11ad51b948470fbe1b893fd1f275f8
Open in Devin Desktop: https://openrouter.devinenterprise.com/desktop/session/4a11ad51b948470fbe1b893fd1f275f8?variant=devin
Requested by: @ayush-or