File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -429,7 +429,10 @@ async function handleInternalRequest(
429429 typeof tool . request . url === 'function' ? tool . request . url ( params ) : tool . request . url
430430
431431 const fullUrlObj = new URL ( endpointUrl , baseUrl )
432- if ( executionContext ?. workflowId && typeof window === 'undefined' ) {
432+ const isInternalRoute = endpointUrl . startsWith ( '/api/' )
433+
434+ // Only add workflowId to internal routes, not external APIs
435+ if ( executionContext ?. workflowId && typeof window === 'undefined' && isInternalRoute ) {
433436 fullUrlObj . searchParams . set ( 'workflowId' , executionContext . workflowId )
434437 }
435438 const fullUrl = fullUrlObj . toString ( )
@@ -451,7 +454,6 @@ async function handleInternalRequest(
451454 }
452455
453456 const headers = new Headers ( requestParams . headers )
454- const isInternalRoute = endpointUrl . startsWith ( '/api/' )
455457 if ( typeof window === 'undefined' ) {
456458 if ( isInternalRoute ) {
457459 try {
You can’t perform that action at this time.
0 commit comments