@aigne/core 1.72.0-beta.5 → 1.72.0-beta.6
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 +7 -0
- package/lib/cjs/agents/chat-model.js +18 -4
- package/lib/esm/agents/chat-model.js +18 -4
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.72.0-beta.6](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.72.0-beta.5...core-v1.72.0-beta.6) (2025-12-25)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **core:** passthrough model options in chat model ([#856](https://github.com/AIGNE-io/aigne-framework/issues/856)) ([41387bd](https://github.com/AIGNE-io/aigne-framework/commit/41387bde0a615080ea5d665e998afb0b9c32c5fd))
|
|
9
|
+
|
|
3
10
|
## [1.72.0-beta.5](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.72.0-beta.4...core-v1.72.0-beta.5) (2025-12-25)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -378,15 +378,29 @@ const modelOptionsSchemaProperties = {
|
|
|
378
378
|
zod_1.z.literal("medium"),
|
|
379
379
|
zod_1.z.literal("high"),
|
|
380
380
|
]),
|
|
381
|
+
cacheConfig: zod_1.z.object({
|
|
382
|
+
enabled: (0, schema_js_1.optionalize)(zod_1.z.boolean().default(true)),
|
|
383
|
+
ttl: (0, schema_js_1.optionalize)(zod_1.z.union([zod_1.z.literal("5m"), zod_1.z.literal("1h"), zod_1.z.number()]).default("5m")),
|
|
384
|
+
strategy: (0, schema_js_1.optionalize)(zod_1.z.union([zod_1.z.literal("auto"), zod_1.z.literal("manual")]).default("auto")),
|
|
385
|
+
autoBreakpoints: (0, schema_js_1.optionalize)(zod_1.z.object({
|
|
386
|
+
tools: (0, schema_js_1.optionalize)(zod_1.z.boolean().default(true)),
|
|
387
|
+
system: (0, schema_js_1.optionalize)(zod_1.z.boolean().default(true)),
|
|
388
|
+
lastMessage: (0, schema_js_1.optionalize)(zod_1.z.boolean().default(false)),
|
|
389
|
+
})),
|
|
390
|
+
}),
|
|
381
391
|
};
|
|
382
|
-
const modelOptionsSchema = zod_1.z
|
|
392
|
+
const modelOptionsSchema = zod_1.z
|
|
393
|
+
.object(Object.fromEntries(Object.entries(modelOptionsSchemaProperties).map(([key, schema]) => [
|
|
383
394
|
key,
|
|
384
395
|
(0, schema_js_1.optionalize)(schema),
|
|
385
|
-
])))
|
|
386
|
-
|
|
396
|
+
])))
|
|
397
|
+
.passthrough();
|
|
398
|
+
const modelOptionsWithGetterSchema = zod_1.z
|
|
399
|
+
.object(Object.fromEntries(Object.entries(modelOptionsSchemaProperties).map(([key, schema]) => [
|
|
387
400
|
key,
|
|
388
401
|
(0, schema_js_1.optionalize)((0, agent_js_1.getterSchema)(schema)),
|
|
389
|
-
])))
|
|
402
|
+
])))
|
|
403
|
+
.passthrough();
|
|
390
404
|
const chatModelOptionsSchema = agent_js_1.agentOptionsSchema.extend({
|
|
391
405
|
model: (0, schema_js_1.optionalize)(zod_1.z.string()),
|
|
392
406
|
modelOptions: (0, schema_js_1.optionalize)(modelOptionsWithGetterSchema),
|
|
@@ -340,15 +340,29 @@ const modelOptionsSchemaProperties = {
|
|
|
340
340
|
z.literal("medium"),
|
|
341
341
|
z.literal("high"),
|
|
342
342
|
]),
|
|
343
|
+
cacheConfig: z.object({
|
|
344
|
+
enabled: optionalize(z.boolean().default(true)),
|
|
345
|
+
ttl: optionalize(z.union([z.literal("5m"), z.literal("1h"), z.number()]).default("5m")),
|
|
346
|
+
strategy: optionalize(z.union([z.literal("auto"), z.literal("manual")]).default("auto")),
|
|
347
|
+
autoBreakpoints: optionalize(z.object({
|
|
348
|
+
tools: optionalize(z.boolean().default(true)),
|
|
349
|
+
system: optionalize(z.boolean().default(true)),
|
|
350
|
+
lastMessage: optionalize(z.boolean().default(false)),
|
|
351
|
+
})),
|
|
352
|
+
}),
|
|
343
353
|
};
|
|
344
|
-
const modelOptionsSchema = z
|
|
354
|
+
const modelOptionsSchema = z
|
|
355
|
+
.object(Object.fromEntries(Object.entries(modelOptionsSchemaProperties).map(([key, schema]) => [
|
|
345
356
|
key,
|
|
346
357
|
optionalize(schema),
|
|
347
|
-
])))
|
|
348
|
-
|
|
358
|
+
])))
|
|
359
|
+
.passthrough();
|
|
360
|
+
const modelOptionsWithGetterSchema = z
|
|
361
|
+
.object(Object.fromEntries(Object.entries(modelOptionsSchemaProperties).map(([key, schema]) => [
|
|
349
362
|
key,
|
|
350
363
|
optionalize(getterSchema(schema)),
|
|
351
|
-
])))
|
|
364
|
+
])))
|
|
365
|
+
.passthrough();
|
|
352
366
|
const chatModelOptionsSchema = agentOptionsSchema.extend({
|
|
353
367
|
model: optionalize(z.string()),
|
|
354
368
|
modelOptions: optionalize(modelOptionsWithGetterSchema),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/core",
|
|
3
|
-
"version": "1.72.0-beta.
|
|
3
|
+
"version": "1.72.0-beta.6",
|
|
4
4
|
"description": "The functional core of agentic AI",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -94,9 +94,9 @@
|
|
|
94
94
|
"zod-from-json-schema": "^0.0.5",
|
|
95
95
|
"zod-to-json-schema": "^3.24.6",
|
|
96
96
|
"@aigne/afs": "^1.4.0-beta.3",
|
|
97
|
-
"@aigne/observability-api": "^0.11.14-beta.1",
|
|
98
97
|
"@aigne/afs-history": "^1.2.0-beta.3",
|
|
99
|
-
"@aigne/platform-helpers": "^0.6.7-beta"
|
|
98
|
+
"@aigne/platform-helpers": "^0.6.7-beta",
|
|
99
|
+
"@aigne/observability-api": "^0.11.14-beta.1"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"@types/bun": "^1.2.22",
|