@@ -22,6 +22,7 @@ import {NodeWebSocketFactory} from '../node/_node_websocket.js';
2222import { Operations } from '../operations.js' ;
2323import { Tokens } from '../tokens.js' ;
2424import { Tunings } from '../tunings.js' ;
25+ import { HttpOptions } from '../types.js' ;
2526import { NodeUploader } from './_node_uploader.js' ;
2627
2728const LANGUAGE_LABEL_PREFIX = 'gl-node/' ;
@@ -74,6 +75,7 @@ export class GoogleGenAI {
7475 private readonly project ?: string ;
7576 private readonly location ?: string ;
7677 private readonly apiVersion ?: string ;
78+ private readonly httpOptions ?: HttpOptions ;
7779 readonly models : Models ;
7880 readonly live : Live ;
7981 readonly batches : Batches ;
@@ -84,7 +86,6 @@ export class GoogleGenAI {
8486 readonly authTokens : Tokens ;
8587 readonly tunings : Tunings ;
8688 readonly fileSearchStores : FileSearchStores ;
87-
8889 constructor ( options : GoogleGenAIOptions ) {
8990 // Validate explicitly set initializer values.
9091 if ( ( options . project || options . location ) && options . apiKey ) {
@@ -158,6 +159,7 @@ export class GoogleGenAI {
158159 }
159160
160161 this . apiVersion = options . apiVersion ;
162+ this . httpOptions = options . httpOptions ;
161163 const auth = new NodeAuth ( {
162164 apiKey : this . apiKey ,
163165 googleAuthOptions : options . googleAuthOptions ,
@@ -169,7 +171,7 @@ export class GoogleGenAI {
169171 apiVersion : this . apiVersion ,
170172 apiKey : this . apiKey ,
171173 vertexai : this . vertexai ,
172- httpOptions : options . httpOptions ,
174+ httpOptions : this . httpOptions ,
173175 userAgentExtra : LANGUAGE_LABEL_PREFIX + process . version ,
174176 uploader : new NodeUploader ( ) ,
175177 downloader : new NodeDownloader ( ) ,
0 commit comments