Skip to content

feat(github): expose all 21 Copilot models with context window metadata (#822)#1535

Merged
kevincodex1 merged 1 commit into
Gitlawb:mainfrom
adityachaudhary99:fix/github-copilot-routing-alias-822
Jun 8, 2026
Merged

feat(github): expose all 21 Copilot models with context window metadata (#822)#1535
kevincodex1 merged 1 commit into
Gitlawb:mainfrom
adityachaudhary99:fix/github-copilot-routing-alias-822

Conversation

@adityachaudhary99

@adityachaudhary99 adityachaudhary99 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #822 - GitHub Copilot shows only 2 models. Changes: 2->21 models with contextWindow, maxOutputTokens, modelDescriptorId. All metadata reconciled against descriptors.

Summary by CodeRabbit

  • New Features
    • Expanded the set of AI models available via the GitHub integration, adding many GPT, Codex, Claude, Gemini, and Grok variants.
    • Added OpenAI-compatible aliases for several Copilot models to improve selection and compatibility.
    • Each model now reports explicit context window and output limits so behavior and response sizes are more predictable for users.

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7727a661-6132-4135-b7f8-60247df3bbc5

📥 Commits

Reviewing files that changed from the base of the PR and between b2ac4af and ac10274.

📒 Files selected for processing (2)
  • src/integrations/gateways/github.ts
  • src/integrations/models/openai-compatible-alias.ts
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (3)
**/*

⚙️ CodeRabbit configuration file

**/*: Apply the OpenClaude maintainer review rubric from AGENTS.md. Review the current diff, not stale discussion context. Separate real blockers from suggestions. Do not request changes for vague style churn. Treat approval as merge-ready from CodeRabbit's side, pending required human review and GitHub Checks. If checks are failing or unavailable, say so clearly instead of implying the PR is fully ready.

Files:

  • src/integrations/models/openai-compatible-alias.ts
  • src/integrations/gateways/github.ts
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}

⚙️ CodeRabbit configuration file

{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}: Review provider routing, model selection, env precedence, auth/token handling, OpenAI-compatible shims, retries, proxy behavior, and outbound HTTP behavior with high scrutiny. Block on silent default changes, hidden fallback expansion, credential reuse mistakes, hardcoded provider assumptions, or new network reach that is not intentional and documented.

Files:

  • src/integrations/models/openai-compatible-alias.ts
  • src/integrations/gateways/github.ts
**

⚙️ CodeRabbit configuration file

**: # Contributing to OpenClaude

Thanks for contributing.

OpenClaude is a fast-moving open-source coding-agent CLI with support for multiple providers, local backends, MCP, and a terminal-first workflow. The best contributions here are focused, well-tested, and easy to review.

Before You Start

  • Search existing issues and discussions before opening a new thread.
  • Check open pull requests for work that overlaps with your contribution. If a PR already exists that addresses the same change, open an issue or discussion first to align on direction — duplicate PRs may be closed without review.
  • Use issues for confirmed bugs and actionable feature work.
  • Use discussions for setup help, ideas, and general community conversation.
  • For larger changes, open an issue first so the scope is clear before implementation.
  • For security reports, follow SECURITY.md.

Pull Requests

Every PR needs a reason. Your PR description must include:

  • what changed and why
  • the user or developer impact
  • the exact checks you ran
  • a linked issue when one exists, using Fixes fix: skip assertMinVersion for third-party providers #123, `Closes `#123, or another clear link
  • screenshots when the PR touches UI, terminal presentation, or the VS Code extension
  • which provider path was tested when the PR changes provider behavior

The PR author is responsible for ensuring their PR is merge-ready. PRs with merge conflicts will not be reviewed or approved until the conflicts are resolved.

Issues are the recommended starting point for anything non-trivial — opening one first helps avoid wasted effort if the change is out of scope or already being worked on. Small fixes, doc corrections, and obvious improvements can stand on their own without a linked issue, as long as the PR description explains the intent.

What Gets Closed Without Review

PRs may be closed without review...

Files:

  • src/integrations/models/openai-compatible-alias.ts
  • src/integrations/gateways/github.ts
🔇 Additional comments (1)
src/integrations/models/openai-compatible-alias.ts (1)

46-46: LGTM!

Also applies to: 59-61


📝 Walkthrough

Walkthrough

The GitHub Copilot gateway's model catalog is expanded from a minimal hardcoded set to a comprehensive enumerated list. The catalog.models array now explicitly defines each available model with id, apiName, label, contextWindow, maxOutputTokens, and modelDescriptorId. Additionally, OpenAI-compatible alias mappings (aliasModels) gained new Copilot alias entries for Claude Opus 4.5 and three GPT-5.1 Codex variants.

Changes

GitHub Copilot Model Catalog Expansion

Layer / File(s) Summary
Model catalog expansion
src/integrations/gateways/github.ts
The catalog.models array replaces shorthand model entries with an explicit enumerated list of GPT/Codex, GPT-4.1/4o, Claude, Gemini, and Grok model variants, each with full metadata including contextWindow, maxOutputTokens, apiName, and modelDescriptorId.
OpenAI-compatible alias additions
src/integrations/models/openai-compatible-alias.ts
Added github:copilot:claude-opus-4.5 and three github:copilot:gpt-5.1-codex* entries to aliasModels, with context window and max output token values.

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • jatmn
🚥 Pre-merge checks | ✅ 4 | ❌ 3

❌ Failed checks (1 warning, 2 inconclusive)

Check name Status Explanation Resolution
Risk Surface Disclosed ⚠️ Warning PR touches provider routing (21 models with different apiNames and context windows), but lacks risk surface disclosure or blocker assessment in code, comments, or messages. Add review comments documenting routing changes, token impacts, API compatibility for all 21 models, and breaking change assessment.
Description check ❓ Inconclusive Description is minimal but covers what changed and references the issue; missing template sections like Testing and Impact. Complete the description template with Impact section, Testing checklist status, and provider/model path tested details.
Linked Issues check ❓ Inconclusive PR adds 21 models with metadata [#822], but only partially addresses issue objectives: exposes models and context windows but lacks GITHUB_MODEL env var implementation and actual model visibility in responses. Verify whether env var support and response model surfacing are completed in other commits or require follow-up work; clarify scope with maintainers.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed Title accurately describes the main change: expanding GitHub Copilot from 2 to 21 models with context metadata.
Out of Scope Changes check ✅ Passed All changes are in-scope: GitHub gateway model catalog expansion and OpenAI-compatible alias entries directly support issue #822 objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
No Hidden Policy Change ✅ Passed PR expands model catalog (2→21) with metadata only; routing, trust-model, telemetry, auth, and permission policies remain unchanged.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 4, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 4, 2026

@jatmn jatmn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I found an issue that needs to be addressed before this is ready.

Findings

  • [P1] Complete CodeRabbit's descriptor-linkage request
    src/integrations/gateways/github.ts:81
    CodeRabbit's review item asked to confirm each GitHub catalog modelDescriptorId is registered in the descriptor registry, but the current catalog still points ten entries at descriptors that are not loaded (gpt-5.3-codex, gpt-5.2-codex, gpt-5.2, gpt-5.1-codex, gpt-5.1-codex-max, gpt-5.1-codex-mini, claude-sonnet-4-5, claude-opus-4-5, gemini-3.1-pro-preview, and gemini-3-flash-preview). The required smoke-and-tests check is red on the registry validation tests for exactly these missing descriptors, so the GitHub gateway cannot merge with an invalid descriptor registry. Please complete that review request by either adding/registering the missing model descriptors or pointing these catalog entries at the existing GitHub/Copilot descriptor IDs that are actually loaded.

@jatmn jatmn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

please roll back your prior changes and rebase on main.

please do not submit the entire codebase as new.

@adityachaudhary99 adityachaudhary99 force-pushed the fix/github-copilot-routing-alias-822 branch from 6dfbee4 to ac10274 Compare June 5, 2026 13:58

@jatmn jatmn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the update. I rechecked the previously discussed paths and do not see any remaining actionable issues from my side.

@kevincodex1

@kevincodex1 kevincodex1 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.

awesome!

@kevincodex1 kevincodex1 merged commit 1e8c1ac into Gitlawb:main Jun 8, 2026
3 checks passed
deagwon97 pushed a commit to deagwon97/openclaude that referenced this pull request Jun 11, 2026
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.

[GitHub] github:copilot is a routing alias — no model control or visibility

3 participants