@google/genai 1.31.0 → 1.32.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/web/web.d.ts CHANGED
@@ -3017,6 +3017,10 @@ export declare interface GenerateContentConfig {
3017
3017
  /** The image generation configuration.
3018
3018
  */
3019
3019
  imageConfig?: ImageConfig;
3020
+ /** Enables enhanced civic answers. It may not be available for all
3021
+ models. This field is not supported in Vertex AI.
3022
+ */
3023
+ enableEnhancedCivicAnswers?: boolean;
3020
3024
  }
3021
3025
 
3022
3026
  /** Config for models.generate_content parameters. */
@@ -6704,6 +6708,17 @@ export declare class ReplayResponse {
6704
6708
  sdkResponseSegments?: Record<string, unknown>[];
6705
6709
  }
6706
6710
 
6711
+ /** ReplicatedVoiceConfig is used to configure replicated voice. */
6712
+ export declare interface ReplicatedVoiceConfig {
6713
+ /** The mime type of the replicated voice.
6714
+ */
6715
+ mimeType?: string;
6716
+ /** The sample audio of the replicated voice.
6717
+
6718
+ * @remarks Encoded as base64 string. */
6719
+ voiceSampleAudio?: string;
6720
+ }
6721
+
6707
6722
  /** Defines a retrieval tool that model can call to access external knowledge. This data type is not supported in Gemini API. */
6708
6723
  export declare interface Retrieval {
6709
6724
  /** Optional. Deprecated. This option is no longer supported. */
@@ -7194,12 +7209,11 @@ export declare interface SpeakerVoiceConfig {
7194
7209
  voiceConfig?: VoiceConfig;
7195
7210
  }
7196
7211
 
7197
- /** The speech generation config. */
7198
7212
  export declare interface SpeechConfig {
7213
+ /** Configuration for the voice of the response. */
7214
+ voiceConfig?: VoiceConfig;
7199
7215
  /** Optional. Language code (ISO 639. e.g. en-US) for the speech synthesization. */
7200
7216
  languageCode?: string;
7201
- /** The configuration for the speaker to use. */
7202
- voiceConfig?: VoiceConfig;
7203
7217
  /** Optional. The configuration for the multi-speaker setup. It is mutually exclusive with the voice_config field. This field is not supported in Vertex AI. */
7204
7218
  multiSpeakerVoiceConfig?: MultiSpeakerVoiceConfig;
7205
7219
  }
@@ -8049,6 +8063,12 @@ declare namespace types {
8049
8063
  LatLng,
8050
8064
  RetrievalConfig,
8051
8065
  ToolConfig,
8066
+ ReplicatedVoiceConfig,
8067
+ PrebuiltVoiceConfig,
8068
+ VoiceConfig,
8069
+ SpeakerVoiceConfig,
8070
+ MultiSpeakerVoiceConfig,
8071
+ SpeechConfig,
8052
8072
  AutomaticFunctionCallingConfig,
8053
8073
  ThinkingConfig,
8054
8074
  ImageConfig,
@@ -8136,11 +8156,6 @@ declare namespace types {
8136
8156
  DeleteModelConfig,
8137
8157
  DeleteModelParameters,
8138
8158
  DeleteModelResponse,
8139
- PrebuiltVoiceConfig,
8140
- VoiceConfig,
8141
- SpeakerVoiceConfig,
8142
- MultiSpeakerVoiceConfig,
8143
- SpeechConfig,
8144
8159
  GenerationConfig,
8145
8160
  CountTokensConfig,
8146
8161
  CountTokensParameters,
@@ -8849,8 +8864,9 @@ export declare interface VideoMetadata {
8849
8864
  startOffset?: string;
8850
8865
  }
8851
8866
 
8852
- /** The configuration for the voice to use. */
8853
8867
  export declare interface VoiceConfig {
8868
+ /** If true, the model will use a replicated voice for the response. */
8869
+ replicatedVoiceConfig?: ReplicatedVoiceConfig;
8854
8870
  /** The configuration for the prebuilt voice to use. */
8855
8871
  prebuiltVoiceConfig?: PrebuiltVoiceConfig;
8856
8872
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google/genai",
3
- "version": "1.31.0",
3
+ "version": "1.32.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/node/index.mjs",
@@ -82,13 +82,14 @@
82
82
  "devDependencies": {
83
83
  "@eslint/js": "9.20.0",
84
84
  "@microsoft/api-extractor": "^7.52.9",
85
- "@modelcontextprotocol/sdk": "^1.20.1",
85
+ "@modelcontextprotocol/sdk": "^1.24.0",
86
86
  "@rollup/plugin-json": "^6.1.0",
87
87
  "@types/jasmine": "^5.1.2",
88
88
  "@types/node": "^20.9.0",
89
89
  "@types/node-fetch": "^2.6.13",
90
90
  "@types/unist": "^3.0.3",
91
91
  "@types/ws": "^8.5.14",
92
+ "@cfworker/json-schema": "^4.1.1",
92
93
  "c8": "^10.1.3",
93
94
  "eslint": "8.57.0",
94
95
  "gts": "^5.2.0",
@@ -106,19 +107,19 @@
106
107
  "tslib": "^2.8.1",
107
108
  "tsx": "^4.19.4",
108
109
  "typedoc": "^0.27.0",
109
- "typescript": "~5.2.0",
110
+ "typescript": "~5.4.0",
110
111
  "typescript-eslint": "8.24.1",
111
112
  "undici": "^7.16.0",
112
113
  "undici-types": "^7.16.0",
113
- "zod": "^3.22.4",
114
- "zod-to-json-schema": "^3.22.4"
114
+ "zod": "^3.25.0",
115
+ "zod-to-json-schema": "^3.25.0"
115
116
  },
116
117
  "dependencies": {
117
118
  "google-auth-library": "^10.3.0",
118
119
  "ws": "^8.18.0"
119
120
  },
120
121
  "peerDependencies": {
121
- "@modelcontextprotocol/sdk": "^1.20.1"
122
+ "@modelcontextprotocol/sdk": "^1.24.0"
122
123
  },
123
124
  "peerDependenciesMeta": {
124
125
  "@modelcontextprotocol/sdk": {