{"record":{"id":"6ab398d0c73bef11","repo":"eyaltoledano/claude-task-master","slug":"warning-invalid-fallback-provider-config-model","errorCode":null,"errorMessage":"Warning: Invalid fallback provider \"${config.models.fallback.provider}\" in ${configPath}. Fallback model configuration will be ignored.","messagePattern":"Warning: Invalid fallback provider \"(.+?)\" in (.+?)\\. Fallback model configuration will be ignored\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"scripts/modules/config-manager.js","lineNumber":199,"sourceCode":"\t\t\t\t\tchalk.yellow(\n\t\t\t\t\t\t`Warning: Invalid main provider \"${config.models.main.provider}\" in ${configPath}. Falling back to default.`\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tconfig.models.main = { ...defaults.models.main };\n\t\t\t}\n\t\t\tif (!validateProvider(config.models.research.provider)) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\tchalk.yellow(\n\t\t\t\t\t\t`Warning: Invalid research provider \"${config.models.research.provider}\" in ${configPath}. Falling back to default.`\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tconfig.models.research = { ...defaults.models.research };\n\t\t\t}\n\t\t\tif (\n\t\t\t\tconfig.models.fallback?.provider &&\n\t\t\t\t!validateProvider(config.models.fallback.provider)\n\t\t\t) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\tchalk.yellow(\n\t\t\t\t\t\t`Warning: Invalid fallback provider \"${config.models.fallback.provider}\" in ${configPath}. Fallback model configuration will be ignored.`\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tconfig.models.fallback.provider = undefined;\n\t\t\t\tconfig.models.fallback.modelId = undefined;\n\t\t\t}\n\t\t\tif (config.claudeCode && !isEmpty(config.claudeCode)) {\n\t\t\t\tconfig.claudeCode = validateClaudeCodeSettings(config.claudeCode);\n\t\t\t}\n\t\t\tif (config.codexCli && !isEmpty(config.codexCli)) {\n\t\t\t\tconfig.codexCli = validateCodexCliSettings(config.codexCli);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t// Use console.error for actual errors during parsing\n\t\t\tconsole.error(\n\t\t\t\tchalk.red(\n\t\t\t\t\t`Error reading or parsing ${configPath}: ${error.message}. Using default configuration.`","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/scripts/modules/config-manager.js#L181-L217","documentation":"Task Master validates model providers in the user's .taskmaster/config.json during config load. If models.fallback.provider names a provider unknown to validateProvider (not one of the supported AI providers), the entire fallback model configuration is discarded with this warning and defaults are used instead of the invalid entry. It is a non-fatal warning; the CLI keeps running without a fallback model.","triggerScenarios":"Running any task-master command after _loadAndValidateConfig (via newConfig) reads a config whose models.fallback.provider is a non-empty string that fails validateProvider (e.g. a typo like 'anthropicc' or a manually hand-edited config).","commonSituations":"Hand-editing .taskmaster/config.json and misspelling a provider name; copying a config from an older version that supported a provider since removed; renaming providers (e.g. 'openrouter' vs 'azure') without running 'task-master models --setup'.","solutions":["Run 'task-master models --setup' to pick the fallback provider/model from the validated list.","Open .taskmaster/config.json and correct models.fallback.provider to a supported value (e.g. 'anthropic', 'openai', 'google', 'openrouter', 'perplexity', 'xai', 'ollama', 'bedrock', 'azure').","If no fallback is wanted, remove the models.fallback.provider/modelId fields so validation is skipped entirely."],"exampleFix":"// before (.taskmaster/config.json)\n\"fallback\": { \"provider\": \"anthropicc\", \"modelId\": \"claude-sonnet-4\" }\n// after\n\"fallback\": { \"provider\": \"anthropic\", \"modelId\": \"claude-sonnet-4-20250514\" }","handlingStrategy":"validation","validationCode":"const { validateProvider } = require('./scripts/modules/config-manager.js');\nconst cfg = JSON.parse(fs.readFileSync('.taskmaster/config.json', 'utf8'));\nconst p = cfg?.models?.fallback?.provider;\nif (p && !validateProvider(p)) {\n  console.warn(`Fix fallback provider \"${p}\" before running task-master`);\n}","typeGuard":"function isValidProvider(p) {\n  return typeof p === 'string' && ['anthropic','openai','google','openrouter','perplexity','xai','ollama','bedrock','azure'].includes(p);\n}","tryCatchPattern":null,"preventionTips":["Always change providers via 'task-master models --setup' instead of hand-editing config.json.","Keep .taskmaster/config.json in version control to spot unintended edits.","After editing config, run a cheap command (e.g. task-master models) to validate early."],"tags":["config","validation","provider"],"backgroundTag":"invalid-config-value","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}