@aigne/core 1.63.0-beta.10 → 1.63.0-beta.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
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.63.0-beta.11](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.63.0-beta.10...core-v1.63.0-beta.11) (2025-10-17)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **gemini:** implement retry mechanism for empty responses with structured output fallback ([#638](https://github.com/AIGNE-io/aigne-framework/issues/638)) ([d33c8bb](https://github.com/AIGNE-io/aigne-framework/commit/d33c8bb9711aadddef9687d6cf472a179cd8ed9c))
9
+
3
10
  ## [1.63.0-beta.10](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.63.0-beta.9...core-v1.63.0-beta.10) (2025-10-16)
4
11
 
5
12
 
@@ -476,7 +476,7 @@ class Agent {
476
476
  if (!res.retry) {
477
477
  const e = res.error ?? error;
478
478
  if (attempt > 0)
479
- e.message += ` (after ${attempt} retries)`;
479
+ e.message += ` (after ${attempt + 1} retries)`;
480
480
  throw e;
481
481
  }
482
482
  }
@@ -42,7 +42,7 @@ const type_utils_js_1 = require("../utils/type-utils.js");
42
42
  const agent_js_1 = require("./agent.js");
43
43
  const model_js_1 = require("./model.js");
44
44
  const CHAT_MODEL_DEFAULT_RETRY_OPTIONS = {
45
- retries: 10,
45
+ retries: 3,
46
46
  shouldRetry: async (error) => error instanceof StructuredOutputError || (await Promise.resolve().then(() => __importStar(require("is-network-error")))).default(error),
47
47
  };
48
48
  class StructuredOutputError extends Error {
@@ -5,5 +5,6 @@ function mergeUsage(...usages) {
5
5
  return {
6
6
  inputTokens: usages.reduce((acc, usage) => (usage ? acc + usage.inputTokens : acc), 0),
7
7
  outputTokens: usages.reduce((acc, usage) => (usage ? acc + usage.outputTokens : acc), 0),
8
+ aigneHubCredits: usages.reduce((acc, usage) => (usage?.aigneHubCredits ? acc + usage.aigneHubCredits : acc), 0),
8
9
  };
9
10
  }
@@ -428,7 +428,7 @@ export class Agent {
428
428
  if (!res.retry) {
429
429
  const e = res.error ?? error;
430
430
  if (attempt > 0)
431
- e.message += ` (after ${attempt} retries)`;
431
+ e.message += ` (after ${attempt + 1} retries)`;
432
432
  throw e;
433
433
  }
434
434
  }
@@ -6,7 +6,7 @@ import { checkArguments, isNil, omitByDeep } from "../utils/type-utils.js";
6
6
  import { agentOptionsSchema, } from "./agent.js";
7
7
  import { fileContentSchema, fileUnionContentSchema, localContentSchema, Model, urlContentSchema, } from "./model.js";
8
8
  const CHAT_MODEL_DEFAULT_RETRY_OPTIONS = {
9
- retries: 10,
9
+ retries: 3,
10
10
  shouldRetry: async (error) => error instanceof StructuredOutputError || (await import("is-network-error")).default(error),
11
11
  };
12
12
  export class StructuredOutputError extends Error {
@@ -2,5 +2,6 @@ export function mergeUsage(...usages) {
2
2
  return {
3
3
  inputTokens: usages.reduce((acc, usage) => (usage ? acc + usage.inputTokens : acc), 0),
4
4
  outputTokens: usages.reduce((acc, usage) => (usage ? acc + usage.outputTokens : acc), 0),
5
+ aigneHubCredits: usages.reduce((acc, usage) => (usage?.aigneHubCredits ? acc + usage.aigneHubCredits : acc), 0),
5
6
  };
6
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/core",
3
- "version": "1.63.0-beta.10",
3
+ "version": "1.63.0-beta.11",
4
4
  "description": "The functional core of agentic AI",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -92,9 +92,9 @@
92
92
  "zod": "^3.25.67",
93
93
  "zod-from-json-schema": "^0.0.5",
94
94
  "zod-to-json-schema": "^3.24.6",
95
- "@aigne/observability-api": "^0.11.2-beta.5",
95
+ "@aigne/afs": "^1.1.0-beta",
96
96
  "@aigne/platform-helpers": "^0.6.3",
97
- "@aigne/afs": "^1.1.0-beta"
97
+ "@aigne/observability-api": "^0.11.2-beta.5"
98
98
  },
99
99
  "devDependencies": {
100
100
  "@types/bun": "^1.2.22",