@opencode/ai 0.0.0-dev-20341 → 0.0.0-dev-20345

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.
@@ -92,7 +92,8 @@ const QUOTA_CODES = new Set([
92
92
  "creditlimitexceeded",
93
93
  ]);
94
94
  // Google reports an invalid API key as HTTP 400 INVALID_ARGUMENT with this `details[].reason`.
95
- const AUTH_CODES = new Set(["authentication_error", "permission_error", "api_key_invalid"]);
95
+ // Z.ai's Responses API reports account and plan rejections mid-stream as `permission_denied`.
96
+ const AUTH_CODES = new Set(["authentication_error", "permission_error", "permission_denied", "api_key_invalid"]);
96
97
  const SERVER_CODES = new Set([
97
98
  "api_error",
98
99
  "internal_error",
@@ -106,6 +107,7 @@ const SERVER_CODES = new Set([
106
107
  ]);
107
108
  // `invalid_request` is the Vercel AI Gateway's code for an upstream request rejection.
108
109
  const INVALID_REQUEST_CODES = new Set([
110
+ "model_not_found",
109
111
  "invalid_prompt",
110
112
  "invalid_request",
111
113
  "invalid_request_error",
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-20341",
3
+ "version": "0.0.0-dev-20345",
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.0-rc.112",
37
- "@opencode/http-recorder": "0.0.0-dev-20341",
37
+ "@opencode/http-recorder": "0.0.0-dev-20345",
38
38
  "@tsconfig/bun": "1.0.9",
39
39
  "@types/bun": "1.4.0",
40
40
  "@typescript/native-preview": "7.0.0-dev.20251207.1",
@@ -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-20341",
47
+ "@opencode/schema": "0.0.0-dev-20345",
48
48
  "aws4fetch": "1.0.20",
49
49
  "effect": "4.0.0-rc.112",
50
50
  "google-auth-library": "10.5.0"