Skip to content

feat(providers): expose gpt-4o on built-in GitHub Copilot (gh) provider - #4487

Merged
diegosouzapw merged 1 commit into
release/v3.8.33from
feat/port-pr-98-gpt-4o-gh
Jun 21, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.33from
feat/port-pr-98-gpt-4o-gh

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Summary

Adds the original gpt-4o chat model to OmniRoute's built-in GitHub Copilot provider (github / alias gh).

GitHub Copilot's /chat/completions endpoint still serves gpt-4o, but OmniRoute's registry only listed the GPT-5.x family under gh, so apps that hard-code gpt-4o against this provider resolved to "unknown model". The entry is added next to the GPT-5.x lineup with contextLength: 128000 and no openai-responses targetFormat, so it routes via the provider default (/chat/completions) — the same lane the Claude/Gemini Copilot entries use after #2911.

Why this change

  • Parity with the upstream GitHub Copilot catalog (still serves GPT-4o).
  • Restores the model for clients that pin gh/gpt-4o (Cursor IDE, scripts, evals).
  • No effect on GPT-5.x / Claude / Gemini / Raptor entries already curated here.

Changes

  • open-sse/config/providers/registry/github/index.ts — add { id: "gpt-4o", name: "GPT-4o", contextLength: 128000 } at the top of models[] (chat/completions lane, no openai-responses).
  • tests/unit/provider-registry-github-copilot-gpt-4o.test.ts — new TDD test (RED before the edit, GREEN after):
    • gpt-4o is registered under the github provider
    • It does not carry openai-responses targetFormat (would 400 — Copilot Responses API does not serve it)
    • It is reachable via getModelsByProviderId("github")
  • CHANGELOG.md — [3.8.32] → ### ✨ New Features entry, credited to upstream author.

Validation

Ported from

decolua/9router#98 — single-line addition to providerModels.js. Original author credited via Co-authored-by: trailer (Bexultan).

Test plan

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +15 to +16
const { REGISTRY } = await import("../../open-sse/config/providerRegistry.ts");
const { getModelsByProviderId } = await import("../../open-sse/config/providerModels.ts");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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";

@diegosouzapw
diegosouzapw changed the base branch from release/v3.8.32 to release/v3.8.33 June 21, 2026 14:02
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>
@diegosouzapw
diegosouzapw force-pushed the feat/port-pr-98-gpt-4o-gh branch from 3955366 to 8d147d7 Compare June 21, 2026 17:04
@diegosouzapw
diegosouzapw merged commit aee1f74 into release/v3.8.33 Jun 21, 2026
4 checks passed
@diegosouzapw diegosouzapw mentioned this pull request Jun 22, 2026
@diegosouzapw
diegosouzapw deleted the feat/port-pr-98-gpt-4o-gh branch June 22, 2026 02:48
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
…er (diegosouzapw#4487)

Rebuilt onto release/v3.8.33 (squash-base-stale). Integrated into release/v3.8.33.
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.

1 participant