mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 08:53:36 +00:00
feat(ui): improve modal UX and model management
- Increase dialog max-width to 2xl for better content display - Add tabbed interface to feature modal (prompt/model/testing) - Streamline model selection with compact button layout - Remove unused OpenAI O3/O4 models from registry - Add model string validation and fallback logic - Add "Uncategorized" category support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
This commit is contained in:
@@ -212,10 +212,7 @@ class CodexCliDetector {
|
||||
'gpt-5.1-codex-max',
|
||||
'gpt-5.1-codex',
|
||||
'gpt-5.1-codex-mini',
|
||||
'gpt-5.1',
|
||||
'o3',
|
||||
'o3-mini',
|
||||
'o4-mini'
|
||||
'gpt-5.1'
|
||||
];
|
||||
return supportedModels.includes(model);
|
||||
}
|
||||
|
||||
@@ -36,8 +36,27 @@ class FeatureExecutor {
|
||||
const modelKey = feature.model || "opus"; // Default to opus
|
||||
|
||||
// Use the registry for model lookup
|
||||
const modelString = ModelRegistry.getModelString(modelKey);
|
||||
return modelString || MODEL_MAP[modelKey] || MODEL_MAP.opus;
|
||||
let modelString = ModelRegistry.getModelString(modelKey);
|
||||
|
||||
// Fallback to MODEL_MAP if registry doesn't have it
|
||||
if (!modelString || modelString === modelKey) {
|
||||
modelString = MODEL_MAP[modelKey];
|
||||
}
|
||||
|
||||
// Final fallback to opus
|
||||
if (!modelString) {
|
||||
modelString = MODEL_MAP.opus;
|
||||
}
|
||||
|
||||
// Validate model string format - ensure it's not incorrectly constructed
|
||||
// Prevent incorrect formats like "claude-haiku-4-20250514" (mixing haiku with sonnet date)
|
||||
if (modelString.includes('haiku') && modelString.includes('20250514')) {
|
||||
console.error(`[FeatureExecutor] Invalid model string detected: ${modelString}, using correct format`);
|
||||
modelString = MODEL_MAP.haiku || 'claude-haiku-4-5';
|
||||
}
|
||||
|
||||
console.log(`[FeatureExecutor] getModelString: modelKey=${modelKey}, modelString=${modelString}`);
|
||||
return modelString;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -265,22 +265,6 @@ class CodexProvider extends ModelProvider {
|
||||
provider: 'codex',
|
||||
description: 'Broad world knowledge with strong reasoning',
|
||||
tier: 'standard'
|
||||
},
|
||||
{
|
||||
id: 'o3',
|
||||
name: 'O3',
|
||||
modelString: 'o3',
|
||||
provider: 'codex',
|
||||
description: 'Advanced reasoning model',
|
||||
tier: 'premium'
|
||||
},
|
||||
{
|
||||
id: 'o3-mini',
|
||||
name: 'O3 Mini',
|
||||
modelString: 'o3-mini',
|
||||
provider: 'codex',
|
||||
description: 'Efficient reasoning model',
|
||||
tier: 'standard'
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -306,12 +290,7 @@ class CodexProvider extends ModelProvider {
|
||||
'gpt-5.1-codex-max': 'gpt-5.1-codex-max',
|
||||
'gpt-5.1-codex': 'gpt-5.1-codex',
|
||||
'gpt-5.1-codex-mini': 'gpt-5.1-codex-mini',
|
||||
'gpt-5.1': 'gpt-5.1',
|
||||
'o3': 'o3',
|
||||
'o3-mini': 'o3-mini',
|
||||
'o4-mini': 'o4-mini',
|
||||
'gpt-4o': 'gpt-4o',
|
||||
'gpt-4o-mini': 'gpt-4o-mini'
|
||||
'gpt-5.1': 'gpt-5.1'
|
||||
};
|
||||
return modelMap[modelKey] || 'gpt-5.1-codex-max';
|
||||
}
|
||||
@@ -346,8 +325,7 @@ class ModelProviderFactory {
|
||||
|
||||
// Check if it's a Codex/OpenAI model
|
||||
const codexModels = [
|
||||
'gpt-5.1-codex-max', 'gpt-5.1-codex', 'gpt-5.1-codex-mini', 'gpt-5.1',
|
||||
'o3', 'o3-mini', 'o4-mini', 'gpt-4o', 'gpt-4o-mini'
|
||||
'gpt-5.1-codex-max', 'gpt-5.1-codex', 'gpt-5.1-codex-mini', 'gpt-5.1'
|
||||
];
|
||||
if (codexModels.includes(modelId)) {
|
||||
return new CodexProvider();
|
||||
|
||||
@@ -27,12 +27,7 @@ const CODEX_MODEL_IDS = [
|
||||
'gpt-5.1-codex-max',
|
||||
'gpt-5.1-codex',
|
||||
'gpt-5.1-codex-mini',
|
||||
'gpt-5.1',
|
||||
'o3',
|
||||
'o3-mini',
|
||||
'o4-mini',
|
||||
'gpt-4o',
|
||||
'gpt-4o-mini'
|
||||
'gpt-5.1'
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -141,50 +136,6 @@ const MODELS = {
|
||||
contextWindow: 128000,
|
||||
supportsThinking: false,
|
||||
requiresAuth: 'OPENAI_API_KEY'
|
||||
},
|
||||
|
||||
// OpenAI O-Series Models
|
||||
o3: {
|
||||
id: 'o3',
|
||||
name: 'O3',
|
||||
modelString: 'o3',
|
||||
provider: 'codex',
|
||||
category: MODEL_CATEGORIES.OPENAI,
|
||||
tier: MODEL_TIERS.PREMIUM,
|
||||
description: 'Advanced reasoning model',
|
||||
capabilities: ['code', 'text', 'tools', 'reasoning'],
|
||||
maxTokens: 100000,
|
||||
contextWindow: 200000,
|
||||
supportsThinking: false,
|
||||
requiresAuth: 'OPENAI_API_KEY'
|
||||
},
|
||||
'o3-mini': {
|
||||
id: 'o3-mini',
|
||||
name: 'O3 Mini',
|
||||
modelString: 'o3-mini',
|
||||
provider: 'codex',
|
||||
category: MODEL_CATEGORIES.OPENAI,
|
||||
tier: MODEL_TIERS.STANDARD,
|
||||
description: 'Efficient reasoning model',
|
||||
capabilities: ['code', 'text', 'reasoning'],
|
||||
maxTokens: 65536,
|
||||
contextWindow: 128000,
|
||||
supportsThinking: false,
|
||||
requiresAuth: 'OPENAI_API_KEY'
|
||||
},
|
||||
'o4-mini': {
|
||||
id: 'o4-mini',
|
||||
name: 'O4 Mini',
|
||||
modelString: 'o4-mini',
|
||||
provider: 'codex',
|
||||
category: MODEL_CATEGORIES.OPENAI,
|
||||
tier: MODEL_TIERS.BASIC,
|
||||
description: 'Fast reasoning with lower cost',
|
||||
capabilities: ['code', 'text', 'reasoning'],
|
||||
maxTokens: 65536,
|
||||
contextWindow: 128000,
|
||||
supportsThinking: false,
|
||||
requiresAuth: 'OPENAI_API_KEY'
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user