Skip to content

feat(github_copilot): add missing models to registry and unit tests - #29679

Closed
syedali254 wants to merge 1 commit into
BerriAI:mainfrom
syedali254:feature/add-missing-github-copilot-models
Closed

syedali254 wants to merge 1 commit into
BerriAI:mainfrom
syedali254:feature/add-missing-github-copilot-models

Conversation

@syedali254

Copy link
Copy Markdown

Fixes #29675

What's changed

Added 4 missing GitHub Copilot models to model_prices_and_context_window.json:

  • github_copilot/claude-3-5-sonnet
  • github_copilot/claude-3-5-haiku
  • github_copilot/gpt-4o
  • github_copilot/gemini-1-5-pro

Each entry includes correct context window, max tokens, mode, and supported endpoints.

Tests

Added tests/test_litellm/test_github_copilot.py with 11 unit tests covering:

  • Model registration via get_model_info()
  • Correct litellm_provider and mode values
  • Token limits and context windows
  • Function calling support

@greptile-apps

greptile-apps Bot commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds six new github_copilot/* model entries to model_prices_and_context_window.json (claude-3-5-haiku, claude-3-5-sonnet, gemini-1-5-pro, gpt-5.4, gpt-5.4-mini, gpt-5.5), backfills supports_reasoning: true on the existing gpt-5-mini entry, and ships a new tests/test_litellm/test_github_copilot.py covering registration, token limits, and reasoning flags. The PR also bundles unrelated changes to README.md and badge images.

  • JSON registry additions — six new model entries with context windows, output limits, and capability flags look structurally correct; token values (max_input_tokens, max_output_tokens, max_tokens) are self-consistent across all new entries.
  • Test coverage — new parametrized tests validate provider, mode, token limits, function calling, and reasoning support; all asserted values match the JSON entries added in the same PR.
  • README / docs — a large Terraform deployment guide (~140 lines) and two badge images were added here; per the team's convention this content belongs in the litellm-docs repo instead.

Confidence Score: 4/5

The JSON and test changes are low-risk additions with no production code paths modified, but the README includes unrelated documentation that should be moved to the docs repo, and the PR still lacks any evidence that the original issue is resolved.

The core model-registry additions are additive-only and the test assertions match the registered values, so there is no regression risk from those changes. Two concerns remain: the README change violates the team rule requiring documentation to live in the litellm-docs repo, and neither the PR description nor the test file includes any proof (test output, curl trace, etc.) that issue #29675 is actually fixed — something the reviewer has explicitly requested before merge.

README.md — the Terraform deployment guide (~140 lines) should be moved to litellm-docs; only the deploy-button additions belong here.

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds 6 new github_copilot model entries (claude-3-5-haiku, claude-3-5-sonnet, gemini-1-5-pro, gpt-5.4, gpt-5.4-mini, gpt-5.5) and adds supports_reasoning:true to the existing gpt-5-mini entry; values look structurally correct.
tests/test_litellm/test_github_copilot.py New test file covering model registration, token limits, context windows, function calling, and reasoning flags; all models in EXPECTED_MODELS are present in the JSON and test assertions match their values.
README.md Adds ~140 lines of AWS/GCP Terraform deployment documentation plus two new deploy buttons; repository rules require documentation additions to live in the litellm-docs repo, not this repo's README.
.github/deploy-on-aws.png New badge image for the AWS CloudShell deploy button added to README.
.github/deploy-on-gcp.png New badge image for the GCP Cloud Shell deploy button added to README.

Reviews (2): Last reviewed commit: "feat(github_copilot): add missing models..." | Re-trigger Greptile

Comment on lines +55 to +65
assert model_info["max_input_tokens"] == 200000


def test_github_copilot_models_support_function_calling():
"""claude-3-5-sonnet, claude-3-5-haiku, gpt-4o, and gemini-1-5-pro should support function calling."""
for model in EXPECTED_MODELS:
model_info = litellm.get_model_info(model)
assert model_info is not None
assert model_info.get("supports_function_calling") is True, (
f"'{model}' should support function calling"
)

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.

P2 Non-parametrized loop hides which model fails

test_github_copilot_models_support_function_calling iterates over EXPECTED_MODELS in a plain loop instead of using @pytest.mark.parametrize. If one model's entry is missing supports_function_calling, pytest will report only the test function as failing without identifying the offending model, making debugging harder. The other tests in this file already use parametrize for the same list — this one should too.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines +11 to +16
EXPECTED_MODELS = [
"github_copilot/claude-3-5-sonnet",
"github_copilot/claude-3-5-haiku",
"github_copilot/gpt-4o",
"github_copilot/gemini-1-5-pro",
]

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.

P2 gpt-4o was already registered before this PR

The diff for model_prices_and_context_window.json adds only three entries (claude-3-5-haiku, claude-3-5-sonnet, gemini-1-5-pro). github_copilot/gpt-4o was already present at line 18366 of the JSON with max_input_tokens: 64000. Including it in EXPECTED_MODELS causes the test to pass for the wrong reason (it validates a pre-existing entry), and the PR description incorrectly lists it as one of the four newly added models.

@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@syedali254

Copy link
Copy Markdown
Author

Thank you for the helpful review feedback! I have updated the branch with the following improvements:

Cleaned up Model Registry Verification: Removed github_copilot/gpt-4o from the EXPECTED_MODELS list since it was already registered in the core configuration prior to this PR.

Enhanced Test Visibility: Refactored the test_github_copilot_models_support_function_calling unit test to utilize @pytest.mark.parametrize instead of a standard loop. This ensures each model executes as an isolated test case, providing clear, per-model failure visibility for easier debugging.

All local linting, formatting (make format), and unit tests are passing cleanly. Ready for another look!

@theodiem

theodiem commented Jun 4, 2026

Copy link
Copy Markdown

Hello @syedali254 ,
Thank you for looking into #29675 .
Looking at your diff, I still don't see the mentioned models for gpt-5.4 and gpt-5.4-mini which I've mentioned on my issue.

@syedali254

Copy link
Copy Markdown
Author

@theodiem Thanks for the clarification! Added github_copilot/gpt-5.4 and github_copilot/gpt-5.4-mini in the latest commit, both with supports_reasoning: true. Also added supports_reasoning: true to the existing gpt-5-mini entry which you mentioned also supports reasoning. Tests updated to cover all three reasoning models.

@syedali254

Copy link
Copy Markdown
Author

Hi team! All 46 other checks are passing cleanly, but the Unit Tests: MCP, Secrets, Containers & Misc job keeps getting automatically cancelled right at the 20-minute mark when running on my fork's environment. I noticed this specific job completes fine in about 6 minutes on other PRs in the main repo. Since my changes are entirely additive and only touch model_prices_and_context_window.json and a new test file, could a maintainer please trigger a re-run of this job from your side or approve the merge? Thank you!

@codgician

Copy link
Copy Markdown
Contributor

Thank you! Would be great if you could also add gpt-5.5:

"github_copilot/gpt-5.5": {
    "litellm_provider": "github_copilot",
    "max_input_tokens": 922000,
    "max_output_tokens": 128000,
    "max_tokens": 128000,
    "mode": "responses",
    "supported_endpoints": [
      "/v1/responses"
    ],
    "supports_function_calling": true,
    "supports_tool_choice": true,
    "supports_parallel_function_calling": true,
    "supports_response_schema": true,
    "supports_vision": true,
    "supports_reasoning": true,
    "supports_none_reasoning_effort": true,
    "supports_xhigh_reasoning_effort": true
  }

@syedali254
syedali254 force-pushed the feature/add-missing-github-copilot-models branch from ecc81ab to 8f8c0bb Compare June 21, 2026 16:15
@CLAassistant

CLAassistant commented Jun 21, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

… gpt-5.4, gpt-5.4-mini, gpt-5.5) and reasoning support
@syedali254
syedali254 force-pushed the feature/add-missing-github-copilot-models branch from 8f8c0bb to 8e2723b Compare June 21, 2026 16:22
Comment thread README.md
# Production: provide an ACM cert. Without one, set allow_plaintext_alb = true
# (dev/trial only).
# acm_certificate_arn = "arn:aws:acm:us-west-2:111122223333:certificate/..."
allow_plaintext_alb = true

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.

Low: Production example enables plaintext load balancers

The copy-paste Terraform examples set env = "prod" and opt into HTTP-only here; the GCP example does the same with allow_plaintext_lb = true at line 517. A network attacker can read LiteLLM master-key/API traffic for users who deploy from these snippets, so make the production examples require TLS or change them to clearly be dev/trial examples with non-prod settings.

@veria-ai

veria-ai Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

PR overview

This pull request adds missing GitHub Copilot models to the model registry and expands unit test coverage for those registry entries. It also updates related project documentation/examples around deployment configuration.

There is one open security concern in the README examples: production-labeled Terraform snippets currently allow plaintext load balancer traffic. If users copy those examples into a real deployment, a network observer could read LiteLLM master-key or API traffic, so the examples should either require TLS or be clearly marked as non-production/dev-only. No issues have been addressed yet, and the remaining risk is documentation-driven rather than a direct code-path vulnerability.

Open issues (1)

  • Low: Production example enables plaintext load balancers — README.md:453

Fixed/addressed: 0 · PR risk: 4/10

@syedali254

Copy link
Copy Markdown
Author

Hi @shin-berri @theodiem @codgician maintainers I've resolved the merge conflict by rebasing onto the latest upstream/main. The PR now has a single clean commit with all 6 missing GitHub Copilot models added. Would appreciate a review when you get a chance!

@Sameerlite

Copy link
Copy Markdown
Contributor

Thanks for the contribution! A couple of things to get this ready:

  • Proof of working — Could you add some evidence the change works? Screenshots, test output, a curl request/response, or before/after logs really help speed up the review.

@greptileai

Once that's in, we'll take another look — appreciate the work on this! 🙏

@syedali254

Copy link
Copy Markdown
Author

Hey! Here's the proof of working — output from litellm.get_model_info() on the updated registry:

github_copilot/claude-3-5-haiku:  max_tokens=8192,   supports_reasoning=None
github_copilot/claude-3-5-sonnet: max_tokens=8192,   supports_reasoning=None
github_copilot/gemini-1-5-pro:    max_tokens=8192,   supports_reasoning=None
github_copilot/gpt-5.4:           max_tokens=64000,  supports_reasoning=True
github_copilot/gpt-5.4-mini:      max_tokens=64000,  supports_reasoning=True
github_copilot/gpt-5.5:           max_tokens=128000, supports_reasoning=True
github_copilot/gpt-5-mini:        max_tokens=64000,  supports_reasoning=True

All 7 models are correctly registered. Reasoning-capable models have supports_reasoning=True as expected. Let me know if you need anything else!> github_copilot/claude-3-5-haiku: max_tokens=8192, supports_reasoning=None
github_copilot/claude-3-5-sonnet: max_tokens=8192, supports_reasoning=None
github_copilot/gemini-1-5-pro: max_tokens=8192, supports_reasoning=None
github_copilot/gpt-5.4: max_tokens=64000, supports_reasoning=True
github_copilot/gpt-5.4-mini: max_tokens=64000, supports_reasoning=True
github_copilot/gpt-5.5: max_tokens=128000, supports_reasoning=True
github_copilot/gpt-5-mini: max_tokens=64000, supports_reasoning=True


All 7 models are correctly registered. Reasoning-capable models have `supports_reasoning=True` as expected. Let me know if you need anything else!

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Superseded by #49361, which preserves newer Copilot rows and omits unsupported legacy limits and capability claims

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]: not all models for github_copilot are listed

6 participants