Repository navigation
feat(providers): expose gpt-4o on built-in GitHub Copilot (gh) provider - #4487
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Code Review
This pull request adds the gpt-4o model to the GitHub Copilot provider registry and introduces unit tests to verify its registration and routing configuration. The reviewer suggests using static import statements instead of top-level dynamic imports in the test file to improve static analysis and maintain idiomatic TypeScript.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| const { REGISTRY } = await import("../../open-sse/config/providerRegistry.ts"); | ||
| const { getModelsByProviderId } = await import("../../open-sse/config/providerModels.ts"); |
There was a problem hiding this comment.
Using static import statements is preferred over top-level dynamic await import(...) unless there is a specific reason for lazy loading or conditional importing. Static imports allow for better static analysis, type checking, and are more idiomatic in TypeScript.
| const { REGISTRY } = await import("../../open-sse/config/providerRegistry.ts"); | |
| const { getModelsByProviderId } = await import("../../open-sse/config/providerModels.ts"); | |
| import { REGISTRY } from "../../open-sse/config/providerRegistry.ts"; | |
| import { getModelsByProviderId } from "../../open-sse/config/providerModels.ts"; |
GitHub Copilot's chat/completions endpoint still serves the original `gpt-4o` model, but the OmniRoute registry only shipped the GPT-5.x family under `github` (alias `gh`), so apps that hard-code `gpt-4o` resolved to "unknown model" against this provider. Add `gpt-4o` (chat/completions, 128k context — no `openai-responses` targetFormat, so it routes through the provider default just like the Claude/Gemini Copilot entries hardened by #2911) to the `github` registry. The GPT-5.x lineup, Claude/Gemini entries and oswe Raptor Mini are untouched. TDD: tests/unit/provider-registry-github-copilot-gpt-4o.test.ts verifies the entry exists, does NOT carry `openai-responses`, and is exposed through `getModelsByProviderId("github")`. The sibling #2911 regression suite still passes. Ported from decolua/9router#98 (single-line addition to PROVIDER_MODELS). Inspired-by: decolua/9router#98 Co-authored-by: Bexultan <bexultan.mustafin@gmail.com>
3955366 to
8d147d7
Compare
…er (diegosouzapw#4487) Rebuilt onto release/v3.8.33 (squash-base-stale). Integrated into release/v3.8.33.
Summary
Adds the original
gpt-4ochat model to OmniRoute's built-in GitHub Copilot provider (github/ aliasgh).GitHub Copilot's
/chat/completionsendpoint still servesgpt-4o, but OmniRoute's registry only listed the GPT-5.x family undergh, so apps that hard-codegpt-4oagainst this provider resolved to "unknown model". The entry is added next to the GPT-5.x lineup withcontextLength: 128000and noopenai-responsestargetFormat, so it routes via the provider default (/chat/completions) — the same lane the Claude/Gemini Copilot entries use after #2911.Why this change
gh/gpt-4o(Cursor IDE, scripts, evals).Changes
open-sse/config/providers/registry/github/index.ts— add{ id: "gpt-4o", name: "GPT-4o", contextLength: 128000 }at the top ofmodels[](chat/completions lane, noopenai-responses).tests/unit/provider-registry-github-copilot-gpt-4o.test.ts— new TDD test (RED before the edit, GREEN after):gpt-4ois registered under thegithubprovideropenai-responsestargetFormat (would 400 — Copilot Responses API does not serve it)getModelsByProviderId("github")CHANGELOG.md—[3.8.32]→### ✨ New Featuresentry, credited to upstream author.Validation
node --import tsx/esm --test tests/unit/provider-registry-github-copilot-gpt-4o.test.ts tests/unit/provider-registry-github-copilot-targetformat.test.ts→ 11 pass / 0 fail (3 new + 8 sibling [BUG] Built-in GitHub Copilot listed Claude Opus/Gemini models fail due to API format/routing #2911 regressions).npm run typecheck:core→ clean.npx eslinton touched files → clean.Ported from
decolua/9router#98 — single-line addition to
providerModels.js. Original author credited viaCo-authored-by:trailer (Bexultan).Test plan