eyaltoledano/claude-task-master · error · Error

Azure endpoint URL is required. Set it in .taskmasterconfig

Error message

Azure endpoint URL is required. Set it in .taskmasterconfig global.azureBaseURL or models.[role].baseURL

What it means

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.

Source

Thrown at src/ai-providers/azure.js:34

	 * Returns the environment variable name required for this provider's API key.
	 * @returns {string} The environment variable name for the Azure OpenAI API key
	 */
	getRequiredApiKeyName() {
		return 'AZURE_OPENAI_API_KEY';
	}

	/**
	 * Validates Azure-specific authentication parameters
	 * @param {object} params - Parameters to validate
	 * @throws {Error} If required parameters are missing
	 */
	validateAuth(params) {
		if (!params.apiKey) {
			throw new Error('Azure API key is required');
		}

		if (!params.baseURL) {
			throw new Error(
				'Azure endpoint URL is required. Set it in .taskmasterconfig global.azureBaseURL or models.[role].baseURL'
			);
		}
	}

	/**
	 * Normalizes the base URL to ensure it ends with /openai for proper Azure API routing.
	 * The Azure API expects paths like /openai/deployments/{model}/chat/completions
	 * @param {string} baseURL - Original base URL
	 * @returns {string} Normalized base URL ending with /openai
	 */
	normalizeBaseURL(baseURL) {
		if (!baseURL) return baseURL;

		try {
			const url = new URL(baseURL);
			let pathname = url.pathname.replace(/\/+$/, ''); // Remove trailing slashes

View on GitHub (pinned to c0c98d367c)

Solutions

  1. Set global.azureBaseURL in .taskmasterconfig to your Azure endpoint (https://<resource>.openai.azure.com)
  2. Or set baseURL for the specific role in the models config
  3. Or export AZURE_AZURE_OPENAI_BASE_URL environment variable

Example fix

// before (.taskmasterconfig)
{ "global": {} }
// after (.taskmasterconfig)
{ "global": { "azureBaseURL": "https://my-resource.openai.azure.com" } }
Defensive patterns

Strategy: validation

Validate before calling

const cfg = readConfig('.taskmasterconfig');
if (!cfg?.global?.azureBaseURL && !process.env.AZURE_AZURE_OPENAI_BASE_URL) throw new Error('Set global.azureBaseURL or AZURE_AZURE_OPENAI_BASE_URL for azure');

Type guard

function hasAzureEndpoint(params) { return typeof params?.baseURL === 'string' && params.baseURL.startsWith('https://'); }

Try / catch

try {
  await provider.generateText(params);
} catch (err) {
  if (err.message.startsWith('Azure endpoint URL is required')) {
    console.error('Add global.azureBaseURL to .taskmasterconfig');
  } else throw err;
}

Prevention

When it happens

Trigger: Using the azure provider when no baseURL was set via .taskmasterconfig global.azureBaseURL, models.[role].baseURL, or AZURE_AZURE_OPENAI_BASE_URL env var.

Common situations: 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.

Related errors


AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29). Data as JSON: /api/errors/91ee5b1593602093. Report an issue: GitHub.