go: update rate limit error copy
This commit is contained in:
parent
9c88235121
commit
30868f52ea
18 changed files with 115 additions and 35 deletions
|
|
@ -744,6 +744,7 @@ export async function handler(
|
|||
// Validate lite subscription billing
|
||||
if (opts.modelList === "lite" && authInfo.billing.lite && authInfo.lite) {
|
||||
try {
|
||||
const consoleGoUrl = `https://opencode.ai/workspace/${authInfo.workspaceID}/go`
|
||||
const sub = authInfo.lite
|
||||
const liteData = LiteData.getLimits()
|
||||
|
||||
|
|
@ -756,7 +757,10 @@ export async function handler(
|
|||
})
|
||||
if (result.status === "rate-limited")
|
||||
throw new GoUsageLimitError(
|
||||
t("zen.api.error.subscriptionQuotaExceededUseFreeModels"),
|
||||
t("zen.api.error.goSubscriptionWeeklyLimitExceeded", {
|
||||
retryIn: formatRetryTime(result.resetInSec),
|
||||
consoleGoUrl,
|
||||
}),
|
||||
authInfo.workspaceID,
|
||||
"weekly",
|
||||
result.resetInSec,
|
||||
|
|
@ -773,7 +777,10 @@ export async function handler(
|
|||
})
|
||||
if (result.status === "rate-limited")
|
||||
throw new GoUsageLimitError(
|
||||
t("zen.api.error.subscriptionQuotaExceededUseFreeModels"),
|
||||
t("zen.api.error.goSubscriptionMonthlyLimitExceeded", {
|
||||
retryIn: formatRetryTime(result.resetInSec),
|
||||
consoleGoUrl,
|
||||
}),
|
||||
authInfo.workspaceID,
|
||||
"monthly",
|
||||
result.resetInSec,
|
||||
|
|
@ -790,7 +797,10 @@ export async function handler(
|
|||
})
|
||||
if (result.status === "rate-limited")
|
||||
throw new GoUsageLimitError(
|
||||
t("zen.api.error.subscriptionQuotaExceededUseFreeModels"),
|
||||
t("zen.api.error.goSubscriptionRollingLimitExceeded", {
|
||||
retryIn: formatRetryTime(result.resetInSec),
|
||||
consoleGoUrl,
|
||||
}),
|
||||
authInfo.workspaceID,
|
||||
"5 hour",
|
||||
result.resetInSec,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue