@google/genai 1.5.0 → 1.5.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.cjs CHANGED
@@ -1,7 +1,6 @@
1
1
  'use strict';
2
2
 
3
3
  var zod = require('zod');
4
- var types_js = require('@modelcontextprotocol/sdk/types.js');
5
4
 
6
5
  /**
7
6
  * @license
@@ -4354,7 +4353,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
4354
4353
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
4355
4354
  const USER_AGENT_HEADER = 'User-Agent';
4356
4355
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
4357
- const SDK_VERSION = '1.5.0'; // x-release-please-version
4356
+ const SDK_VERSION = '1.5.1'; // x-release-please-version
4358
4357
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
4359
4358
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
4360
4359
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -4984,10 +4983,8 @@ function sleep(ms) {
4984
4983
  * Copyright 2025 Google LLC
4985
4984
  * SPDX-License-Identifier: Apache-2.0
4986
4985
  */
4987
- // TODO((b/401271082): re-enable lint once CrossWebSocketFactory is implemented.
4988
- /* eslint-disable @typescript-eslint/no-unused-vars */
4989
4986
  class CrossWebSocketFactory {
4990
- create(url, headers, callbacks) {
4987
+ create(_url, _headers, _callbacks) {
4991
4988
  throw crossError();
4992
4989
  }
4993
4990
  }
@@ -11447,9 +11444,10 @@ class McpCallableTool {
11447
11444
  const callToolResponse = await mcpClient.callTool({
11448
11445
  name: functionCall.name,
11449
11446
  arguments: functionCall.args,
11450
- CallToolResultSchema: types_js.CallToolResultSchema,
11451
- requestOptions,
11452
- });
11447
+ },
11448
+ // Set the result schema to undefined to allow MCP to rely on the
11449
+ // default schema.
11450
+ undefined, requestOptions);
11453
11451
  functionCallResponseParts.push({
11454
11452
  functionResponse: {
11455
11453
  name: functionCall.name,
package/dist/index.mjs CHANGED
@@ -1,5 +1,4 @@
1
1
  import { z } from 'zod';
2
- import { CallToolResultSchema } from '@modelcontextprotocol/sdk/types.js';
3
2
 
4
3
  /**
5
4
  * @license
@@ -4352,7 +4351,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
4352
4351
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
4353
4352
  const USER_AGENT_HEADER = 'User-Agent';
4354
4353
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
4355
- const SDK_VERSION = '1.5.0'; // x-release-please-version
4354
+ const SDK_VERSION = '1.5.1'; // x-release-please-version
4356
4355
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
4357
4356
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
4358
4357
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -4982,10 +4981,8 @@ function sleep(ms) {
4982
4981
  * Copyright 2025 Google LLC
4983
4982
  * SPDX-License-Identifier: Apache-2.0
4984
4983
  */
4985
- // TODO((b/401271082): re-enable lint once CrossWebSocketFactory is implemented.
4986
- /* eslint-disable @typescript-eslint/no-unused-vars */
4987
4984
  class CrossWebSocketFactory {
4988
- create(url, headers, callbacks) {
4985
+ create(_url, _headers, _callbacks) {
4989
4986
  throw crossError();
4990
4987
  }
4991
4988
  }
@@ -11445,9 +11442,10 @@ class McpCallableTool {
11445
11442
  const callToolResponse = await mcpClient.callTool({
11446
11443
  name: functionCall.name,
11447
11444
  arguments: functionCall.args,
11448
- CallToolResultSchema,
11449
- requestOptions,
11450
- });
11445
+ },
11446
+ // Set the result schema to undefined to allow MCP to rely on the
11447
+ // default schema.
11448
+ undefined, requestOptions);
11451
11449
  functionCallResponseParts.push({
11452
11450
  functionResponse: {
11453
11451
  name: functionCall.name,