{"record":{"id":"a33d410a9bb9b976","repo":"eyaltoledano/claude-task-master","slug":"model-not-found-no-hint","errorCode":"MODEL_NOT_FOUND_NO_HINT","errorMessage":"Model ID \"${modelId}\" not found in Taskmaster's supported models. If this is a custom model, please specify the provider using --openrouter, --ollama, --bedrock, --azure, --vertex, --lmstudio, --openai-compatible, --gemini-cli, or --codex-cli.","messagePattern":"Model ID \"(.+?)\" not found in Taskmaster's supported models\\. If this is a custom model, please specify the provider using --openrouter, --ollama, --bedrock, --azure, --vertex, --lmstudio, --openai-compatible, --gemini-cli, or --codex-cli\\.","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/modules/task-manager/models.js","lineNumber":695,"sourceCode":"\t\t\t\t\t// Invalid provider hint - should not happen with our constants\n\t\t\t\t\tthrow new Error(`Invalid provider hint received: ${providerHint}`);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// No hint provided (flags not used)\n\t\t\tif (modelData) {\n\t\t\t\t// Found internally, use the provider from the internal list\n\t\t\t\tdeterminedProvider = modelData.provider;\n\t\t\t\treport(\n\t\t\t\t\t'info',\n\t\t\t\t\t`Model ${modelId} found internally with provider ${determinedProvider}.`\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t// Model not found and no provider hint was given\n\t\t\t\treturn {\n\t\t\t\t\tsuccess: false,\n\t\t\t\t\terror: {\n\t\t\t\t\t\tcode: 'MODEL_NOT_FOUND_NO_HINT',\n\t\t\t\t\t\tmessage: `Model ID \"${modelId}\" not found in Taskmaster's supported models. If this is a custom model, please specify the provider using --openrouter, --ollama, --bedrock, --azure, --vertex, --lmstudio, --openai-compatible, --gemini-cli, or --codex-cli.`\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// --- End of Revised Logic --- //\n\n\t\t// At this point, we should have a determinedProvider if the model is valid (internally or custom)\n\t\tif (!determinedProvider) {\n\t\t\t// This case acts as a safeguard\n\t\t\treturn {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: {\n\t\t\t\t\tcode: 'PROVIDER_UNDETERMINED',\n\t\t\t\t\tmessage: `Could not determine the provider for model ID \"${modelId}\".`\n\t\t\t\t}\n\t\t\t};","sourceCodeStart":677,"sourceCodeEnd":713,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/scripts/modules/task-manager/models.js#L677-L713","documentation":"The model ID is a valid non-empty string but was not found in Taskmaster's internal list of known/supported models, and no provider flag (--openrouter, --ollama, --bedrock, etc.) was supplied that would let the library treat it as a custom model. setModel() refuses to guess which provider class to instantiate for an unknown id.","triggerScenarios":"setModel('vendor/new-model', role, root) where the id is absent from the internal MODEL_MAP and no provider hint flag was passed; misspelling a known id (e.g. 'anthropic/claude-sonet-4'); using a model released after your installed task-master version.","commonSituations":"Newly released LLMs not yet in the installed version's model registry; provider-specific naming slips (missing 'accounts/google/' prefix on Vertex, wrong org slug on OpenRouter); copy-pasted ids from another tool that uses different naming.","solutions":["Add the provider hint flag matching the backend, e.g. `task-master models --set-main --openrouter vendor/new-model` (or --ollama/--bedrock/--azure/--vertex/--lmstudio/--openai-compatible/--gemini-cli/--codex-cli).","Check the exact spelling with `task-master models --list` to confirm the supported ids for your installed version.","Update task-master (`npm i -g task-master-ai@latest`) so its internal model registry includes recently released models.","Verify provider-specific naming conventions, e.g. OpenRouter needs 'vendor/model' while Bedrock needs the full inference profile id."],"exampleFix":"// before\nawait setModel('moonshotai/kimi-k2', 'main', projectRoot); // unknown id, no hint\n// after\nawait setModel('moonshotai/kimi-k2', 'main', projectRoot, { providerHint: 'openrouter' });\n// or CLI: task-master models --set-main --openrouter moonshotai/kimi-k2","handlingStrategy":"validation","validationCode":"import { getAvailableModelsForProvider } from './models.js'; // or list via CLI\n// before calling:\nconst known = getAvailableModelsForProvider?.('openrouter') ?? [];\nif (!known.some(m => m.id === modelId) && !providerHint) {\n  throw new Error(`Unknown model \"${modelId}\" — pass a provider flag (e.g. --openrouter) for custom models`);\n}","typeGuard":null,"tryCatchPattern":"const res = await setModel(modelId, 'main', projectRoot, options);\nif (!res.success && res.error?.code === 'MODEL_NOT_FOUND_NO_HINT') {\n  // retry with an explicit provider hint for custom models\n  return setModel(modelId, 'main', projectRoot, { providerHint: 'openrouter' });\n}","preventionTips":["Run `task-master models --list` to confirm the exact id before setting it.","Always pair custom/unreleased model ids with an explicit provider flag.","Keep task-master updated so the internal model registry includes new models.","Copy ids exactly from the provider console, including org prefixes (e.g. 'anthropic/', 'accounts/google/')."],"tags":["configuration","model-registry","provider"],"backgroundTag":"model-not-found","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}