@absolutejs/ai 0.2.10 → 0.2.11

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 CHANGED
@@ -6,6 +6,12 @@ This file is generated by `absolute-changelog` from the entries in
6
6
  `changelog/`. Edit an entry, not this file — and add new ones under
7
7
  `changelog/unreleased/`.
8
8
 
9
+ ## 0.2.11 — 2026-09-27
10
+
11
+ ### Changed
12
+
13
+ - **Name capacity HTTP metadata providerStatus instead of status so application HTTP frameworks do not treat an upstream billing/auth 4xx as a caller error and skip server-error capture. Preserve provider diagnostics and request IDs. Supersedes 0.2.10.** (`AIInputError`, `inspectAIInput`)
14
+
9
15
  ## 0.2.10 — 2026-09-27
10
16
 
11
17
  ### Changed
package/changelog.json CHANGED
@@ -2,6 +2,20 @@
2
2
  "contract": 1,
3
3
  "name": "@absolutejs/ai",
4
4
  "releases": [
5
+ {
6
+ "changes": [
7
+ {
8
+ "kind": "changed",
9
+ "summary": "Name capacity HTTP metadata providerStatus instead of status so application HTTP frameworks do not treat an upstream billing/auth 4xx as a caller error and skip server-error capture. Preserve provider diagnostics and request IDs. Supersedes 0.2.10.",
10
+ "symbols": [
11
+ "AIInputError",
12
+ "inspectAIInput"
13
+ ]
14
+ }
15
+ ],
16
+ "date": "2026-09-27",
17
+ "version": "0.2.11"
18
+ },
5
19
  {
6
20
  "changes": [
7
21
  {
package/dist/ai/index.js CHANGED
@@ -4,12 +4,12 @@ var __require = import.meta.require;
4
4
  // src/ai/inputCapacity.ts
5
5
  class AIInputError extends Error {
6
6
  code;
7
- status;
7
+ providerStatus;
8
8
  requestId;
9
- constructor(code, message, status, requestId) {
9
+ constructor(code, message, providerStatus, requestId) {
10
10
  super(message);
11
11
  this.code = code;
12
- this.status = status;
12
+ this.providerStatus = providerStatus;
13
13
  this.requestId = requestId;
14
14
  this.name = "AIInputError";
15
15
  }
@@ -33,7 +33,7 @@ var inspectAIInput = async (provider, params) => {
33
33
  provider.inputCapacity.countTokens(params)
34
34
  ]).catch((error) => {
35
35
  if (error instanceof Error && error.name === "AIInputError" && "code" in error && (error.code === "capacity_unavailable" || error.code === "input_too_large" || error.code === "unsupported_content"))
36
- throw new AIInputError(error.code, error.message, "status" in error && typeof error.status === "number" ? error.status : undefined, "requestId" in error && typeof error.requestId === "string" ? error.requestId : undefined);
36
+ throw new AIInputError(error.code, error.message, "providerStatus" in error && typeof error.providerStatus === "number" ? error.providerStatus : undefined, "requestId" in error && typeof error.requestId === "string" ? error.requestId : undefined);
37
37
  throw error;
38
38
  });
39
39
  const inputTokens = inputTokenCount(tokens);
@@ -8923,5 +8923,5 @@ export {
8923
8923
  xai
8924
8924
  };
8925
8925
 
8926
- //# debugId=5BBC6EDD2BBE208264756E2164756E21
8926
+ //# debugId=DDEEE4C7832FA25964756E2164756E21
8927
8927
  //# sourceMappingURL=index.js.map