Repository navigation
feat(github_copilot): add missing models to registry and unit tests - #29679
syedali254 wants to merge 1 commit into
Conversation
Greptile SummaryThis PR adds six new
Confidence Score: 4/5The 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.
|
| 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
| 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" | ||
| ) |
There was a problem hiding this comment.
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!
| EXPECTED_MODELS = [ | ||
| "github_copilot/claude-3-5-sonnet", | ||
| "github_copilot/claude-3-5-haiku", | ||
| "github_copilot/gpt-4o", | ||
| "github_copilot/gemini-1-5-pro", | ||
| ] |
There was a problem hiding this comment.
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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
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! |
|
Hello @syedali254 , |
|
@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. |
|
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! |
|
Thank you! Would be great if you could also add "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
} |
ecc81ab to
8f8c0bb
Compare
… gpt-5.4, gpt-5.4-mini, gpt-5.5) and reasoning support
8f8c0bb to
8e2723b
Compare
| # 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 |
There was a problem hiding this comment.
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.
PR overviewThis 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)
Fixed/addressed: 0 · PR risk: 4/10 |
|
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! |
|
Thanks for the contribution! A couple of things to get this ready:
Once that's in, we'll take another look — appreciate the work on this! 🙏 |
|
|
Superseded by #49361, which preserves newer Copilot rows and omits unsupported legacy limits and capability claims |
Fixes #29675
What's changed
Added 4 missing GitHub Copilot models to
model_prices_and_context_window.json:github_copilot/claude-3-5-sonnetgithub_copilot/claude-3-5-haikugithub_copilot/gpt-4ogithub_copilot/gemini-1-5-proEach entry includes correct context window, max tokens, mode, and supported endpoints.
Tests
Added
tests/test_litellm/test_github_copilot.pywith 11 unit tests covering:get_model_info()litellm_providerandmodevalues