FlowiseAI/Flowise · critical · Error
Azure Foundry API Key is missing in credentials.
Error message
Azure Foundry API Key is missing in credentials.
What it means
Thrown by AzureRerankRetriever.init when getCredentialParam('azureFoundryApiKey', ...) returns falsy. The retriever cannot authorize calls to Azure AI Foundry without the key, so it aborts during node initialization before building the compressor.
Source
Thrown at packages/components/nodes/retrievers/AzureRerankRetriever/AzureRerankRetriever.ts:127
baseClasses: ['Document', 'json']
},
{
label: 'Text',
name: 'text',
description: 'Concatenated string from pageContent of documents',
baseClasses: ['string', 'json']
}
]
}
async init(nodeData: INodeData, input: string, options: ICommonObject): Promise<any> {
const baseRetriever = nodeData.inputs?.baseRetriever as BaseRetriever
const model = nodeData.inputs?.model as string
const query = nodeData.inputs?.query as string
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
const azureApiKey = getCredentialParam('azureFoundryApiKey', credentialData, nodeData)
if (!azureApiKey) {
throw new Error('Azure Foundry API Key is missing in credentials.')
}
const azureEndpoint = getCredentialParam('azureFoundryEndpoint', credentialData, nodeData)
if (!azureEndpoint) {
throw new Error('Azure Foundry Endpoint is missing in credentials.')
}
const topK = nodeData.inputs?.topK as string
const k = topK ? parseFloat(topK) : (baseRetriever as VectorStoreRetriever).k ?? 4
const maxChunksPerDoc = nodeData.inputs?.maxChunksPerDoc as string
const maxChunksPerDocValue = maxChunksPerDoc ? parseFloat(maxChunksPerDoc) : 10
const output = nodeData.outputs?.output as string
const azureCompressor = new AzureRerank(azureApiKey, azureEndpoint, model, k, maxChunksPerDocValue)
const retriever = new ContextualCompressionRetriever({
baseCompressor: azureCompressor,
baseRetriever: baseRetriever
})
View on GitHub (pinned to abe4a8601a)
Solutions
- Create an Azure AI Foundry credential in Flowise and fill the API Key field.
- Bind that credential to the Azure Rerank Retriever node.
- Verify the key is non-empty and has not been rotated out.
- Confirm the credential type exposes the azureFoundryApiKey parameter name.
Example fix
// before: no credential, or empty key // after: in Flowise UI, create credential with azureFoundryApiKey=<your-key> and select it on the node
Defensive patterns
Strategy: validation
Validate before calling
if (!azureApiKey) {
throw new Error('Azure Foundry API key is required. Create an Azure AI Foundry credential and bind it.')
} Type guard
function hasAzureApiKey(cred: unknown): cred is { azureFoundryApiKey: string } {
return !!cred && typeof (cred as any).azureFoundryApiKey === 'string' && (cred as any).azureFoundryApiKey.length > 0
} Try / catch
// Config error, not retryable. Catch only to surface a user-friendly message.
try {
await retriever.init(nodeData, input, options)
} catch (e) {
if (e instanceof Error && /API Key is missing/.test(e.message)) {
// show credential picker
}
throw e
} Prevention
- Create a dedicated Azure AI Foundry credential type with the key field required.
- Validate the credential is bound on the node before running the chatflow.
- Rotate keys via credential update, not by editing the chatflow.
When it happens
Trigger: No credential selected on the Azure Rerank Retriever node; selected credential lacks the azureFoundryApiKey field; credential saved with an empty key; wrong credential type bound.
Common situations: User created a generic Azure credential instead of the Foundry-specific one; key field left blank; credential was deleted or not shared with the chatflow.
Related errors
- Azure Foundry Endpoint is missing in credentials.
- Azure Rerank API call failed: ${error.message}
- OpenAI ApiKey not found
- Firecrawl API key not set. You can set it as FIRECRAWL_API_K
- Must specify one of "k" or "similarity_threshold".
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/b3c53006cfc5b784.
Report an issue: GitHub.