@core-ai/google-genai 0.6.0 → 0.6.1
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 +14 -7
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -25,6 +25,18 @@ var DEFAULT_CAPABILITIES = {
|
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
var MODEL_CAPABILITIES = {
|
|
28
|
+
"gemini-3.1-pro": {
|
|
29
|
+
reasoning: {
|
|
30
|
+
thinkingParam: "thinkingLevel",
|
|
31
|
+
canDisableThinking: false
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"gemini-3.1-flash-lite-preview": {
|
|
35
|
+
reasoning: {
|
|
36
|
+
thinkingParam: "thinkingLevel",
|
|
37
|
+
canDisableThinking: false
|
|
38
|
+
}
|
|
39
|
+
},
|
|
28
40
|
"gemini-3-pro": {
|
|
29
41
|
reasoning: {
|
|
30
42
|
thinkingParam: "thinkingLevel",
|
|
@@ -307,11 +319,7 @@ function convertToolChoice(choice) {
|
|
|
307
319
|
};
|
|
308
320
|
}
|
|
309
321
|
function getStructuredOutputToolName(options) {
|
|
310
|
-
|
|
311
|
-
if (trimmedName && trimmedName.length > 0) {
|
|
312
|
-
return trimmedName;
|
|
313
|
-
}
|
|
314
|
-
return DEFAULT_STRUCTURED_OUTPUT_TOOL_NAME;
|
|
322
|
+
return options.schemaName?.trim() || DEFAULT_STRUCTURED_OUTPUT_TOOL_NAME;
|
|
315
323
|
}
|
|
316
324
|
function createStructuredOutputOptions(options) {
|
|
317
325
|
const toolName = getStructuredOutputToolName(options);
|
|
@@ -375,12 +383,11 @@ function createGenerateRequest(modelId, options) {
|
|
|
375
383
|
...mapGoogleProviderOptionsToConfig(googleOptions),
|
|
376
384
|
...options.signal ? { abortSignal: options.signal } : {}
|
|
377
385
|
};
|
|
378
|
-
|
|
386
|
+
return {
|
|
379
387
|
model: modelId,
|
|
380
388
|
contents: convertedMessages.contents,
|
|
381
389
|
config: requestConfig
|
|
382
390
|
};
|
|
383
|
-
return baseRequest;
|
|
384
391
|
}
|
|
385
392
|
function mapSamplingToConfig(options) {
|
|
386
393
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@core-ai/google-genai",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Google GenAI provider package for @core-ai/core-ai",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Omnifact (https://omnifact.ai)",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"test:watch": "vitest"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@core-ai/core-ai": "^0.6.
|
|
46
|
+
"@core-ai/core-ai": "^0.6.1",
|
|
47
47
|
"@google/genai": "^1.42.0",
|
|
48
48
|
"zod-to-json-schema": "^3.25.1"
|
|
49
49
|
},
|