File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -283,15 +283,13 @@ const localDenoHandler = async ({
283283
284284 // Strip null/undefined values so that the worker SDK client can fall back to
285285 // reading from environment variables (including any upstreamClientEnvs).
286- const opts : ClientOptions = Object . fromEntries (
287- Object . entries ( {
288- baseURL : client . baseURL ,
289- apiKey : client . apiKey ,
290- defaultHeaders : {
291- 'X-Stainless-MCP' : 'true' ,
292- } ,
293- } ) . filter ( ( [ _ , v ] ) => v != null ) ,
294- ) as ClientOptions ;
286+ const opts = {
287+ ...( client . baseURL != null ? { baseURL : client . baseURL } : undefined ) ,
288+ ...( client . apiKey != null ? { apiKey : client . apiKey } : undefined ) ,
289+ defaultHeaders : {
290+ 'X-Stainless-MCP' : 'true' ,
291+ } ,
292+ } satisfies Partial < ClientOptions > as ClientOptions ;
295293
296294 const req = worker . request (
297295 'http://localhost' ,
You can’t perform that action at this time.
0 commit comments