File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -289,15 +289,13 @@ const localDenoHandler = async ({
289289
290290 // Strip null/undefined values so that the worker SDK client can fall back to
291291 // reading from environment variables (including any upstreamClientEnvs).
292- const opts : ClientOptions = Object . fromEntries (
293- Object . entries ( {
294- baseURL : client . baseURL ,
295- apiKey : client . apiKey ,
296- defaultHeaders : {
297- 'X-Stainless-MCP' : 'true' ,
298- } ,
299- } ) . filter ( ( [ _ , v ] ) => v != null ) ,
300- ) as ClientOptions ;
292+ const opts = {
293+ ...( client . baseURL != null ? { baseURL : client . baseURL } : undefined ) ,
294+ ...( client . apiKey != null ? { apiKey : client . apiKey } : undefined ) ,
295+ defaultHeaders : {
296+ 'X-Stainless-MCP' : 'true' ,
297+ } ,
298+ } satisfies Partial < ClientOptions > as ClientOptions ;
301299
302300 const req = worker . request (
303301 'http://localhost' ,
You can’t perform that action at this time.
0 commit comments