Skip to content
Open
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
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@
"description": "Anthropic API key for Claude Code integration (required for claude-api provider)",
"scope": "application"
},
"superdesign.anthropicUrl": {
"type": "string",
"description": "Custom Anthropic API URL (for local proxies like localhost:4000)",
"scope": "application"
},
"superdesign.claudeCodePath": {
"type": "string",
"description": "Path to claude binary (defaults to 'claude' for npm install, use 'claude-code' if installed via shell script)",
Expand Down
20 changes: 15 additions & 5 deletions src/services/customAgentService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,23 @@ export class CustomAgentService implements AgentService {
}

this.outputChannel.appendLine(`Anthropic API key found: ${anthropicKey.substring(0, 12)}...`);


const anthropicUrl = config.get<string>('anthropicUrl');
const isCustomAnthropicUrl = !!anthropicUrl;

if (isCustomAnthropicUrl) {
this.outputChannel.appendLine(`Using custom Anthropic URL: ${anthropicUrl}`);
}

const anthropic = createAnthropic({
apiKey: anthropicKey,
baseURL: "https://anthropic.helicone.ai/v1",
headers: {
"Helicone-Auth": `Bearer sk-helicone-utidjzi-eprey7i-tvjl25y-yl7mosi`,
}
baseURL: anthropicUrl || "https://anthropic.helicone.ai/v1",
// Only include Helicone headers when using default URL
...(isCustomAnthropicUrl ? {} : {
headers: {
"Helicone-Auth": `Bearer sk-helicone-utidjzi-eprey7i-tvjl25y-yl7mosi`,
}
})
});

// Use specific model if available, otherwise default to claude-4-sonnet
Expand Down