eyaltoledano/claude-task-master · error
PROVIDER_UNDETERMINED
PROVIDER_UNDETERMINED
Error message
Could not determine the provider for model ID "${modelId}". What it means
A safeguard inside setModel(): after internal lookup and custom-model handling, the resolved provider was still null when the code reached the configuration-update step. This should be unreachable via normal flags and usually indicates an internal inconsistency — a model matched internally without a provider field, or a custom-hint path that failed to set the provider.
Source
Thrown at scripts/modules/task-manager/models.js:710
return {
success: false,
error: {
code: 'MODEL_NOT_FOUND_NO_HINT',
message: `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.`
}
};
}
}
// --- End of Revised Logic --- //
// At this point, we should have a determinedProvider if the model is valid (internally or custom)
if (!determinedProvider) {
// This case acts as a safeguard
return {
success: false,
error: {
code: 'PROVIDER_UNDETERMINED',
message: `Could not determine the provider for model ID "${modelId}".`
}
};
}
// Update configuration
currentConfig.models[role] = {
...currentConfig.models[role], // Keep existing params like temperature
provider: determinedProvider,
modelId: modelId
};
// Handle baseURL for providers that support it
if (
computedBaseURL &&
(determinedProvider === CUSTOM_PROVIDERS.OPENAI_COMPATIBLE ||
determinedProvider === CUSTOM_PROVIDERS.LMSTUDIO ||
determinedProvider === CUSTOM_PROVIDERS.OLLAMA ||View on GitHub (pinned to c0c98d367c)
Solutions
- Re-run the command with an explicit provider flag (--openrouter/--ollama/--bedrock/...) so determinedProvider is set directly from the hint.
- Reinstall task-master to rule out a corrupted/forked models.js or mismatched internal model list.
- Update to the latest version; if it persists, report the model id + role combination as a bug since this path is a defensive fallback.
Example fix
// before (internal entry lacks provider — patched map)
'my-model': { maxTokens: 128000 }
// after
'my-model': { maxTokens: 128000, provider: 'openai-compatible' } Defensive patterns
Strategy: try-catch
Validate before calling
// Ensure the target model resolves to a provider before calling setModel
const cfg = JSON.parse(fs.readFileSync('.taskmaster/config.json', 'utf8'));
if (!cfg.models?.[role]) console.warn(`Role "${role}" missing from config — provider resolution may fail`); Try / catch
const res = await setModel(modelId, role, projectRoot, options);
if (!res.success && res.error?.code === 'PROVIDER_UNDETERMINED') {
// safeguard path: retry with an explicit provider hint
return setModel(modelId, role, projectRoot, { providerHint: 'openrouter' });
} Prevention
- Always pass an explicit provider hint rather than relying on internal inference.
- Keep the stock task-master installation (no patched model maps) so every entry carries a provider.
- Align all task-master package versions in monorepos to avoid mismatched config helpers.
- If reproducible, report the model id + role to maintainers — this code path is a defensive fallback that should be unreachable.
When it happens
Trigger: setModel(modelId, role, root) where providerHint resolves but is later dropped/overwritten, or where an internally-known model entry has no provider property; custom flows that bypass the providerHint assignment; race/pathologies from monkey-patched or outdated config modules.
Common situations: Patched or forked task-master code where the internal MODEL_MAP entries lost their provider field; mixing versions where config helpers (getConfig/writeConfig) come from a different install; unusual provider aliases not covered by the hint mapping.
Related errors
- Base URL is required for OpenAI-compatible providers. Please
- Invalid provider hint received: ${providerHint}
- ${this.name} API key is required
- ${this.name} Model ID is required
- MODEL_NOT_FOUND_NO_HINT
AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29).
Data as JSON: /api/errors/564b8f96597682d3.
Report an issue: GitHub.