eyaltoledano/claude-task-master · error
Model '${modelId || 'unknown'}' via provider '${providerName
Error message
Model '${modelId || 'unknown'}' via provider '${providerName || 'unknown'}' does not support the 'tool use' required by generateObjectService. Please configure a model that supports tool/function calling for the '${currentRole}' role, or use generateTextService if structured output is not strictly required. What it means
Thrown by _unifiedServiceRunner in ai-services-unified.js when the underlying AI SDK reports that the configured model does not support tool/function calling, which generateObjectService requires for structured output. Task Master builds a clean error naming the model, provider, and role so you know exactly which config entry to change. It aborts the whole role fallback sequence because every role in it would hit the same limitation.
Source
Thrown at scripts/modules/ai-services-unified.js:771
);
lastError = error;
lastCleanErrorMessage = cleanMessage;
if (serviceType === 'generateObject') {
const lowerCaseMessage = cleanMessage.toLowerCase();
if (
lowerCaseMessage.includes(
'no endpoints found that support tool use'
) ||
lowerCaseMessage.includes('does not support tool_use') ||
lowerCaseMessage.includes('tool use is not supported') ||
lowerCaseMessage.includes('tools are not supported') ||
lowerCaseMessage.includes('function calling is not supported') ||
lowerCaseMessage.includes('tool use is not supported')
) {
const specificErrorMsg = `Model '${modelId || 'unknown'}' via provider '${providerName || 'unknown'}' does not support the 'tool use' required by generateObjectService. Please configure a model that supports tool/function calling for the '${currentRole}' role, or use generateTextService if structured output is not strictly required.`;
log('error', `[Tool Support Error] ${specificErrorMsg}`);
throw new Error(specificErrorMsg);
}
}
}
}
log('error', `All roles in the sequence [${sequence.join(', ')}] failed.`);
throw new Error(lastCleanErrorMessage);
}
/**
* Unified service function for generating text.
* Handles client retrieval, retries, and fallback sequence.
*
* @param {object} params - Parameters for the service call.
* @param {string} params.role - The initial client role ('main', 'research', 'fallback').
* @param {object} [params.session=null] - Optional MCP session object.
* @param {string} [params.projectRoot=null] - Optional project root path for .env fallback.
* @param {string} params.prompt - The prompt for the AI.View on GitHub (pinned to c0c98d367c)
Solutions
- Set a tool-calling-capable model for the role (task-master models --set-<role>=<model> or edit .taskmasterconfig), e.g. claude-sonnet, gpt-4o, gemini-2.5-pro.
- Verify the provider supports function calling at all; for custom baseURLs confirm the endpoint implements the tools parameter.
- If structured output is optional, switch that call path to generateTextService and parse text manually.
- Run `task-master models` to list roles and confirm which model is assigned to main/research/fallback.
Example fix
// .taskmasterconfig before
"main": { "provider": "openai", "modelId": "gpt-3.5-turbo-instruct" }
// after
"main": { "provider": "openai", "modelId": "gpt-4o" } Defensive patterns
Strategy: fallback
Validate before calling
const tcModels = ['claude-sonnet-4-5','gpt-4o','gemini-2.5-pro'];
const cfg = JSON.parse(readFileSync('.taskmaster/config.json','utf8'));
if (!tcModels.includes(cfg.models.main.modelId)) console.warn(`Model ${cfg.models.main.modelId} may not support tool calling; generateObjectService will fail.`); Try / catch
try {
await generateObjectService({ role: 'main', schema, prompt });
} catch (e) {
if (String(e.message).includes("does not support the 'tool use'")) {
const text = await generateTextService({ role: 'main', prompt });
return JSON.parse(extractJson(text));
}
throw e;
} Prevention
- Assign known tool-calling models to roles via `task-master models`.
- Test a model with a tiny generateObjectService call before using it in workflows.
- Keep a fallback role on a different provider that supports function calling.
- Check provider docs for function-calling support when adding custom baseURLs.
When it happens
Trigger: Calling generateObjectService (or streamObjectService) with a model whose provider returns an error matching 'tools are not supported', 'function calling is not supported', or 'tool use is not supported' — e.g. a chat-only or completion-only model id in .taskmasterconfig.
Common situations: Configuring a role with a model like a text-embedding or legacy completion model, using a custom OpenAI-compatible endpoint whose model lacks tool support, or switching providers without updating role model assignments.
Related errors
- Model "${model}" is not available for provider "${this.getNa
- AUTHENTICATION_ERROR
- Prompt must be a non-empty string
- Prompt cannot be empty or only whitespace
- VALIDATION_ERROR
AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29).
Data as JSON: /api/errors/65569a633d5fac14.
Report an issue: GitHub.