added a configuration option for Claude through OpenRouter.

This commit is contained in:
Xiaohan-Tian
2025-08-24 13:31:33 -07:00
parent cd671eab4c
commit 81c6aeb966
3 changed files with 91 additions and 2 deletions
+11 -1
View File
@@ -7,7 +7,7 @@ import { DB_CONSTANTS } from '../../constants/coreConstants';
interface AppConfig {
general: {
language: string;
llm_provider: 'openai' | 'gemini' | 'claude' | 'openai_compatible';
llm_provider: 'openai' | 'gemini' | 'claude' | 'claude_openrouter' | 'openai_compatible';
openai: {
api_key: string;
flex: boolean;
@@ -21,6 +21,11 @@ interface AppConfig {
api_key: string;
model: string;
};
claude_openrouter: {
api_key: string;
base_url: string;
model: string;
};
openai_compatible: {
api_key: string;
base_url: string;
@@ -169,6 +174,11 @@ export class ConfigManager {
api_key: '',
model: 'claude-sonnet-4-0'
},
claude_openrouter: {
api_key: '',
base_url: 'https://openrouter.ai/api/v1/chat/completions',
model: 'anthropic/claude-sonnet-4'
},
openai_compatible: {
api_key: '',
base_url: '',