windmill-labs/windmill · error
Invalid AI agent provider configuration: ${errors.join('\n')
Error message
Invalid AI agent provider configuration:
${errors.join('\n')}${knownOptionsHint(known)} What it means
validateAiAgentProviders aggregates configuration errors found across AI-agent flow modules and throws a single Error listing them, appended with knownOptionsHint(known) to suggest valid provider options. It runs as part of validateFlowModules, so a flow containing a misconfigured AI-agent step cannot proceed.
Source
Thrown at frontend/src/lib/components/copilot/chat/flow/aiAgentProviders.ts:313
if (value.agent) return
const transform = value.input_transforms?.provider
// A missing provider is reported by collectProviderlessAgentIds, and a javascript
// transform resolves at run time with no value to check here.
if (!transform || transform.type !== 'static') return
const issue = checkProviderValue(transform.value, known)
if (!issue) return
if (issue.blocking) {
errors.push(`Step "${mod.id}": ${issue.message}`)
} else if (issue.settled) {
warnings?.push(`Step "${mod.id}": ${issue.message}`)
} else {
warnings?.push(
`Step "${mod.id}": ${issue.message}, which could not be ruled out. Confirm it with the user if the step fails to run.`
)
}
})
if (errors.length > 0) {
throw new Error(
`Invalid AI agent provider configuration:\n${errors.join('\n')}${knownOptionsHint(known)}`
)
}
}
View on GitHub (pinned to e474e8803c)
Solutions
- Read the listed per-step errors and fix the provider config on the named step (id given in each line).
- Use the known-options hint appended to the message to pick a valid provider/model value.
- Verify required credentials/env vars for the provider are set before running the flow.
- If a provider was renamed after an upgrade, migrate the step config to the new provider id.
Example fix
// before
provider: { type: 'aiagent', provider: 'anthrpic', model: 'claude-3' }
// after
provider: { type: 'aiagent', provider: 'anthropic', model: 'claude-sonnet-4' } Defensive patterns
Strategy: validation
Validate before calling
const KNOWN = ['openai', 'anthropic', 'google', 'azure']
if (!KNOWN.includes(cfg.provider)) throw new Error(`Unknown provider: ${cfg.provider}`)
if (!cfg.apiKey && !cfg.apiKeyEnv) throw new Error('Missing provider credentials') Type guard
function isValidProviderConfig(cfg: unknown): cfg is AiAgentProviderConfig {
return typeof cfg === 'object' && cfg !== null &&
typeof (cfg as any).provider === 'string' &&
typeof (cfg as any).model === 'string'
} Try / catch
try {
validateAiAgentProviders(modules)
} catch (e) {
showConfigErrors(parseProviderErrors(e.message))
return
} Prevention
- Pick provider/model values from the known-options hint, not free text.
- Verify provider credentials (API keys/env vars) before deploying the flow.
- Re-validate flows after Windmill upgrades that may rename or drop providers.
When it happens
Trigger: Any AI-agent module in the flow has a provider config error: missing API key/env var reference, unknown provider name, invalid model id, or other per-step 'errors' entries collected during module validation, with errors.length > 0.
Common situations: Typo'd provider slug (e.g. 'anthrpic'); model name not available for the chosen provider; missing required credentials for the provider; provider renamed/removed in a newer Windmill version.
Related errors
- Cannot push flow ${remotePath}: step(s) reference non-worksp
- Module value is undefined for module ${module.id}
- Invalid ${field}:\n${errors.join('\n')}
- Invalid ${field}: id must be "${expectedId}"
- Invalid ${field}: only "rawscript" and "script" modules are
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/ca4e01051b7a0602.
Report an issue: GitHub.