llm-errors 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +14 -5
- package/dist/index.cjs +133 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -5
- package/dist/index.d.ts +8 -5
- package/dist/index.js +133 -31
- package/dist/index.js.map +1 -1
- package/fixtures/README.md +5 -2
- package/fixtures/cases/anthropic/rate-limit-credit-balance.json +17 -0
- package/fixtures/cases/anthropic/sdk-billing-error.json +14 -0
- package/fixtures/cases/gemini/plain-unavailable-body.json +9 -0
- package/fixtures/cases/gemini/rpc-quota-exhausted-billing.json +11 -0
- package/fixtures/cases/gemini/rpc-quota-exhausted-rate-bucket.json +11 -0
- package/fixtures/cases/generic/http-400-retry-after.json +15 -0
- package/fixtures/cases/generic/http-503-retry-after.json +15 -0
- package/fixtures/cases/openai/plain-rate-limit-body.json +10 -0
- package/fixtures/cases/openai/sdk-billing-hard-limit.json +12 -0
- package/fixtures/expected/anthropic/rate-limit-credit-balance.json +8 -0
- package/fixtures/expected/anthropic/sdk-billing-error.json +8 -0
- package/fixtures/expected/gemini/plain-unavailable-body.json +8 -0
- package/fixtures/expected/gemini/rpc-quota-exhausted-billing.json +8 -0
- package/fixtures/expected/gemini/rpc-quota-exhausted-rate-bucket.json +8 -0
- package/fixtures/expected/generic/http-400-retry-after.json +7 -0
- package/fixtures/expected/generic/http-503-retry-after.json +8 -0
- package/fixtures/expected/openai/plain-rate-limit-body.json +7 -0
- package/fixtures/expected/openai/sdk-billing-hard-limit.json +7 -0
- package/package.json +2 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "OpenAI SDK billing hard limit",
|
|
3
|
+
"shape": "openai-sdk-api-error",
|
|
4
|
+
"error": {
|
|
5
|
+
"error": {
|
|
6
|
+
"message": "Billing hard limit has been reached",
|
|
7
|
+
"type": "invalid_request_error",
|
|
8
|
+
"code": "billing_hard_limit_reached",
|
|
9
|
+
"param": null
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "llm-errors",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Normalize OpenAI, Anthropic and Gemini API errors into one shape: category, retryable flag and Retry-After delay. Zero dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"openai",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"eslint": "^10.4.1",
|
|
73
73
|
"prettier": "^3.4.2",
|
|
74
74
|
"tsup": "^8.3.5",
|
|
75
|
-
"typescript": "^
|
|
75
|
+
"typescript": "^6.0.3",
|
|
76
76
|
"typescript-eslint": "^8.60.0",
|
|
77
77
|
"vitest": "^4.1.8"
|
|
78
78
|
}
|