{"record":{"id":"642ccc0a4db1f505","repo":"microsoft/vscode","slug":"you-ve-exhausted-your-premium-model-quota-for-add","errorCode":null,"errorMessage":"You've exhausted your premium model quota. For additional paid premium requests, please reach out to your organization's Copilot admin or wait for your allowance to renew.","messagePattern":"You've exhausted your premium model quota\\. For additional paid premium requests, please reach out to your organization's Copilot admin or wait for your allowance to renew\\.","errorType":"exception","errorClass":"CopilotCLIQuotaExceededError","httpStatus":null,"severity":"error","filePath":"extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotcliSession.ts","lineNumber":1702,"sourceCode":"\t\t\t\t\tevent.data.error?.message,\n\t\t\t\t);\n\t\t\t})));\n\n\t\t\tif (!token.isCancellationRequested) {\n\t\t\t\tawait this.sendRequestInternal(input, attachments, false, logStartTime);\n\t\t\t}\n\t\t\tif (isQuotaError) {\n\t\t\t\tthis._chatQuotaService.clearQuota();\n\t\t\t\tlet plan: string | undefined;\n\t\t\t\tlet isUsageBasedBilling: boolean | undefined;\n\t\t\t\tlet quotaResetDate: string | undefined;\n\t\t\t\ttry {\n\t\t\t\t\tconst copilotToken = await this._authenticationService.getCopilotToken();\n\t\t\t\t\tplan = copilotToken.copilotPlan;\n\t\t\t\t\tisUsageBasedBilling = copilotToken.tokenBasedBilling;\n\t\t\t\t\tquotaResetDate = copilotToken.quotaInfo.quota_reset_date;\n\t\t\t\t} catch { /* token unavailable */ }\n\t\t\t\tthrow new CopilotCLIQuotaExceededError(getQuotaMessageForPlan(plan, isUsageBasedBilling, quotaResetDate));\n\t\t\t}\n\t\t\tthis.logService.trace(`[CopilotCLISession] Invoking session (completed) ${this.sessionId}`);\n\t\t\tconst resolvedToolIdEditMap: Record<string, string> = {};\n\t\t\tawait Promise.all(Array.from(toolIdEditMap.entries()).map(async ([toolId, editFilePromise]) => {\n\t\t\t\tconst editId = await editFilePromise.catch(() => undefined);\n\t\t\t\tif (editId) {\n\t\t\t\t\tresolvedToolIdEditMap[toolId] = editId;\n\t\t\t\t}\n\t\t\t}));\n\t\t\tif (sdkRequestId) {\n\t\t\t\tawait this._chatSessionMetadataStore.updateRequestDetails(this.sessionId, [{\n\t\t\t\t\tvscodeRequestId: request.id,\n\t\t\t\t\tcopilotRequestId: sdkRequestId,\n\t\t\t\t\ttoolIdEditMap: resolvedToolIdEditMap,\n\t\t\t\t\tagentId: this._agentName,\n\t\t\t\t}]).catch(error => {\n\t\t\t\t\tthis.logService.error(`[CopilotCLISession] Failed to update chat session metadata store for request ${request.id}`, error);\n\t\t\t\t});","sourceCodeStart":1684,"sourceCodeEnd":1720,"githubUrl":"https://github.com/microsoft/vscode/blob/a94b963a32aa9749d69504576791fa29700ae46d/extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotcliSession.ts#L1684-L1720","documentation":"Error \"You've exhausted your premium model quota. For additional paid premium requests, please reach out to your organization's Copilot admin or wait for your allowance to renew.\" thrown in microsoft/vscode.","triggerScenarios":"Thrown at extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotcliSession.ts:1702 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"a94b963a32aa9749d69504576791fa29700ae46d","analyzedAt":"2026-08-12T01:08:56.794Z","schemaVersion":2},"datasetVersion":"2026-08-12T06:17:24.410Z"}