You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportconstCLICKZETTA_ROTATION_PROMPT="Your complimentary token quota has been exhausted.\nWe also offer competitively priced paid token plans, and I'd be happy to help you create and configure a paid API key."
Copy file name to clipboardExpand all lines: packages/cz-cli/test/clickzetta-rotation.test.ts
+40-10Lines changed: 40 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -113,20 +113,21 @@ afterAll(() => {
113
113
})
114
114
115
115
describe("clickzetta key rotation",()=>{
116
-
test("recognizes the clickzetta quota-exhausted 429 pattern",()=>{
116
+
test("recognizes the clickzetta free key quota-exhausted 429 pattern",()=>{
117
117
expect(
118
118
isClickzettaQuotaExhausted({
119
119
provider: "clickzetta",
120
120
status: 429,
121
121
detail:
122
-
"{\"code\":429,\"message\":\"Virtual key total quota exceeded: limit is 10000000 tokens for virtual key 'cz-code_auto_old', current usage: 10075371 tokens\"}",
122
+
"{\"code\":429,\"message\":\"Virtual key total quota exceeded: limit is 10000000 tokens for virtual key 'cz-code_auto_pdiaxzjq', current usage: 10082801 tokens\"}",
123
123
}),
124
124
).toBe(true)
125
125
expect(
126
126
isClickzettaQuotaExhausted({
127
127
provider: "clickzetta",
128
-
status: 401,
129
-
detail: "Invalid virtual key",
128
+
status: 429,
129
+
detail:
130
+
"{\"code\":429,\"message\":\"Virtual key total quota exceeded: limit is 10000000 tokens for virtual key 'cz-cli_auto_UAT_TEST', current usage: 10075371 tokens\"}",
"{\"code\":429,\"message\":\"Virtual key total quota exceeded: limit is 10000000 tokens for virtual key 'cz-cli_auto_UAT_TEST', current usage: 10075371 tokens\"}",
251
+
"{\"code\":429,\"message\":\"Virtual key total quota exceeded: limit is 10000000 tokens for virtual key 'cz-code_auto_old', current usage: 10075371 tokens\"}",
"{\"code\":429,\"message\":\"Virtual key total quota exceeded: limit is 10000000 tokens for virtual key 'cz-cli_auto_UAT_TEST', current usage: 10075371 tokens\"}",
0 commit comments