@core-ai/google-genai 0.24.0 → 0.25.0
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/dist/index.js +15 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -8,12 +8,14 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
getProviderMetadata,
|
|
10
10
|
validateInputModalities,
|
|
11
|
+
validateToolSchemaStrictness,
|
|
11
12
|
zodSchemaToJsonSchema
|
|
12
13
|
} from "@core-ai/core-ai";
|
|
13
14
|
|
|
14
15
|
// src/model-capabilities.ts
|
|
15
16
|
import {
|
|
16
|
-
stripModelDateSuffix
|
|
17
|
+
stripModelDateSuffix,
|
|
18
|
+
UNSUPPORTED_TOOL_SCHEMA_STRICTNESS
|
|
17
19
|
} from "@core-ai/core-ai";
|
|
18
20
|
var ALL_EFFORTS = [
|
|
19
21
|
"minimal",
|
|
@@ -35,7 +37,10 @@ function createCapabilities(config) {
|
|
|
35
37
|
supportedToolChoices: ["auto", "none", "required", "tool"],
|
|
36
38
|
thinkingParam: config.thinkingParam
|
|
37
39
|
},
|
|
38
|
-
modalities: GOOGLE_INPUT_MODALITIES
|
|
40
|
+
modalities: GOOGLE_INPUT_MODALITIES,
|
|
41
|
+
tools: {
|
|
42
|
+
strictSchemas: UNSUPPORTED_TOOL_SCHEMA_STRICTNESS
|
|
43
|
+
}
|
|
39
44
|
};
|
|
40
45
|
}
|
|
41
46
|
var DEFAULT_CAPABILITIES = createCapabilities({
|
|
@@ -393,6 +398,14 @@ function createGenerateRequest(modelId, options, provider = DEFAULT_PROVIDER_ID,
|
|
|
393
398
|
modelId,
|
|
394
399
|
providerId: provider
|
|
395
400
|
});
|
|
401
|
+
if (options.tools) {
|
|
402
|
+
validateToolSchemaStrictness({
|
|
403
|
+
tools: options.tools,
|
|
404
|
+
capabilities,
|
|
405
|
+
providerId: provider,
|
|
406
|
+
modelId
|
|
407
|
+
});
|
|
408
|
+
}
|
|
396
409
|
const convertedMessages = convertMessages(options.messages);
|
|
397
410
|
const requestConfig = {
|
|
398
411
|
...convertedMessages.systemInstruction ? { systemInstruction: convertedMessages.systemInstruction } : {},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@core-ai/google-genai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Google GenAI provider package for @core-ai/core-ai",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Omnifact (https://omnifact.ai)",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"test:watch": "vitest"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@core-ai/core-ai": "^0.
|
|
48
|
+
"@core-ai/core-ai": "^0.25.0",
|
|
49
49
|
"@google/genai": "^1.42.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|