diff --git a/.changeset/floppy-books-feel.md b/.changeset/floppy-books-feel.md new file mode 100644 index 00000000..98a6c517 --- /dev/null +++ b/.changeset/floppy-books-feel.md @@ -0,0 +1,5 @@ +--- +"task-master-ai": patch +--- + +Improved model search in `task-master models --setup` to match both display names and model IDs diff --git a/.changeset/frank-ears-remain.md b/.changeset/frank-ears-remain.md new file mode 100644 index 00000000..870174ac --- /dev/null +++ b/.changeset/frank-ears-remain.md @@ -0,0 +1,5 @@ +--- +"task-master-ai": minor +--- + +Added Gemini 3 Flash Preview model support for Google and Gemini CLI providers diff --git a/apps/cli/src/commands/models/prompts.ts b/apps/cli/src/commands/models/prompts.ts index ecacd017..a60b2d35 100644 --- a/apps/cli/src/commands/models/prompts.ts +++ b/apps/cli/src/commands/models/prompts.ts @@ -158,9 +158,15 @@ export function createSearchSource( const filteredChoices = choices.filter((choice) => { // Separators are always included if (choice instanceof Separator) return true; - // Filter regular choices by search term - const searchText = (choice as ModelChoice).name || ''; - return searchText.toLowerCase().includes(searchTerm.toLowerCase()); + // Filter regular choices by search term (name and model ID) + const mc = choice as ModelChoice; + const displayText = mc.name || ''; + const modelId = + typeof mc.value === 'object' && mc.value !== null && 'id' in mc.value + ? mc.value.id + : ''; + const searchText = `${displayText} ${modelId}`.toLowerCase(); + return searchText.includes(searchTerm.toLowerCase()); }); // Map ModelChoice to the format inquirer expects return Promise.resolve( diff --git a/apps/cli/src/lib/model-management.ts b/apps/cli/src/lib/model-management.ts index 6f873cc8..1c82bb79 100644 --- a/apps/cli/src/lib/model-management.ts +++ b/apps/cli/src/lib/model-management.ts @@ -18,6 +18,7 @@ export interface ModelCost { export interface ModelData { id: string; + name?: string; provider?: string; swe_score?: number | null; cost_per_1m_tokens?: ModelCost | null; diff --git a/scripts/modules/config-manager.js b/scripts/modules/config-manager.js index 96ac59f2..f1ea7e6c 100644 --- a/scripts/modules/config-manager.js +++ b/scripts/modules/config-manager.js @@ -1044,24 +1044,28 @@ function getAvailableModels() { models .filter((modelObj) => Boolean(modelObj.supported)) .forEach((modelObj) => { - // Basic name generation - can be improved const modelId = modelObj.id; const sweScore = modelObj.swe_score; const cost = modelObj.cost_per_1m_tokens; const allowedRoles = modelObj.allowed_roles || ['main', 'fallback']; - const nameParts = modelId - .split('-') - .map((p) => p.charAt(0).toUpperCase() + p.slice(1)); - // Handle specific known names better if needed - let name = nameParts.join(' '); - if (modelId === 'claude-3.5-sonnet-20240620') - name = 'Claude 3.5 Sonnet'; - if (modelId === 'claude-3-7-sonnet-20250219') - name = 'Claude 3.7 Sonnet'; - if (modelId === 'gpt-4o') name = 'GPT-4o'; - if (modelId === 'gpt-4-turbo') name = 'GPT-4 Turbo'; - if (modelId === 'sonar-pro') name = 'Perplexity Sonar Pro'; - if (modelId === 'sonar-mini') name = 'Perplexity Sonar Mini'; + + // Use name from JSON if available, otherwise generate from ID + let name = modelObj.name; + if (!name) { + const nameParts = modelId + .split('-') + .map((p) => p.charAt(0).toUpperCase() + p.slice(1)); + name = nameParts.join(' '); + // Handle specific known names better if needed + if (modelId === 'claude-3.5-sonnet-20240620') + name = 'Claude 3.5 Sonnet'; + if (modelId === 'claude-3-7-sonnet-20250219') + name = 'Claude 3.7 Sonnet'; + if (modelId === 'gpt-4o') name = 'GPT-4o'; + if (modelId === 'gpt-4-turbo') name = 'GPT-4 Turbo'; + if (modelId === 'sonar-pro') name = 'Perplexity Sonar Pro'; + if (modelId === 'sonar-mini') name = 'Perplexity Sonar Mini'; + } available.push({ id: modelId, diff --git a/scripts/modules/supported-models.json b/scripts/modules/supported-models.json index ad7810ee..604ad990 100644 --- a/scripts/modules/supported-models.json +++ b/scripts/modules/supported-models.json @@ -202,6 +202,18 @@ } ], "gemini-cli": [ + { + "id": "gemini-3-flash-preview", + "name": "Gemini 3 Flash", + "swe_score": 0, + "cost_per_1m_tokens": { + "input": 0, + "output": 0 + }, + "allowed_roles": ["main", "fallback", "research"], + "max_tokens": 1048576, + "supported": true + }, { "id": "gemini-3-pro-preview", "swe_score": 0.762, @@ -482,6 +494,18 @@ } ], "google": [ + { + "id": "gemini-3-flash-preview", + "name": "Gemini 3 Flash", + "swe_score": 0, + "cost_per_1m_tokens": { + "input": 0.5, + "output": 3.0 + }, + "allowed_roles": ["main", "fallback"], + "max_tokens": 1048576, + "supported": true + }, { "id": "gemini-3-pro-preview", "swe_score": 0.762,