mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
fix: improve Cursor CLI implementation with type safety and security fixes
- Add getCliPath() public method to CursorProvider to avoid private field access - Add path validation to cursor-config routes to prevent traversal attacks - Add supportsVision field to CursorModelConfig (all false - CLI limitation) - Consolidate duplicate types in providers/types.ts (re-export from @automaker/types) - Add MCP servers warning log instead of error (not yet supported by Cursor CLI) - Fix debug log type safety (replace 'as any' with proper type narrowing) - Update docs to remove non-existent tier field, add supportsVision field - Remove outdated TODO comment in sdk-options.ts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,6 +30,8 @@ export interface CursorModelConfig {
|
||||
label: string;
|
||||
description: string;
|
||||
hasThinking: boolean;
|
||||
/** Whether the model supports vision/image inputs (currently not supported by Cursor CLI) */
|
||||
supportsVision: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -41,108 +43,126 @@ export const CURSOR_MODEL_MAP: Record<CursorModelId, CursorModelConfig> = {
|
||||
label: 'Auto (Recommended)',
|
||||
description: 'Automatically selects the best model for each task',
|
||||
hasThinking: false,
|
||||
supportsVision: false, // Vision not yet supported by Cursor CLI
|
||||
},
|
||||
'composer-1': {
|
||||
id: 'composer-1',
|
||||
label: 'Composer 1',
|
||||
description: 'Cursor Composer agent model optimized for multi-file edits',
|
||||
hasThinking: false,
|
||||
supportsVision: false,
|
||||
},
|
||||
'sonnet-4.5': {
|
||||
id: 'sonnet-4.5',
|
||||
label: 'Claude Sonnet 4.5',
|
||||
description: 'Anthropic Claude Sonnet 4.5 via Cursor',
|
||||
hasThinking: false,
|
||||
supportsVision: false, // Model supports vision but Cursor CLI doesn't pass images
|
||||
},
|
||||
'sonnet-4.5-thinking': {
|
||||
id: 'sonnet-4.5-thinking',
|
||||
label: 'Claude Sonnet 4.5 (Thinking)',
|
||||
description: 'Claude Sonnet 4.5 with extended thinking enabled',
|
||||
hasThinking: true,
|
||||
supportsVision: false,
|
||||
},
|
||||
'opus-4.5': {
|
||||
id: 'opus-4.5',
|
||||
label: 'Claude Opus 4.5',
|
||||
description: 'Anthropic Claude Opus 4.5 via Cursor',
|
||||
hasThinking: false,
|
||||
supportsVision: false,
|
||||
},
|
||||
'opus-4.5-thinking': {
|
||||
id: 'opus-4.5-thinking',
|
||||
label: 'Claude Opus 4.5 (Thinking)',
|
||||
description: 'Claude Opus 4.5 with extended thinking enabled',
|
||||
hasThinking: true,
|
||||
supportsVision: false,
|
||||
},
|
||||
'opus-4.1': {
|
||||
id: 'opus-4.1',
|
||||
label: 'Claude Opus 4.1',
|
||||
description: 'Anthropic Claude Opus 4.1 via Cursor',
|
||||
hasThinking: false,
|
||||
supportsVision: false,
|
||||
},
|
||||
'gemini-3-pro': {
|
||||
id: 'gemini-3-pro',
|
||||
label: 'Gemini 3 Pro',
|
||||
description: 'Google Gemini 3 Pro via Cursor',
|
||||
hasThinking: false,
|
||||
supportsVision: false,
|
||||
},
|
||||
'gemini-3-flash': {
|
||||
id: 'gemini-3-flash',
|
||||
label: 'Gemini 3 Flash',
|
||||
description: 'Google Gemini 3 Flash (faster)',
|
||||
hasThinking: false,
|
||||
supportsVision: false,
|
||||
},
|
||||
'gpt-5.2': {
|
||||
id: 'gpt-5.2',
|
||||
label: 'GPT-5.2',
|
||||
description: 'OpenAI GPT-5.2 via Cursor',
|
||||
hasThinking: false,
|
||||
supportsVision: false,
|
||||
},
|
||||
'gpt-5.1': {
|
||||
id: 'gpt-5.1',
|
||||
label: 'GPT-5.1',
|
||||
description: 'OpenAI GPT-5.1 via Cursor',
|
||||
hasThinking: false,
|
||||
supportsVision: false,
|
||||
},
|
||||
'gpt-5.2-high': {
|
||||
id: 'gpt-5.2-high',
|
||||
label: 'GPT-5.2 High',
|
||||
description: 'OpenAI GPT-5.2 with high compute',
|
||||
hasThinking: false,
|
||||
supportsVision: false,
|
||||
},
|
||||
'gpt-5.1-high': {
|
||||
id: 'gpt-5.1-high',
|
||||
label: 'GPT-5.1 High',
|
||||
description: 'OpenAI GPT-5.1 with high compute',
|
||||
hasThinking: false,
|
||||
supportsVision: false,
|
||||
},
|
||||
'gpt-5.1-codex': {
|
||||
id: 'gpt-5.1-codex',
|
||||
label: 'GPT-5.1 Codex',
|
||||
description: 'OpenAI GPT-5.1 Codex for code generation',
|
||||
hasThinking: false,
|
||||
supportsVision: false,
|
||||
},
|
||||
'gpt-5.1-codex-high': {
|
||||
id: 'gpt-5.1-codex-high',
|
||||
label: 'GPT-5.1 Codex High',
|
||||
description: 'OpenAI GPT-5.1 Codex with high compute',
|
||||
hasThinking: false,
|
||||
supportsVision: false,
|
||||
},
|
||||
'gpt-5.1-codex-max': {
|
||||
id: 'gpt-5.1-codex-max',
|
||||
label: 'GPT-5.1 Codex Max',
|
||||
description: 'OpenAI GPT-5.1 Codex Max capacity',
|
||||
hasThinking: false,
|
||||
supportsVision: false,
|
||||
},
|
||||
'gpt-5.1-codex-max-high': {
|
||||
id: 'gpt-5.1-codex-max-high',
|
||||
label: 'GPT-5.1 Codex Max High',
|
||||
description: 'OpenAI GPT-5.1 Codex Max with high compute',
|
||||
hasThinking: false,
|
||||
supportsVision: false,
|
||||
},
|
||||
grok: {
|
||||
id: 'grok',
|
||||
label: 'Grok',
|
||||
description: 'xAI Grok via Cursor',
|
||||
hasThinking: false,
|
||||
supportsVision: false,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user