@opencode/ai 0.0.0-dev-21590 → 0.0.0-dev-21592
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 +5 -3
- package/package.json +3 -3
package/dist/provider-error.js
CHANGED
|
@@ -4,7 +4,9 @@ import { Json } from "./utils/json.js";
|
|
|
4
4
|
import { isRecord } from "./utils/record.js";
|
|
5
5
|
const patterns = [
|
|
6
6
|
/prompt is too long/i,
|
|
7
|
-
/input is too long for requested model/i,
|
|
7
|
+
/input is too long for (?:the )?(?:requested|selected) model/i,
|
|
8
|
+
// OpenCode Go
|
|
9
|
+
/too large for the model'?s configured input limit/i,
|
|
8
10
|
// Cloudflare Workers AI reports this as HTTP 413.
|
|
9
11
|
/exceeded this model context window limit/i,
|
|
10
12
|
/exceeds the context window/i,
|
|
@@ -31,8 +33,8 @@ const patterns = [
|
|
|
31
33
|
/context[_ ]length[_ ]exceeded/i,
|
|
32
34
|
/context length is only \d+ tokens/i,
|
|
33
35
|
/input length.*exceeds.*context length/i,
|
|
34
|
-
// Z.ai code 1261 arrives as `Prompt too long` or `Prompt 超长`.
|
|
35
|
-
/prompt (?:too long|超长)/i,
|
|
36
|
+
// Z.ai code 1261 arrives as `Prompt too long`, `Prompt exceeds max length` or `Prompt 超长`.
|
|
37
|
+
/prompt (?:too long|exceeds max length|超长)/i,
|
|
36
38
|
/too large for model with \d+ maximum context length/i,
|
|
37
39
|
/prompt has [\d,]+ tokens?, but the configured context size is [\d,]+ tokens?/i,
|
|
38
40
|
/model_context_window_exceeded/i,
|
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-21592",
|
|
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-21592",
|
|
38
38
|
"@tsconfig/bun": "1.0.9",
|
|
39
39
|
"@types/bun": "1.4.3",
|
|
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-21592",
|
|
48
48
|
"aws4fetch": "1.0.20",
|
|
49
49
|
"effect": "4.0.1",
|
|
50
50
|
"google-auth-library": "10.5.0"
|