mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
fix: workflow execution on api call with /api/providers error
This commit is contained in:
@@ -160,8 +160,11 @@ export class AgentBlockHandler implements BlockHandler {
|
||||
hasApiKey: !!providerRequest.apiKey,
|
||||
})
|
||||
|
||||
// Get the app URL from environment variable or use default
|
||||
const appUrl = process.env.NEXT_PUBLIC_APP_URL
|
||||
|
||||
try {
|
||||
const response = await fetch('/api/providers', {
|
||||
const response = await fetch(`${appUrl ? appUrl : ''}/api/providers`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
Reference in New Issue
Block a user