claude-task-master icon indicating copy to clipboard operation
claude-task-master copied to clipboard

bug: Config.json Model Settings Ignored During Subtask Generation

Open redpsj-dev opened this issue 1 year ago • 2 comments

Description

When creating subtasks, the system does not use the models configured in config.json and instead uses the default models hardcoded in task master (Anthropic Claude). The user's intended model configuration is being ignored.

Steps to Reproduce

  1. Configure models in config.json as follows:
    • main: gemini-2.5-pro-preview-05-06
    • research: sonar
    • fallback: gemini-2.5-flash-preview-04-17
  2. Execute task-master expand --all command
  3. Monitor model usage during subtask generation process

Expected Behavior

The models configured in config.json should be used as follows:

  • Main tasks: gemini-2.5-pro-preview-05-06 (Google)
  • Research tasks: sonar (Perplexity)
  • Fallback: gemini-2.5-flash-preview-04-17 (Google)

Actual Behavior

  • Telemetry shows Perplexity's sonar-pro model usage
  • However, during actual subtask generation, the system attempts to use Anthropic Claude models:
    • claude-3-7-sonnet-20250219
    • claude-3-5-sonnet
  • config.json settings are ignored and hardcoded default values are used

Screenshots or Logs

╭──────────────── 💡 Telemetry ────────────────╮
│   AI Usage Summary:                          │
│     Provider: perplexity                     │
│     Model: sonar-pro                         │
╰──────────────────────────────────────────────╯

[ERROR] Anthropic text generation failed: Your credit balance is too low to access the Anthropic API.
{"requestBodyValues":{"model":"claude-3-7-sonnet-20250219"...}}

[ERROR] Anthropic text generation failed: Your credit balance is too low to access the Anthropic API.  
{"requestBodyValues":{"model":"claude-3-5-sonnet"...}}

Environment

  • Task Master version: 0.16.1
  • Node.js version: v23.11.0
  • Operating system: macOS 15.5
  • IDE: Cursor

Additional Context

  • While the error occurred due to insufficient Anthropic API credits, the fundamental issue is that config.json model settings are being ignored
  • The actual API calls use different models than configured
  • This suggests a bug in either the configuration loading logic or model selection logic
  • The issue may also affect custom model usage from cloud providers like AWS Bedrock, Azure OpenAI, and Google Vertex AI

redpsj-dev avatar Jun 07 '25 04:06 redpsj-dev

Image

After creating subtasks and checking the codebase, I confirmed that an additional .taskmaster/config.json file is being generated under the .taskmaster folder.

redpsj-dev avatar Jun 07 '25 04:06 redpsj-dev

Great catch, apologies for the inconvenience, will be fixed in next release 0.16.2!

Coming out in a few hours!

Crunchyman-ralph avatar Jun 07 '25 10:06 Crunchyman-ralph