feat(models): implement custom model support for ollama/openrouter

Adds the ability for users to specify custom model IDs for Ollama and OpenRouter providers, bypassing the internal supported model list.

    - Introduces --ollama and --openrouter flags for the 'task-master models --set-<role>' command.
    - Updates the interactive 'task-master models --setup' to include options for entering custom Ollama/OpenRouter IDs.
    - Implements live validation against the OpenRouter API when a custom OpenRouter ID is provided.
    - Refines the model setting logic to prioritize explicit provider flags/choices.
    - Adds warnings when custom models are set.
    - Updates the changeset file.
This commit is contained in:
Eyal Toledano
2025-04-27 17:25:54 -04:00
parent ed79d4f473
commit c8722b0a7a
12 changed files with 10157 additions and 201 deletions

View File

@@ -2007,6 +2007,10 @@ function displayAvailableModels(availableModels) {
'\n' +
chalk.cyan(
`4. Run interactive setup: ${chalk.yellow('task-master models --setup')}`
) +
'\n' +
chalk.cyan(
`5. Use custom models: ${chalk.yellow('task-master models --custom --set-main|research|fallback <model_id>')}`
),
{
padding: 1,