{"record":{"id":"91ee5b1593602093","repo":"eyaltoledano/claude-task-master","slug":"azure-endpoint-url-is-required-set-it-in-taskmas","errorCode":null,"errorMessage":"Azure endpoint URL is required. Set it in .taskmasterconfig global.azureBaseURL or models.[role].baseURL","messagePattern":"Azure endpoint URL is required\\. Set it in \\.taskmasterconfig global\\.azureBaseURL or models\\.\\[role\\]\\.baseURL","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/ai-providers/azure.js","lineNumber":34,"sourceCode":"\t * Returns the environment variable name required for this provider's API key.\n\t * @returns {string} The environment variable name for the Azure OpenAI API key\n\t */\n\tgetRequiredApiKeyName() {\n\t\treturn 'AZURE_OPENAI_API_KEY';\n\t}\n\n\t/**\n\t * Validates Azure-specific authentication parameters\n\t * @param {object} params - Parameters to validate\n\t * @throws {Error} If required parameters are missing\n\t */\n\tvalidateAuth(params) {\n\t\tif (!params.apiKey) {\n\t\t\tthrow new Error('Azure API key is required');\n\t\t}\n\n\t\tif (!params.baseURL) {\n\t\t\tthrow new Error(\n\t\t\t\t'Azure endpoint URL is required. Set it in .taskmasterconfig global.azureBaseURL or models.[role].baseURL'\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Normalizes the base URL to ensure it ends with /openai for proper Azure API routing.\n\t * The Azure API expects paths like /openai/deployments/{model}/chat/completions\n\t * @param {string} baseURL - Original base URL\n\t * @returns {string} Normalized base URL ending with /openai\n\t */\n\tnormalizeBaseURL(baseURL) {\n\t\tif (!baseURL) return baseURL;\n\n\t\ttry {\n\t\t\tconst url = new URL(baseURL);\n\t\t\tlet pathname = url.pathname.replace(/\\/+$/, ''); // Remove trailing slashes\n","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/src/ai-providers/azure.js#L16-L52","documentation":"AzureProvider.validateAuth() requires params.baseURL because the Azure OpenAI resource endpoint is deployment-specific and cannot be defaulted. The error tells you exactly where to configure it: global.azureBaseURL in .taskmasterconfig or per-role baseURL in models config.","triggerScenarios":"Using the azure provider when no baseURL was set via .taskmasterconfig global.azureBaseURL, models.[role].baseURL, or AZURE_AZURE_OPENAI_BASE_URL env var.","commonSituations":"New Azure setup where the resource endpoint was never configured; switching the main role to azure without updating config; typo'd config key so baseURL resolves to undefined.","solutions":["Set global.azureBaseURL in .taskmasterconfig to your Azure endpoint (https://<resource>.openai.azure.com)","Or set baseURL for the specific role in the models config","Or export AZURE_AZURE_OPENAI_BASE_URL environment variable"],"exampleFix":"// before (.taskmasterconfig)\n{ \"global\": {} }\n// after (.taskmasterconfig)\n{ \"global\": { \"azureBaseURL\": \"https://my-resource.openai.azure.com\" } }","handlingStrategy":"validation","validationCode":"const cfg = readConfig('.taskmasterconfig');\nif (!cfg?.global?.azureBaseURL && !process.env.AZURE_AZURE_OPENAI_BASE_URL) throw new Error('Set global.azureBaseURL or AZURE_AZURE_OPENAI_BASE_URL for azure');","typeGuard":"function hasAzureEndpoint(params) { return typeof params?.baseURL === 'string' && params.baseURL.startsWith('https://'); }","tryCatchPattern":"try {\n  await provider.generateText(params);\n} catch (err) {\n  if (err.message.startsWith('Azure endpoint URL is required')) {\n    console.error('Add global.azureBaseURL to .taskmasterconfig');\n  } else throw err;\n}","preventionTips":["Configure azureBaseURL when first switching a role to azure","Validate config schema at startup so missing fields surface early","Use the exact endpoint form https://<resource>.openai.azure.com"],"tags":["azure","configuration","baseurl","endpoint"],"backgroundTag":"missing-endpoint-configuration","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}