{"record":{"id":"e5a5030f4b8814ae","repo":"FlowiseAI/Flowise","slug":"azure-foundry-endpoint-is-missing-in-credentials","errorCode":null,"errorMessage":"Azure Foundry Endpoint is missing in credentials.","messagePattern":"Azure Foundry Endpoint is missing in credentials\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/components/nodes/retrievers/AzureRerankRetriever/AzureRerankRetriever.ts","lineNumber":131,"sourceCode":"                name: 'text',\n                description: 'Concatenated string from pageContent of documents',\n                baseClasses: ['string', 'json']\n            }\n        ]\n    }\n\n    async init(nodeData: INodeData, input: string, options: ICommonObject): Promise<any> {\n        const baseRetriever = nodeData.inputs?.baseRetriever as BaseRetriever\n        const model = nodeData.inputs?.model as string\n        const query = nodeData.inputs?.query as string\n        const credentialData = await getCredentialData(nodeData.credential ?? '', options)\n        const azureApiKey = getCredentialParam('azureFoundryApiKey', credentialData, nodeData)\n        if (!azureApiKey) {\n            throw new Error('Azure Foundry API Key is missing in credentials.')\n        }\n        const azureEndpoint = getCredentialParam('azureFoundryEndpoint', credentialData, nodeData)\n        if (!azureEndpoint) {\n            throw new Error('Azure Foundry Endpoint is missing in credentials.')\n        }\n        const topK = nodeData.inputs?.topK as string\n        const k = topK ? parseFloat(topK) : (baseRetriever as VectorStoreRetriever).k ?? 4\n        const maxChunksPerDoc = nodeData.inputs?.maxChunksPerDoc as string\n        const maxChunksPerDocValue = maxChunksPerDoc ? parseFloat(maxChunksPerDoc) : 10\n        const output = nodeData.outputs?.output as string\n\n        const azureCompressor = new AzureRerank(azureApiKey, azureEndpoint, model, k, maxChunksPerDocValue)\n\n        const retriever = new ContextualCompressionRetriever({\n            baseCompressor: azureCompressor,\n            baseRetriever: baseRetriever\n        })\n\n        if (output === 'retriever') return retriever\n        else if (output === 'document') return await retriever._getRelevantDocuments(query ? query : input)\n        else if (output === 'text') {\n            let finaltext = ''","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/retrievers/AzureRerankRetriever/AzureRerankRetriever.ts#L113-L149","documentation":"Thrown by AzureRerankRetriever.init when getCredentialParam('azureFoundryEndpoint', ...) returns falsy. Even with a valid key, Azure AI Foundry requires the per-deployment inference endpoint URL; without it the rerank call has no target. The check runs immediately after the API-key check.","triggerScenarios":"Credential bound but azureFoundryEndpoint field left blank; only a regional prefix was entered; URL stored in a differently named field.","commonSituations":"User copied only the key and forgot the endpoint from the Azure portal; confused the Foundry endpoint with the resource management endpoint; trailing/leading whitespace stripped to empty.","solutions":["From Azure AI Foundry portal, copy the model's inference endpoint URL into the credential's azureFoundryEndpoint field.","Ensure the URL includes https:// and the full deployment path.","Re-select the credential on the node after editing.","Confirm the field name matches azureFoundryEndpoint exactly."],"exampleFix":"// before: endpoint field empty\n// after: credential.azureFoundryEndpoint = 'https://<resource>.services.ai.azure.com/models/rerank'","handlingStrategy":"validation","validationCode":"function isValidEndpoint(url: string): boolean {\n  try { const u = new URL(url); return u.protocol === 'https:' && !!u.hostname } catch { return false }\n}\nif (!azureEndpoint || !isValidEndpoint(azureEndpoint)) {\n  throw new Error('A valid HTTPS Azure Foundry endpoint URL is required.')\n}","typeGuard":"function isAzureEndpointUrl(s: unknown): s is string {\n  if (typeof s !== 'string' || s.length === 0) return false\n  try { const u = new URL(s); return u.protocol === 'https:' } catch { return false }\n}","tryCatchPattern":"try {\n  await retriever.init(nodeData, input, options)\n} catch (e) {\n  if (e instanceof Error && /Endpoint is missing/.test(e.message)) {\n    // prompt for endpoint URL in credential\n  }\n  throw e\n}","preventionTips":["Copy the full inference endpoint URL from Azure AI Foundry portal.","Validate it parses as an https URL at credential save time.","Bind a single credential containing both key and endpoint."],"tags":["azure","rerank","credentials","retriever","config","endpoint"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}