@aigne/gemini 0.14.16-beta.2 → 0.14.16-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,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [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)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **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))
|
|
9
|
+
|
|
10
|
+
## [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)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* 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))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Dependencies
|
|
19
|
+
|
|
20
|
+
* The following workspace dependencies were updated
|
|
21
|
+
* dependencies
|
|
22
|
+
* @aigne/core bumped to 1.72.0-beta.3
|
|
23
|
+
* devDependencies
|
|
24
|
+
* @aigne/test-utils bumped to 0.5.69-beta.3
|
|
25
|
+
|
|
3
26
|
## [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)
|
|
4
27
|
|
|
5
28
|
|
|
@@ -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.
|
|
3
|
+
"version": "0.14.16-beta.4",
|
|
4
4
|
"description": "AIGNE Gemini SDK for integrating with Google's Gemini AI models",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -40,7 +40,7 @@
|
|
|
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.
|
|
43
|
+
"@aigne/core": "^1.72.0-beta.3",
|
|
44
44
|
"@aigne/platform-helpers": "^0.6.7-beta"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
@@ -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.
|
|
52
|
+
"@aigne/test-utils": "^0.5.69-beta.3"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"lint": "tsc --noEmit",
|