test: cover copilot model limit precedence#32365
Open
wgu9 wants to merge 1 commit into
Open
Conversation
Contributor
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Based on my search results, I found one potentially related PR: Related PR:
The other results (PR #29354 on per-model limit overrides, PR #20758 on Copilot support, and PR #20491 on Kiro provider) are related to the broader ecosystem but are not direct duplicates addressing the same test coverage need. The current PR (#32365) appears to be the only one specifically focused on adding regression test coverage for Copilot model limit precedence, so there are no duplicate test PRs found. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Fixes #21564
Related: #31064, #32343
Type of change
What does this PR do?
This adds provider-level regression coverage for GitHub Copilot model limit precedence.
The current implementation already has the right behavior: Copilot OAuth model discovery refreshes stale catalog limits, and an explicit user config override still wins after discovery. This PR locks that contract at
Provider.list()so future provider merge changes do not regress the 1M+ context cases or user-configured token limits.The covered cases are:
gpt-5.5entry, but live/modelsreturns larger limits.context,input, andoutputinto the provider model.context,input, andoutput.How did you verify your code works?
bun test test/provider/provider.test.tsbun test test/plugin/github-copilot-models.test.tsbun test test/provider/provider.test.ts -t "github copilot"bunx oxlint packages/opencode/test/provider/provider.test.tsgit diff --checkbun run typecheckstill fails on the currentdevtree inpackages/core/src/v1/config/migrate.tsbecauseinfo.limit.contextandinfo.limit.outputcan be undefined there. This PR does not touch that code path.Screenshots / recordings
Not applicable. This is provider contract coverage.
Checklist