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