mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-18 18:50:49 +08:00
feat: add vertex provider, oauth model mappings, and routing/log settings
This commit is contained in:
@@ -38,12 +38,16 @@ const SECTION_KEYS: RawConfigSection[] = [
|
||||
'usage-statistics-enabled',
|
||||
'request-log',
|
||||
'logging-to-file',
|
||||
'logs-max-total-size-mb',
|
||||
'ws-auth',
|
||||
'force-model-prefix',
|
||||
'routing/strategy',
|
||||
'api-keys',
|
||||
'ampcode',
|
||||
'gemini-api-key',
|
||||
'codex-api-key',
|
||||
'claude-api-key',
|
||||
'vertex-api-key',
|
||||
'openai-compatibility',
|
||||
'oauth-excluded-models'
|
||||
];
|
||||
@@ -65,8 +69,14 @@ const extractSectionValue = (config: Config | null, section?: RawConfigSection)
|
||||
return config.requestLog;
|
||||
case 'logging-to-file':
|
||||
return config.loggingToFile;
|
||||
case 'logs-max-total-size-mb':
|
||||
return config.logsMaxTotalSizeMb;
|
||||
case 'ws-auth':
|
||||
return config.wsAuth;
|
||||
case 'force-model-prefix':
|
||||
return config.forceModelPrefix;
|
||||
case 'routing/strategy':
|
||||
return config.routingStrategy;
|
||||
case 'api-keys':
|
||||
return config.apiKeys;
|
||||
case 'ampcode':
|
||||
@@ -77,6 +87,8 @@ const extractSectionValue = (config: Config | null, section?: RawConfigSection)
|
||||
return config.codexApiKeys;
|
||||
case 'claude-api-key':
|
||||
return config.claudeApiKeys;
|
||||
case 'vertex-api-key':
|
||||
return config.vertexApiKeys;
|
||||
case 'openai-compatibility':
|
||||
return config.openaiCompatibility;
|
||||
case 'oauth-excluded-models':
|
||||
@@ -194,9 +206,18 @@ export const useConfigStore = create<ConfigState>((set, get) => ({
|
||||
case 'logging-to-file':
|
||||
nextConfig.loggingToFile = value;
|
||||
break;
|
||||
case 'logs-max-total-size-mb':
|
||||
nextConfig.logsMaxTotalSizeMb = value;
|
||||
break;
|
||||
case 'ws-auth':
|
||||
nextConfig.wsAuth = value;
|
||||
break;
|
||||
case 'force-model-prefix':
|
||||
nextConfig.forceModelPrefix = value;
|
||||
break;
|
||||
case 'routing/strategy':
|
||||
nextConfig.routingStrategy = value;
|
||||
break;
|
||||
case 'api-keys':
|
||||
nextConfig.apiKeys = value;
|
||||
break;
|
||||
@@ -212,6 +233,9 @@ export const useConfigStore = create<ConfigState>((set, get) => ({
|
||||
case 'claude-api-key':
|
||||
nextConfig.claudeApiKeys = value;
|
||||
break;
|
||||
case 'vertex-api-key':
|
||||
nextConfig.vertexApiKeys = value;
|
||||
break;
|
||||
case 'openai-compatibility':
|
||||
nextConfig.openaiCompatibility = value;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user