feat: add vertex provider, oauth model mappings, and routing/log settings

This commit is contained in:
Supra4E8C
2026-01-05 19:03:05 +08:00
parent 71556a51c5
commit 8dca670358
18 changed files with 1313 additions and 113 deletions

View File

@@ -19,12 +19,16 @@ export interface Config {
usageStatisticsEnabled?: boolean;
requestLog?: boolean;
loggingToFile?: boolean;
logsMaxTotalSizeMb?: number;
wsAuth?: boolean;
forceModelPrefix?: boolean;
routingStrategy?: string;
apiKeys?: string[];
ampcode?: AmpcodeConfig;
geminiApiKeys?: GeminiKeyConfig[];
codexApiKeys?: ProviderKeyConfig[];
claudeApiKeys?: ProviderKeyConfig[];
vertexApiKeys?: ProviderKeyConfig[];
openaiCompatibility?: OpenAIProviderConfig[];
oauthExcludedModels?: Record<string, string[]>;
raw?: Record<string, any>;
@@ -38,12 +42,16 @@ export type 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';

View File

@@ -33,3 +33,12 @@ export interface OAuthConfig {
export interface OAuthExcludedModels {
models: string[];
}
// OAuth 模型映射
export interface OAuthModelMappingEntry {
name: string;
alias: string;
fork?: boolean;
}
export type OAuthModelMappings = Record<string, OAuthModelMappingEntry[]>;