Skip to content

Commit a45b59e

Browse files
committed
fix: workflow execution on api call with /api/providers error
1 parent 6482e5f commit a45b59e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sim/executor/handlers/agent/agent-handler.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,11 @@ export class AgentBlockHandler implements BlockHandler {
160160
hasApiKey: !!providerRequest.apiKey,
161161
})
162162

163+
// Get the app URL from environment variable or use default
164+
const appUrl = process.env.NEXT_PUBLIC_APP_URL
165+
163166
try {
164-
const response = await fetch('/api/providers', {
167+
const response = await fetch(`${appUrl ? appUrl : ''}/api/providers`, {
165168
method: 'POST',
166169
headers: {
167170
'Content-Type': 'application/json',

0 commit comments

Comments
 (0)