mirror of
https://github.com/eyaltoledano/claude-task-master.git
synced 2026-01-29 22:02:04 +00:00
feat(models): add Gemini 3 Flash Preview and improve model search
- Add gemini-3-flash-preview to Google and Gemini CLI providers - Use name field from supported-models.json when available - Improve model search to match both display names and model IDs
This commit is contained in:
5
.changeset/floppy-books-feel.md
Normal file
5
.changeset/floppy-books-feel.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"task-master-ai": patch
|
||||
---
|
||||
|
||||
Improved model search in `task-master models --setup` to match both display names and model IDs
|
||||
5
.changeset/frank-ears-remain.md
Normal file
5
.changeset/frank-ears-remain.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"task-master-ai": minor
|
||||
---
|
||||
|
||||
Added Gemini 3 Flash Preview model support for Google and Gemini CLI providers
|
||||
@@ -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(
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user