@aigne/transport 0.15.14-beta.2 → 0.15.14-beta.4

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
@@ -1,5 +1,48 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.15.14-beta.4](https://github.com/AIGNE-io/aigne-framework/compare/transport-v0.15.14-beta.3...transport-v0.15.14-beta.4) (2025-11-06)
4
+
5
+
6
+ ### Features
7
+
8
+ * add dynamic model options resolution with getter pattern ([#708](https://github.com/AIGNE-io/aigne-framework/issues/708)) ([5ed5085](https://github.com/AIGNE-io/aigne-framework/commit/5ed5085203763c70194853c56edc13acf56d81c6))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add configurable timeout for fetch requests and set 3min timeout for hub video model ([4eb7f3d](https://github.com/AIGNE-io/aigne-framework/commit/4eb7f3df590992742706197bcb48b4db35ccc948))
14
+
15
+
16
+ ### Dependencies
17
+
18
+ * The following workspace dependencies were updated
19
+ * dependencies
20
+ * @aigne/openai bumped to 0.16.5-beta.4
21
+ * devDependencies
22
+ * @aigne/agent-library bumped to 1.21.51-beta.4
23
+ * @aigne/core bumped to 1.66.0-beta.3
24
+ * @aigne/default-memory bumped to 1.2.14-beta.4
25
+ * @aigne/test-utils bumped to 0.5.58-beta.4
26
+
27
+ ## [0.15.14-beta.3](https://github.com/AIGNE-io/aigne-framework/compare/transport-v0.15.14-beta.2...transport-v0.15.14-beta.3) (2025-11-05)
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * **transport:** improve HTTP error status code validation ([#703](https://github.com/AIGNE-io/aigne-framework/issues/703)) ([76791d7](https://github.com/AIGNE-io/aigne-framework/commit/76791d760fc319c0c0edb82d19474d6141240a8e))
33
+
34
+
35
+ ### Dependencies
36
+
37
+ * The following workspace dependencies were updated
38
+ * dependencies
39
+ * @aigne/openai bumped to 0.16.5-beta.3
40
+ * devDependencies
41
+ * @aigne/agent-library bumped to 1.21.51-beta.3
42
+ * @aigne/core bumped to 1.65.1-beta.3
43
+ * @aigne/default-memory bumped to 1.2.14-beta.3
44
+ * @aigne/test-utils bumped to 0.5.58-beta.3
45
+
3
46
  ## [0.15.14-beta.2](https://github.com/AIGNE-io/aigne-framework/compare/transport-v0.15.14-beta.1...transport-v0.15.14-beta.2) (2025-11-04)
4
47
 
5
48
 
@@ -10,6 +10,7 @@ export interface BaseClientInvokeOptions extends InvokeOptions {
10
10
  */
11
11
  fetchOptions?: Partial<RequestInit> & {
12
12
  maxRetries?: number;
13
+ timeout?: number;
13
14
  };
14
15
  }
15
16
  export interface BaseClientOptions {
@@ -118,7 +118,7 @@ class BaseClient {
118
118
  async fetch(url, init) {
119
119
  const { default: retry } = await Promise.resolve().then(() => __importStar(require("p-retry")));
120
120
  const retries = init?.maxRetries ?? DEFAULT_MAX_RECONNECTS;
121
- const result = await retry(() => (0, fetch_js_1.fetch)(url, { ...init, timeout: TIMEOUT, skipResponseCheck: true }), {
121
+ const result = await retry(() => (0, fetch_js_1.fetch)(url, { timeout: TIMEOUT, skipResponseCheck: true, ...init }), {
122
122
  retries,
123
123
  onFailedAttempt: (ctx) => {
124
124
  logger_js_1.logger.warn(`Retrying fetch ${url} due to error:`, ctx);
@@ -135,7 +135,12 @@ class AIGNEHTTPServer {
135
135
  }
136
136
  catch (error) {
137
137
  return new Response(JSON.stringify({ error: { message: error.message } }), {
138
- status: error instanceof error_js_1.ServerError ? error.status : 500,
138
+ status: "status" in error &&
139
+ typeof error.status === "number" &&
140
+ error.status >= 200 &&
141
+ error.status < 599
142
+ ? error.status
143
+ : 500,
139
144
  headers: { "Content-Type": "application/json" },
140
145
  });
141
146
  }
@@ -10,6 +10,7 @@ export interface BaseClientInvokeOptions extends InvokeOptions {
10
10
  */
11
11
  fetchOptions?: Partial<RequestInit> & {
12
12
  maxRetries?: number;
13
+ timeout?: number;
13
14
  };
14
15
  }
15
16
  export interface BaseClientOptions {
@@ -10,6 +10,7 @@ export interface BaseClientInvokeOptions extends InvokeOptions {
10
10
  */
11
11
  fetchOptions?: Partial<RequestInit> & {
12
12
  maxRetries?: number;
13
+ timeout?: number;
13
14
  };
14
15
  }
15
16
  export interface BaseClientOptions {
@@ -82,7 +82,7 @@ export class BaseClient {
82
82
  async fetch(url, init) {
83
83
  const { default: retry } = await import("p-retry");
84
84
  const retries = init?.maxRetries ?? DEFAULT_MAX_RECONNECTS;
85
- const result = await retry(() => fetch(url, { ...init, timeout: TIMEOUT, skipResponseCheck: true }), {
85
+ const result = await retry(() => fetch(url, { timeout: TIMEOUT, skipResponseCheck: true, ...init }), {
86
86
  retries,
87
87
  onFailedAttempt: (ctx) => {
88
88
  logger.warn(`Retrying fetch ${url} due to error:`, ctx);
@@ -129,7 +129,12 @@ export class AIGNEHTTPServer {
129
129
  }
130
130
  catch (error) {
131
131
  return new Response(JSON.stringify({ error: { message: error.message } }), {
132
- status: error instanceof ServerError ? error.status : 500,
132
+ status: "status" in error &&
133
+ typeof error.status === "number" &&
134
+ error.status >= 200 &&
135
+ error.status < 599
136
+ ? error.status
137
+ : 500,
133
138
  headers: { "Content-Type": "application/json" },
134
139
  });
135
140
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/transport",
3
- "version": "0.15.14-beta.2",
3
+ "version": "0.15.14-beta.4",
4
4
  "description": "AIGNE Transport SDK providing HTTP client and server implementations for communication between AIGNE components",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -46,7 +46,7 @@
46
46
  "p-retry": "^7.0.0",
47
47
  "raw-body": "^3.0.1",
48
48
  "zod": "^3.25.67",
49
- "@aigne/openai": "^0.16.5-beta.2"
49
+ "@aigne/openai": "^0.16.5-beta.4"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@aigne/uuid": "^13.0.1",
@@ -61,10 +61,10 @@
61
61
  "npm-run-all": "^4.1.5",
62
62
  "rimraf": "^6.0.1",
63
63
  "typescript": "^5.9.2",
64
- "@aigne/agent-library": "^1.21.51-beta.2",
65
- "@aigne/core": "^1.65.1-beta.2",
66
- "@aigne/default-memory": "^1.2.14-beta.2",
67
- "@aigne/test-utils": "^0.5.58-beta.2"
64
+ "@aigne/agent-library": "^1.21.51-beta.4",
65
+ "@aigne/core": "^1.66.0-beta.3",
66
+ "@aigne/test-utils": "^0.5.58-beta.4",
67
+ "@aigne/default-memory": "^1.2.14-beta.4"
68
68
  },
69
69
  "scripts": {
70
70
  "lint": "tsc --noEmit",