Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions extension/secureflow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"properties": {
"secureflow.AIModel": {
"type": "string",
"default": "claude-3-5-sonnet-20241022",
"default": "claude-sonnet-4-5-20250929",
"enum": [
"gpt-4o",
"gpt-4o-mini",
Expand All @@ -111,6 +111,7 @@
"gemini-2.5-flash",
"claude-opus-4-1-20250805",
"claude-opus-4-20250514",
"claude-sonnet-4-5-20250929",
"claude-sonnet-4-20250514",
"claude-3-7-sonnet-20250219",
"claude-3-5-sonnet-20241022",
Expand All @@ -127,9 +128,10 @@
"Google Gemini 2.5 Flash",
"Anthropic Claude 4.1 Opus (2025 Version)",
"Anthropic Claude 4 Opus (2025 Version)",
"Anthropic Claude 4.5 Sonnet (2025 Version) - RECOMMENDED",
"Anthropic Claude 4 Sonnet (2025 Version)",
"Anthropic Claude 3.7 Sonnet (2025 Version)",
"Anthropic Claude 3.5 Sonnet (2024 Version)",
"Anthropic Claude 3.5 Sonnet (2024 Version) - DEPRECATED, use 4.5 instead",
"Anthropic Claude 3.5 Haiku (2024 Version)"
],
"description": "Select the AI Model to use for security analysis"
Expand Down
4 changes: 2 additions & 2 deletions extension/secureflow/packages/secureflow-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ secureflow config --show
```

**Supported Models:**
- **Claude**: `claude-3-5-sonnet-20241022`, `claude-3-5-haiku-20241022`, `claude-3-opus-20240229`
- **Claude**: `claude-sonnet-4-5-20250929` (recommended), `claude-3-5-haiku-20241022`, ~~`claude-3-5-sonnet-20241022`~~ (deprecated - use 4.5 instead)
- **OpenAI GPT**: `gpt-4o`, `gpt-4o-mini`, `gpt-4-turbo`, `gpt-3.5-turbo`
- **Google Gemini**: `gemini-1.5-pro`, `gemini-1.5-flash`, `gemini-1.0-pro`
- **Anthropic**: `claude-instant-1.2`
Expand All @@ -53,7 +53,7 @@ secureflow config --show
secureflow scan

# Scan specific project with Claude
secureflow scan ./my-project --model claude-3-5-sonnet-20241022
secureflow scan ./my-project --model claude-sonnet-4-5-20250929

# Get project profile first
secureflow profile ./my-project
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@
"maxOutput": 32000,
"description": "Claude Opus 4 with 200K context window, 32K max output tokens"
},
"claude-sonnet-4-5-20250929": {
"contextWindow": 200000,
"maxOutput": 64000,
"description": "Claude Sonnet 4.5 with 200K context window (1M beta available), 64K max output tokens"
},
"claude-sonnet-4-20250514": {
"contextWindow": 200000,
"maxOutput": 64000,
Expand All @@ -75,7 +80,7 @@
"claude-3-5-sonnet-20241022": {
"contextWindow": 200000,
"maxOutput": 8192,
"description": "Claude 3.5 Sonnet with 200K context window, 8K max output tokens (deprecated model)"
"description": "Claude 3.5 Sonnet with 200K context window, 8K max output tokens (DEPRECATED - use Claude 4.5 instead)"
},
"claude-3-5-haiku-20241022": {
"contextWindow": 200000,
Expand All @@ -100,7 +105,7 @@
"Some models have beta features with larger context windows",
"Claude Sonnet 4 supports 1M context window in beta with context-1m-2025-08-07 header",
"O1 and O3 models are reasoning models with different token counting behavior",
"Claude 3.5 Sonnet (20241022) is deprecated - use Claude 3.7 Sonnet instead",
"Claude 3.5 Sonnet (20241022) is deprecated - use Claude 4.5 Sonnet instead",
"GPT-4.1 and Gemini models support very large context windows (1M+ tokens)",
"All specifications verified as of September 2025",
"Claude Opus models have 64K max output, not 32K as previously listed",
Expand All @@ -117,6 +122,7 @@
"gemini-2.5-flash"
],
"balanced": [
"claude-sonnet-4-5-20250929",
"claude-sonnet-4-20250514",
"gpt-4o",
"claude-3-7-sonnet-20250219"
Expand All @@ -135,6 +141,7 @@
"highOutput": [
"o3-mini-2025-01-31",
"claude-opus-4-1-20250805",
"claude-sonnet-4-5-20250929",
"claude-sonnet-4-20250514"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ class AIClientFactory {
// Anthropic models
case 'claude-opus-4-1-20250805':
case 'claude-opus-4-20250514':
case 'claude-sonnet-4-5-20250929':
case 'claude-sonnet-4-20250514':
case 'claude-3-7-sonnet-20250219':
case 'claude-3-5-sonnet-20241022':
case 'claude-3-5-sonnet-20241022': // deprecated - use claude-sonnet-4-5-20250929 instead
case 'claude-3-5-haiku-20241022':
return new ClaudeClient();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class ClaudeClient extends HttpClient {
constructor() {
super();
this.API_URL = 'https://api.anthropic.com/v1/messages';
this.defaultModel = 'claude-3-5-sonnet-20241022';
this.defaultModel = 'claude-sonnet-4-5-20250929';
}

/**
Expand All @@ -20,10 +20,15 @@ class ClaudeClient extends HttpClient {
throw new Error('Anthropic Claude API key is required');
}

// Show deprecation warning for claude-3-5-sonnet-20241022
if (options.model === 'claude-3-5-sonnet-20241022') {
console.warn('⚠️ WARNING: claude-3-5-sonnet-20241022 is deprecated. Please upgrade to claude-sonnet-4-5-20250929 for better performance and latest features.');
}

const response = await this.post(
this.API_URL,
{
model: "claude-3-5-sonnet-20241022",
model: options.model || "claude-sonnet-4-5-20250929",
messages: messages || [{ role: 'user', content: prompt }],
temperature: options.temperature || 0,
max_tokens: options.maxTokens || 4000,
Expand Down
2 changes: 1 addition & 1 deletion extension/secureflow/packages/secureflow-cli/lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function loadConfig() {
const env = process.env;

const cfg = {
model: env.SECUREFLOW_MODEL || fileCfg.model || 'claude-3-5-sonnet-20241022',
model: env.SECUREFLOW_MODEL || fileCfg.model || 'claude-sonnet-4-5-20250929',
apiKey:
env.SECUREFLOW_API_KEY || env.ANTHROPIC_API_KEY || env.OPENAI_API_KEY || fileCfg.apiKey || '',
provider: env.SECUREFLOW_PROVIDER || fileCfg.provider || inferProvider(env, fileCfg),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export type AIModel =
| 'gemini-2.5-flash'
| 'claude-opus-4-1-20250805'
| 'claude-opus-4-20250514'
| 'claude-sonnet-4-5-20250929'
| 'claude-sonnet-4-20250514'
| 'claude-3-7-sonnet-20250219'
| 'claude-3-5-sonnet-20241022'
Expand Down
2 changes: 1 addition & 1 deletion extension/secureflow/packages/secureflow-cli/lib/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

/**
* @typedef {'gpt-4o' | 'gpt-4o-mini' | 'o1-mini' | 'o1' | 'gpt-4.1-2025-04-14' | 'o3-mini-2025-01-31' | 'gemini-2.5-pro' | 'gemini-2.5-flash' | 'claude-opus-4-1-20250805' | 'claude-opus-4-20250514' | 'claude-sonnet-4-20250514' | 'claude-3-7-sonnet-20250219' | 'claude-3-5-sonnet-20241022' | 'claude-3-5-haiku-20241022' | 'grok-4-fast-reasoning' | 'qwen3:4b'} AIModel
* @typedef {'gpt-4o' | 'gpt-4o-mini' | 'o1-mini' | 'o1' | 'gpt-4.1-2025-04-14' | 'o3-mini-2025-01-31' | 'gemini-2.5-pro' | 'gemini-2.5-flash' | 'claude-opus-4-1-20250805' | 'claude-opus-4-20250514' | 'claude-sonnet-4-5-20250929' | 'claude-sonnet-4-20250514' | 'claude-3-7-sonnet-20250219' | 'claude-3-5-sonnet-20241022' | 'claude-3-5-haiku-20241022' | 'grok-4-fast-reasoning' | 'qwen3:4b'} AIModel
*/

module.exports = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ApplicationProfile {
*/
class WorkspaceAnalyzer {
constructor(options = {}) {
this.selectedModel = options.selectedModel || 'claude-3-5-sonnet-20241022';
this.selectedModel = options.selectedModel || 'claude-sonnet-4-5-20250929';
this.aiClient = AIClientFactory.getClient(this.selectedModel);
this.tokenTracker = new TokenTracker(this.selectedModel);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class CLIProfileCommand {

// Create profiler instance
const profilerOptions = {
selectedModel: this.selectedModel || config.model || 'claude-3-5-sonnet-20241022'
selectedModel: this.selectedModel || config.model || 'claude-sonnet-4-5-20250929'
};
const profiler = new CLIProjectProfiler(profilerOptions);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class CLIProjectProfiler {
this.maxTraversalDepth = 4;

// Initialize workspace analyzer
const selectedModel = options.selectedModel || 'claude-3-5-sonnet-20241022';
const selectedModel = options.selectedModel || 'claude-sonnet-4-5-20250929';
this.workspaceAnalyzer = new WorkspaceAnalyzer({ selectedModel });
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class CLIFullScanCommand {
const reviewPrompt = await loadPrompt('common/security-review-cli.txt');

// Initialize token tracker
const model = this.selectedModel || config.model || 'claude-3-5-sonnet-20241022';
const model = this.selectedModel || config.model || 'claude-sonnet-4-5-20250929';
this.tokenTracker = new TokenTracker(model);

// Initialize AI client
Expand Down Expand Up @@ -169,7 +169,7 @@ class CLIFullScanCommand {
* Create AI client based on configuration
*/
_createAIClient(config) {
const model = this.selectedModel || config.model || 'claude-3-5-sonnet-20241022';
const model = this.selectedModel || config.model || 'claude-sonnet-4-5-20250929';
const aiClient = AIClientFactory.getClient(model);

// Create wrapper that matches our expected interface
Expand Down
2 changes: 1 addition & 1 deletion extension/secureflow/src/profiler/project-profiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class ProjectProfiler {
// Initialize workspace analyzer
const selectedModel =
this.settingsManager?.getSelectedAIModel() ||
'claude-3-5-sonnet-20241022';
'claude-sonnet-4-5-20250929';
this.workspaceAnalyzer = new WorkspaceAnalyzer({ selectedModel });
}

Expand Down
3 changes: 2 additions & 1 deletion extension/secureflow/src/settings/settings-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export type AIModel =
| 'gemini-2.5-flash'
| 'claude-opus-4-1-20250805'
| 'claude-opus-4-20250514'
| 'claude-sonnet-4-5-20250929'
| 'claude-sonnet-4-20250514'
| 'claude-3-7-sonnet-20250219'
| 'claude-3-5-sonnet-20241022'
Expand All @@ -38,7 +39,7 @@ export class SettingsManager {
*/
public getSelectedAIModel(): AIModel {
const config = vscode.workspace.getConfiguration('secureflow');
return config.get<AIModel>('AIModel') || 'claude-3-5-sonnet-20241022';
return config.get<AIModel>('AIModel') || 'claude-sonnet-4-5-20250929';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion extension/secureflow/src/ui/webview/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h3 style="margin: 0 0 12px 0;">Choose Your AI Model</h3>
<div class="form-group">
<label for="modelSelect">AI Model:</label>
<select id="modelSelect" class="form-select">
<option value="claude-3-5-sonnet-20241022">Claude 3.5 Sonnet (Recommended)</option>
<option value="claude-sonnet-4-5-20250929">Claude 4.5 Sonnet (Recommended)</option>
<option value="gpt-4o">GPT-4o</option>
<option value="gpt-4o-mini">GPT-4o Mini</option>
<option value="o1-mini">O1 Mini</option>
Expand Down
2 changes: 1 addition & 1 deletion extension/secureflow/src/ui/webview/onboarding.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { getModelDisplayName, getModelProvider } from './ui-helpers.js';

// Onboarding state
let currentStep = 1;
let selectedModel = 'claude-3-5-sonnet-20241022';
let selectedModel = 'claude-sonnet-4-5-20250929';
let apiKey = '';

// Show specific onboarding step
Expand Down
3 changes: 2 additions & 1 deletion extension/secureflow/src/ui/webview/ui-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ export function getTrashIcon() {
// Get display name for AI models
export function getModelDisplayName(model) {
const modelNames = {
'claude-3-5-sonnet-20241022': 'Claude 3.5 Sonnet',
'claude-sonnet-4-5-20250929': 'Claude 4.5 Sonnet',
'claude-3-5-sonnet-20241022': 'Claude 3.5 Sonnet (⚠️ DEPRECATED - Use 4.5 instead)',
'gpt-4o': 'GPT-4o',
'gpt-4o-mini': 'GPT-4o Mini',
'o1-mini': 'O1 Mini',
Expand Down