-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Describe the bug
!please move this bug where it belongs correctly! did not know correct repo to be honest!
<duration> not correctly parsed in ui
when hitting a rate limit in online session. the banner announcement does not correctly display the "duration" the user has to wait. the <duration> keyword seems not to be replaced correctly.
the main ERROR in the copilot run in deeper investigation reports a full ERROR.text with correct text and time in hours like:
"name": "CAPIError",
"text": "Sorry, you've hit a rate limit that restricts the number of Copilot model requests you can make within a specific time period. Please try again in 3 hours. Please review [...]
Affected version
copilot chat online and vscode
Steps to reproduce the behavior
- hit capa rate limit
- try again
- duration not parsed correctly in banner
Expected behavior
see the time till CAPIError is gone correctly in the chat ui and banner report.
why not use error.text as it has correct 3h in my case.
ADDITIONAL:
vscode plugin should also show the time:

model-picker should also show usage-rates for their specific capacity and when reset in vscode
super nice would be also an upgrade for the chat-input and the menu item to show state of CAPALimit (with timer?) to the user directly
Additional context
Full error message:
ERROR: {
"name": "CAPIError",
"text": "Sorry, you've hit a rate limit that restricts the number of Copilot model requests you can make within a specific time period. Please try again in 3 hours. Please review our Terms of Service (https://docs.github.com/site-policy/github-terms/github-terms-of-service). If the problem persists, please contact GitHub Support, including the request ID `A415:358C27:A0255D:D0DE92:69C91350`. To retry, leave a comment on this pull request asking Copilot to try again.",
"stack": "CAPIError: 429 Sorry, you've exceeded your rate limits. Please review our [Terms of Service](https://docs.github.com/en/site-policy/github-terms/github-terms-of-service).\n at _0x3b16a6.fromAPIError (file:///home/runner/work/_temp/***-action-main/dist/index.js:28:4630535)\n at i1e.getCompletionWithTools (file:///home/runner/work/_temp/***-action-main/dist/index.js:28:4648479)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async hae.getCompletionWithTools (file:///home/runner/work/_temp/***-action-main/dist/index.js:28:4781454)\n at async pHe.runCompletionWithTools (file:///home/runner/work/_temp/***-action-main/dist/index.js:150:38027)\n at async _0x2e1183 (file:///home/runner/work/_temp/***-action-main/dist/index.js:150:35816)\n at async pHe.agent (file:///home/runner/work/_temp/***-action-main/dist/index.js:150:36111)\n at async pHe.runAgentLoop (file:///home/runner/work/_temp/***-action-main/dist/index.js:150:45768)\n at async pHe.runAgentCore (file:///home/runner/work/_temp/***-action-main/dist/index.js:150:43298)\n at async pHe.runAgentCoreAndEvaluate (file:///home/runner/work/_temp/***-action-main/dist/index.js:150:77846)",
"message": "429 Sorry, you've exceeded your rate limits. Please review our [Terms of Service](https://docs.github.com/en/site-policy/github-terms/github-terms-of-service).",
"code": "user_global_rate_limited:pro",
"request_id": "00000-203a7cdd-4af8-4d10-ae63-8b214c5df9e9",
"ghRequestId": "A415:358C27:A0255D:D0DE92:69C91350",
"service": "capi",
"skipReport": false,
"isVisionFlow": false
}