Repository navigation
fix: resolve gh/github provider alias to github-copilot, not google - #46
Open
Rahulsharma0810 wants to merge 1 commit into
Open
Rahulsharma0810 wants to merge 1 commit into
Rahulsharma0810 wants to merge 1 commit into
Conversation
Resolves Alph4d0g#45 — resolveProviderAlias() in src/models-dev.ts mapped both 'gh' and 'github' to 'google' when looking up models.dev fallback data (used when OmniRoute's /v1/models doesn't supply a field like contextWindow). GitHub Copilot proxies many upstream providers, not just Google, so this misdirected fallback lookups for gh/*|github/* models into the wrong provider bucket. Now correctly maps to github-copilot, models.dev's actual provider key. 5 new tests in test/provider-alias.test.mjs, 76/76 total passing.
Contributor
Code Review Roast 🔥Verdict: No Issues Found | Recommendation: Merge Oh wait, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything. 📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are. Files Reviewed (3 files)
Reviewed with model: kilo-auto/free Reviewed by free · Input: 92K · Output: 2.6K · Cached: 104.4K |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolves #45.
resolveProviderAlias()insrc/models-dev.tsmapped bothghandgithubprovider prefixes togooglewhen resolving which models.dev provider bucket to use for capability/context-window fallback data. GitHub Copilot proxies many upstream providers (Anthropic, OpenAI, xAI, Google, etc.), not just Google, so this misdirected fallback lookups forgh/*/github/*models into the wrong provider's data. models.dev's actual key for this provider isgithub-copilot.Changes
src/models-dev.ts:gh/githubnow resolve togithub-copilot.test/provider-alias.test.mjs: 5 new tests covering the fix, thatgemini/googlestill map correctly, user-config override behavior, unknown-provider fallback, and null input.Test plan
npm run build— 0 errorsnpm test— 71/71 passing