@opencode/ai 0.0.0-dev-21362 → 0.0.0-dev-21368
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/dist/provider-error.js
CHANGED
|
@@ -201,7 +201,7 @@ export function classifyProviderFailure(input) {
|
|
|
201
201
|
if (input.status === 402 ||
|
|
202
202
|
codes.some((code) => QUOTA_CODES.has(code)) ||
|
|
203
203
|
(input.status === 429 && QUOTA_TEXT.test(text)))
|
|
204
|
-
return new QuotaExceededError(details);
|
|
204
|
+
return new QuotaExceededError({ ...details, retryAfterMs: input.retryAfterMs });
|
|
205
205
|
if (input.status === 401 ||
|
|
206
206
|
input.status === 403 ||
|
|
207
207
|
codes.some((code) => AUTH_CODES.has(code)) ||
|
package/dist/schema/errors.d.ts
CHANGED
|
@@ -86,10 +86,11 @@ declare const RateLimitError_base: Schema.Class<RateLimitError, Schema.TaggedStr
|
|
|
86
86
|
export declare class RateLimitError extends RateLimitError_base {
|
|
87
87
|
}
|
|
88
88
|
declare const QuotaExceededError_base: Schema.Class<QuotaExceededError, Schema.TaggedStruct<"QuotaExceeded", {
|
|
89
|
-
message: Schema.String;
|
|
90
|
-
body: Schema.optional<Schema.String>;
|
|
91
|
-
http: Schema.optional<typeof HttpContext>;
|
|
92
|
-
cause: Schema.optional<Schema.Defect>;
|
|
89
|
+
readonly message: Schema.String;
|
|
90
|
+
readonly body: Schema.optional<Schema.String>;
|
|
91
|
+
readonly http: Schema.optional<typeof HttpContext>;
|
|
92
|
+
readonly cause: Schema.optional<Schema.Defect>;
|
|
93
|
+
readonly retryAfterMs: Schema.optional<Schema.Number>;
|
|
93
94
|
}>, import("effect/Cause").YieldableError>;
|
|
94
95
|
export declare class QuotaExceededError extends QuotaExceededError_base {
|
|
95
96
|
}
|
package/dist/schema/errors.js
CHANGED
|
@@ -67,7 +67,10 @@ export class RateLimitError extends Schema.TaggedError("AI.Error.RateLimit")("Ra
|
|
|
67
67
|
rateLimit: Schema.optional(HttpRateLimitDetails),
|
|
68
68
|
}) {
|
|
69
69
|
}
|
|
70
|
-
export class QuotaExceededError extends Schema.TaggedError("AI.Error.QuotaExceeded")("QuotaExceeded",
|
|
70
|
+
export class QuotaExceededError extends Schema.TaggedError("AI.Error.QuotaExceeded")("QuotaExceeded", {
|
|
71
|
+
...ReasonFields,
|
|
72
|
+
retryAfterMs: Schema.optional(Schema.Number),
|
|
73
|
+
}) {
|
|
71
74
|
}
|
|
72
75
|
export class ContentPolicyError extends Schema.TaggedError("AI.Error.ContentPolicy")("ContentPolicy", ReasonFields) {
|
|
73
76
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-21368",
|
|
4
4
|
"name": "@opencode/ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
36
36
|
"@effect/platform-node": "4.0.1",
|
|
37
|
-
"@opencode/http-recorder": "0.0.0-dev-
|
|
37
|
+
"@opencode/http-recorder": "0.0.0-dev-21368",
|
|
38
38
|
"@tsconfig/bun": "1.0.9",
|
|
39
39
|
"@types/bun": "1.4.0",
|
|
40
40
|
"@typescript/native": "npm:typescript@7.0.2",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@aws-sdk/credential-providers": "3.1057.0",
|
|
45
45
|
"@smithy/eventstream-codec": "4.2.14",
|
|
46
46
|
"@smithy/util-utf8": "4.2.2",
|
|
47
|
-
"@opencode/schema": "0.0.0-dev-
|
|
47
|
+
"@opencode/schema": "0.0.0-dev-21368",
|
|
48
48
|
"aws4fetch": "1.0.20",
|
|
49
49
|
"effect": "4.0.1",
|
|
50
50
|
"google-auth-library": "10.5.0"
|