Skip to content

provider: isOpenRouter strips the alias marker before the prefix check (#319) - #470

Merged
santoshkumarradha merged 2 commits into
devfrom
fix/issue-319-isopenrouter-alias
Sep 3, 2026
Merged

santoshkumarradha merged 2 commits into
devfrom
fix/issue-319-isopenrouter-alias

Conversation

@AbirAbbas

Copy link
Copy Markdown
Collaborator

Fix

Client.isOpenRouter read config.Model raw, so a model spelled with the alias marker (~openrouter/…) failed the prefix check behind a non-openrouter base and the lane path silently turned off.

It now normalizes before the prefix check, reusing the existing normalizeModel (which strips the leading ~ and lowercases). The BaseURL half and every other caller are untouched.

Test

TestIsOpenRouterReadsTheAliasMarkerOffTheModel pins that ~openrouter/anything and openrouter/anything answer the same, and that a non-OpenRouter model stays false.

Closes #319.

@santoshkumarradha
santoshkumarradha marked this pull request as draft September 3, 2026 00:31
@santoshkumarradha

Copy link
Copy Markdown
Member

Converted to draft by the coordinating session (santosh-3c): dev is under a merge freeze with a fixed queue while 36 open PRs drain. This PR is assigned to a reviewer session (aforge-v2-ee) that will run the gate, add the manual probe if a person-facing string changed, and merge it in order. Nothing needed from the author unless the reviewer comments.

@santoshkumarradha
santoshkumarradha force-pushed the fix/issue-319-isopenrouter-alias branch from 4dd6608 to ded0ab1 Compare September 3, 2026 00:34
@santoshkumarradha
santoshkumarradha force-pushed the fix/issue-319-isopenrouter-alias branch from ded0ab1 to 5cd8596 Compare September 3, 2026 01:55
@santoshkumarradha
santoshkumarradha marked this pull request as ready for review September 3, 2026 01:59
@santoshkumarradha
santoshkumarradha merged commit 342a695 into dev Sep 3, 2026
2 checks passed
@santoshkumarradha
santoshkumarradha deleted the fix/issue-319-isopenrouter-alias branch September 3, 2026 01:59
@santoshkumarradha santoshkumarradha added this to the Reliable agent milestone Oct 3, 2026
@santoshkumarradha santoshkumarradha added the area:provider Routing, lanes, refusals, hedging, what a call costs label Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:provider Routing, lanes, refusals, hedging, what a call costs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Client.isOpenRouter reads config.Model raw, so a ~openrouter/… spelling behind a proxy base silently disables the lane path

2 participants