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