Skip to content

fix: resolve gh/github provider alias to github-copilot, not google - #46

Open
Rahulsharma0810 wants to merge 1 commit into
Alph4d0g:mainfrom
Rahulsharma0810:fix/github-provider-alias
Open

Rahulsharma0810 wants to merge 1 commit into
Alph4d0g:mainfrom
Rahulsharma0810:fix/github-provider-alias

Conversation

@Rahulsharma0810

Copy link
Copy Markdown

Resolves #45.

resolveProviderAlias() in src/models-dev.ts mapped both gh and github provider prefixes to google when 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 for gh/*/github/* models into the wrong provider's data. models.dev's actual key for this provider is github-copilot.

Changes

  • src/models-dev.ts: gh/github now resolve to github-copilot.
  • test/provider-alias.test.mjs: 5 new tests covering the fix, that gemini/google still map correctly, user-config override behavior, unknown-provider fallback, and null input.
  • CHANGELOG.md updated.

Test plan

  • npm run build — 0 errors
  • npm test — 71/71 passing

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.
@kilo-code-bot

kilo-code-bot Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
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)
  • src/models-dev.ts - 2 line change, correct alias mapping
  • test/provider-alias.test.mjs - 5 comprehensive tests
  • CHANGELOG.md - properly documented

Reviewed with model: kilo-auto/free


Reviewed by free · Input: 92K · Output: 2.6K · Cached: 104.4K

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: resolveProviderAlias maps gh/github to google instead of github-copilot

2 participants