{"record":{"id":"65569a633d5fac14","repo":"eyaltoledano/claude-task-master","slug":"model-modelid-unknown-via-provider-pr","errorCode":null,"errorMessage":"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.","messagePattern":"Model '(.+?)' via provider '(.+?)' does not support the 'tool use' required by generateObjectService\\. Please configure a model that supports tool/function calling for the '(.+?)' role, or use generateTextService if structured output is not strictly required\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/modules/ai-services-unified.js","lineNumber":771,"sourceCode":"\t\t\t);\n\t\t\tlastError = error;\n\t\t\tlastCleanErrorMessage = cleanMessage;\n\n\t\t\tif (serviceType === 'generateObject') {\n\t\t\t\tconst lowerCaseMessage = cleanMessage.toLowerCase();\n\t\t\t\tif (\n\t\t\t\t\tlowerCaseMessage.includes(\n\t\t\t\t\t\t'no endpoints found that support tool use'\n\t\t\t\t\t) ||\n\t\t\t\t\tlowerCaseMessage.includes('does not support tool_use') ||\n\t\t\t\t\tlowerCaseMessage.includes('tool use is not supported') ||\n\t\t\t\t\tlowerCaseMessage.includes('tools are not supported') ||\n\t\t\t\t\tlowerCaseMessage.includes('function calling is not supported') ||\n\t\t\t\t\tlowerCaseMessage.includes('tool use is not supported')\n\t\t\t\t) {\n\t\t\t\t\tconst 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.`;\n\t\t\t\t\tlog('error', `[Tool Support Error] ${specificErrorMsg}`);\n\t\t\t\t\tthrow new Error(specificErrorMsg);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tlog('error', `All roles in the sequence [${sequence.join(', ')}] failed.`);\n\tthrow new Error(lastCleanErrorMessage);\n}\n\n/**\n * Unified service function for generating text.\n * Handles client retrieval, retries, and fallback sequence.\n *\n * @param {object} params - Parameters for the service call.\n * @param {string} params.role - The initial client role ('main', 'research', 'fallback').\n * @param {object} [params.session=null] - Optional MCP session object.\n * @param {string} [params.projectRoot=null] - Optional project root path for .env fallback.\n * @param {string} params.prompt - The prompt for the AI.","sourceCodeStart":753,"sourceCodeEnd":789,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/scripts/modules/ai-services-unified.js#L753-L789","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// .taskmasterconfig before\n\"main\": { \"provider\": \"openai\", \"modelId\": \"gpt-3.5-turbo-instruct\" }\n// after\n\"main\": { \"provider\": \"openai\", \"modelId\": \"gpt-4o\" }","handlingStrategy":"fallback","validationCode":"const tcModels = ['claude-sonnet-4-5','gpt-4o','gemini-2.5-pro'];\nconst cfg = JSON.parse(readFileSync('.taskmaster/config.json','utf8'));\nif (!tcModels.includes(cfg.models.main.modelId)) console.warn(`Model ${cfg.models.main.modelId} may not support tool calling; generateObjectService will fail.`);","typeGuard":null,"tryCatchPattern":"try {\n  await generateObjectService({ role: 'main', schema, prompt });\n} catch (e) {\n  if (String(e.message).includes(\"does not support the 'tool use'\")) {\n    const text = await generateTextService({ role: 'main', prompt });\n    return JSON.parse(extractJson(text));\n  }\n  throw e;\n}","preventionTips":["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."],"tags":["ai-provider","tool-calling","configuration","model-capability"],"backgroundTag":"model-tool-use-unsupported","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}