@aigne/gemini 0.14.16-beta.1 → 0.14.16-beta.10

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,105 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.14.16-beta.10](https://github.com/AIGNE-io/aigne-framework/compare/gemini-v0.14.16-beta.9...gemini-v0.14.16-beta.10) (2026-01-02)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * The following workspace dependencies were updated
9
+ * dependencies
10
+ * @aigne/core bumped to 1.72.0-beta.9
11
+ * devDependencies
12
+ * @aigne/test-utils bumped to 0.5.69-beta.9
13
+
14
+ ## [0.14.16-beta.9](https://github.com/AIGNE-io/aigne-framework/compare/gemini-v0.14.16-beta.8...gemini-v0.14.16-beta.9) (2025-12-31)
15
+
16
+
17
+ ### Dependencies
18
+
19
+ * The following workspace dependencies were updated
20
+ * dependencies
21
+ * @aigne/core bumped to 1.72.0-beta.8
22
+ * devDependencies
23
+ * @aigne/test-utils bumped to 0.5.69-beta.8
24
+
25
+ ## [0.14.16-beta.8](https://github.com/AIGNE-io/aigne-framework/compare/gemini-v0.14.16-beta.7...gemini-v0.14.16-beta.8) (2025-12-26)
26
+
27
+
28
+ ### Dependencies
29
+
30
+ * The following workspace dependencies were updated
31
+ * dependencies
32
+ * @aigne/core bumped to 1.72.0-beta.7
33
+ * devDependencies
34
+ * @aigne/test-utils bumped to 0.5.69-beta.7
35
+
36
+ ## [0.14.16-beta.7](https://github.com/AIGNE-io/aigne-framework/compare/gemini-v0.14.16-beta.6...gemini-v0.14.16-beta.7) (2025-12-25)
37
+
38
+
39
+ ### Dependencies
40
+
41
+ * The following workspace dependencies were updated
42
+ * dependencies
43
+ * @aigne/core bumped to 1.72.0-beta.6
44
+ * devDependencies
45
+ * @aigne/test-utils bumped to 0.5.69-beta.6
46
+
47
+ ## [0.14.16-beta.6](https://github.com/AIGNE-io/aigne-framework/compare/gemini-v0.14.16-beta.5...gemini-v0.14.16-beta.6) (2025-12-25)
48
+
49
+
50
+ ### Dependencies
51
+
52
+ * The following workspace dependencies were updated
53
+ * dependencies
54
+ * @aigne/core bumped to 1.72.0-beta.5
55
+ * devDependencies
56
+ * @aigne/test-utils bumped to 0.5.69-beta.5
57
+
58
+ ## [0.14.16-beta.5](https://github.com/AIGNE-io/aigne-framework/compare/gemini-v0.14.16-beta.4...gemini-v0.14.16-beta.5) (2025-12-24)
59
+
60
+
61
+ ### Dependencies
62
+
63
+ * The following workspace dependencies were updated
64
+ * dependencies
65
+ * @aigne/core bumped to 1.72.0-beta.4
66
+ * devDependencies
67
+ * @aigne/test-utils bumped to 0.5.69-beta.4
68
+
69
+ ## [0.14.16-beta.4](https://github.com/AIGNE-io/aigne-framework/compare/gemini-v0.14.16-beta.3...gemini-v0.14.16-beta.4) (2025-12-22)
70
+
71
+
72
+ ### Bug Fixes
73
+
74
+ * **models:** parallel tool calls for gemini model ([#844](https://github.com/AIGNE-io/aigne-framework/issues/844)) ([adfae33](https://github.com/AIGNE-io/aigne-framework/commit/adfae337709295b594a8f5da61213535d2ef61aa))
75
+
76
+ ## [0.14.16-beta.3](https://github.com/AIGNE-io/aigne-framework/compare/gemini-v0.14.16-beta.2...gemini-v0.14.16-beta.3) (2025-12-19)
77
+
78
+
79
+ ### Features
80
+
81
+ * add prompt caching for OpenAI/Gemini/Anthropic and cache token display ([#838](https://github.com/AIGNE-io/aigne-framework/issues/838)) ([46c628f](https://github.com/AIGNE-io/aigne-framework/commit/46c628f180572ea1b955d1a9888aad6145204842))
82
+
83
+
84
+ ### Dependencies
85
+
86
+ * The following workspace dependencies were updated
87
+ * dependencies
88
+ * @aigne/core bumped to 1.72.0-beta.3
89
+ * devDependencies
90
+ * @aigne/test-utils bumped to 0.5.69-beta.3
91
+
92
+ ## [0.14.16-beta.2](https://github.com/AIGNE-io/aigne-framework/compare/gemini-v0.14.16-beta.1...gemini-v0.14.16-beta.2) (2025-12-19)
93
+
94
+
95
+ ### Dependencies
96
+
97
+ * The following workspace dependencies were updated
98
+ * dependencies
99
+ * @aigne/core bumped to 1.72.0-beta.2
100
+ * devDependencies
101
+ * @aigne/test-utils bumped to 0.5.69-beta.2
102
+
3
103
  ## [0.14.16-beta.1](https://github.com/AIGNE-io/aigne-framework/compare/gemini-v0.14.16-beta...gemini-v0.14.16-beta.1) (2025-12-17)
4
104
 
5
105
 
@@ -63,6 +63,9 @@ export declare class GeminiChatModel extends ChatModel {
63
63
  reasoningEffort?: number | "minimal" | "low" | "medium" | "high" | {
64
64
  $get: string;
65
65
  } | undefined;
66
+ cacheConfig?: import("@aigne/core").CacheConfig | {
67
+ $get: string;
68
+ } | undefined;
66
69
  }> | undefined;
67
70
  process(input: ChatModelInput, options: AgentInvokeOptions): PromiseOrValue<AgentProcessResult<ChatModelOutput>>;
68
71
  protected thinkingBudgetModelMap: ({
@@ -217,7 +217,6 @@ class GeminiChatModel extends core_1.ChatModel {
217
217
  };
218
218
  }
219
219
  toolCalls.push(toolCall);
220
- yield { delta: { json: { toolCalls } } };
221
220
  }
222
221
  }
223
222
  }
@@ -230,8 +229,15 @@ class GeminiChatModel extends core_1.ChatModel {
230
229
  usage.outputTokens =
231
230
  (chunk.usageMetadata.candidatesTokenCount || 0) +
232
231
  (chunk.usageMetadata.thoughtsTokenCount || 0);
232
+ // Parse cache statistics if available
233
+ if (chunk.usageMetadata.cachedContentTokenCount) {
234
+ usage.cacheReadInputTokens = chunk.usageMetadata.cachedContentTokenCount;
235
+ }
233
236
  }
234
237
  }
238
+ if (toolCalls.length) {
239
+ yield { delta: { json: { toolCalls } } };
240
+ }
235
241
  if (input.responseFormat?.type === "json_schema") {
236
242
  if (json) {
237
243
  yield { delta: { json: { json } } };
@@ -63,6 +63,9 @@ export declare class GeminiChatModel extends ChatModel {
63
63
  reasoningEffort?: number | "minimal" | "low" | "medium" | "high" | {
64
64
  $get: string;
65
65
  } | undefined;
66
+ cacheConfig?: import("@aigne/core").CacheConfig | {
67
+ $get: string;
68
+ } | undefined;
66
69
  }> | undefined;
67
70
  process(input: ChatModelInput, options: AgentInvokeOptions): PromiseOrValue<AgentProcessResult<ChatModelOutput>>;
68
71
  protected thinkingBudgetModelMap: ({
@@ -63,6 +63,9 @@ export declare class GeminiChatModel extends ChatModel {
63
63
  reasoningEffort?: number | "minimal" | "low" | "medium" | "high" | {
64
64
  $get: string;
65
65
  } | undefined;
66
+ cacheConfig?: import("@aigne/core").CacheConfig | {
67
+ $get: string;
68
+ } | undefined;
66
69
  }> | undefined;
67
70
  process(input: ChatModelInput, options: AgentInvokeOptions): PromiseOrValue<AgentProcessResult<ChatModelOutput>>;
68
71
  protected thinkingBudgetModelMap: ({
@@ -214,7 +214,6 @@ export class GeminiChatModel extends ChatModel {
214
214
  };
215
215
  }
216
216
  toolCalls.push(toolCall);
217
- yield { delta: { json: { toolCalls } } };
218
217
  }
219
218
  }
220
219
  }
@@ -227,8 +226,15 @@ export class GeminiChatModel extends ChatModel {
227
226
  usage.outputTokens =
228
227
  (chunk.usageMetadata.candidatesTokenCount || 0) +
229
228
  (chunk.usageMetadata.thoughtsTokenCount || 0);
229
+ // Parse cache statistics if available
230
+ if (chunk.usageMetadata.cachedContentTokenCount) {
231
+ usage.cacheReadInputTokens = chunk.usageMetadata.cachedContentTokenCount;
232
+ }
230
233
  }
231
234
  }
235
+ if (toolCalls.length) {
236
+ yield { delta: { json: { toolCalls } } };
237
+ }
232
238
  if (input.responseFormat?.type === "json_schema") {
233
239
  if (json) {
234
240
  yield { delta: { json: { json } } };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/gemini",
3
- "version": "0.14.16-beta.1",
3
+ "version": "0.14.16-beta.10",
4
4
  "description": "AIGNE Gemini SDK for integrating with Google's Gemini AI models",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -40,8 +40,8 @@
40
40
  "yaml": "^2.8.1",
41
41
  "zod": "^3.25.67",
42
42
  "zod-to-json-schema": "^3.24.6",
43
- "@aigne/core": "^1.72.0-beta.1",
44
- "@aigne/platform-helpers": "^0.6.7-beta"
43
+ "@aigne/platform-helpers": "^0.6.7-beta",
44
+ "@aigne/core": "^1.72.0-beta.9"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/bun": "^1.2.22",
@@ -49,7 +49,7 @@
49
49
  "npm-run-all": "^4.1.5",
50
50
  "rimraf": "^6.0.1",
51
51
  "typescript": "^5.9.2",
52
- "@aigne/test-utils": "^0.5.69-beta.1"
52
+ "@aigne/test-utils": "^0.5.69-beta.9"
53
53
  },
54
54
  "scripts": {
55
55
  "lint": "tsc --noEmit",