-
Notifications
You must be signed in to change notification settings - Fork 66.9k
Clarify rate limit error message and actions #43999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,7 +71,7 @@ Most people see rate limiting for select models, due to limited capacity. | |
|
|
||
| Service-level request rate limits ensure high service quality for all {% data variables.product.prodname_copilot_short %} users and should not affect typical or even deeply engaged {% data variables.product.prodname_copilot_short %} usage. We are aware of some use cases that are affected by it. {% data variables.product.github %} is iterating on {% data variables.product.prodname_copilot_short %}’s rate-limiting heuristics to ensure it doesn’t block legitimate use cases. | ||
|
|
||
| If you are rate limited, the error message will contain the suggested retry time for a successful request. For more information about alternative actions you can take while your limit resets, see [AUTOTITLE](/copilot/concepts/usage-limits#what-to-do-if-you-hit-a-limit). | ||
| If you are rate limited, the error message will read: "You've hit your session rate limit. Please upgrade your plan or wait a moment for your limit to reset.". For more information about alternative actions you can take while your limit resets, see [AUTOTITLE](/copilot/concepts/usage-limits#what-to-do-if-you-hit-a-limit). | ||
|
||
|
|
||
| In case you experience repeated rate limiting in {% data variables.product.prodname_copilot_short %} contact {% data variables.contact.contact_support_page %}. | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quoting an exact, client-specific error string (“will read: …”) is likely to become outdated across Copilot surfaces/versions and may not match what all users see. Consider changing this to non-exact phrasing (e.g., “may say something like…”) or describing the semantics (that the message indicates you’re rate limited and when you can retry), which is more durable and consistent with docs best practices.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Responsible use of GitHub Copilot code review
Learn how to use GitHub Copilot code review safely and responsibly by understanding its purposes, capabilities, and limitations.
About GitHub Copilot code review
GitHub Copilot code review is an AI-powered feature that reviews code and provides feedback.
When a user requests a code review from Copilot, Copilot scans through the code changes, plus additional relevant context, and provides feedback on the code. As part of that feedback, it may also provide specific suggested code changes.
Copilot's review can be customized with custom instructions, which are natural language descriptions of coding style and best practices. For more information, see Adding repository custom instructions for GitHub Copilot.
GitHub Copilot code review inspects your code and provides feedback using a combination of natural language processing and machine learning. This process can be broken down into a number of steps.
Input processing
The code changes are combined with other relevant, contextual information (for example, the pull request’s title and body on GitHub), and any custom instructions that have been defined, to form a prompt, and that prompt is sent to a large language model.
Language model analysis
The prompt is then passed through the Copilot language model, which is a neural network that has been trained on a large body of text data. The language model analyzes the input prompt.
Response generation
The language model generates a response based on its analysis of the input prompt. This response can take the form of natural language suggestions and code suggestions.
Output formatting
The response generated by Copilot is presented to the user either directly in the supported editor, or as a pull request review on GitHub, providing code feedback linked to specific lines of specific files.
Where Copilot has provided a code suggestion, the suggestion is presented as a suggested change, which can be applied with a couple of clicks.
Model usage
Copilot code review is a purpose-built product that uses a carefully tuned mix of models, prompts, and system behaviors to deliver consistent, high-quality feedback across a wide range of codebases. Model switching is not supported, as changing the model is likely to compromise reliability, user experience, and the quality of review comments. Each use of this feature consumes one premium request. See Requests in GitHub Copilot.
Note
Copilot code review may use models that are not enabled on your organization's "Models" settings page. The "Models" settings page only controls Copilot Chat.
Since Copilot code review is generally available, all model usage will be subject to the generally available terms. See Managing policies and features for GitHub Copilot in your organization.
Use case for GitHub Copilot code review
The goal of GitHub Copilot code review is to quickly provide feedback on a developer’s code. This can enable developers to get code ready to merge more quickly and increase overall code quality.
Improving the performance of GitHub Copilot code review
Use Copilot code review to supplement human reviews, not to replace them
While GitHub Copilot code review can be a powerful tool for improving code quality, it is important to use it as a tool, rather than to replace human reviews.
You should always review and verify the feedback generated by Copilot code review, and supplement Copilot's feedback with careful human review to ensure your code meets your requirements.
Provide feedback
If you encounter any issues or limitations with Copilot code review, we recommend that you provide feedback by using the thumbs up and thumbs down buttons on Copilot's comments. This can help GitHub to improve the tool and address any concerns or limitations.
Custom instructions
You can configure custom instructions to help Copilot understand your coding style and best practices. For more information, see Adding repository custom instructions for GitHub Copilot.
Limitations of GitHub Copilot code review
Depending on factors such as your codebase and programming language, you may encounter different levels of performance when using GitHub Copilot code review. The following information is designed to help you understand system limitations and key concepts about performance as they apply to GitHub Copilot code review.
Missed code quality problems
Copilot may not identify all of the problems that are present in code, especially where changes are large or complex. To ensure that all relevant problems are identified and corrected, Copilot code review should be supplemented with careful human code review.
False positives
Copilot code review has a risk of "hallucination" - that is, it may highlight problems in reviewed code that do not exist or are based on misunderstandings of the code. Comments generated by Copilot code review should be carefully reviewed and considered before taking action and making changes.
Inaccurate or insecure code
As part of its comments, Copilot code review may provide specific code suggestions. The code generated may appear to be valid, but may not actually be semantically or syntactically correct, or may not correctly resolve the problem identified in the comment. In addition, code generated by Copilot may contain security vulnerabilities or other issues. You should always carefully review and test code generated by Copilot.
Potential biases
Copilot's training data is drawn from existing code repositories, which may contain biases and errors that can be perpetuated by the tool. Additionally, Copilot code review may be biased toward certain programming languages or coding styles, which can lead to suboptimal or incomplete feedback.
Next steps
For details of how to use Copilot code review, see: