mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-18 02:30:51 +08:00
48 lines
925 B
TypeScript
48 lines
925 B
TypeScript
/**
|
|
* AI 提供商相关类型
|
|
* 基于原项目 src/modules/ai-providers.js
|
|
*/
|
|
|
|
export interface ModelAlias {
|
|
name: string;
|
|
alias?: string;
|
|
priority?: number;
|
|
testModel?: string;
|
|
}
|
|
|
|
export interface ApiKeyEntry {
|
|
apiKey: string;
|
|
proxyUrl?: string;
|
|
headers?: Record<string, string>;
|
|
}
|
|
|
|
export interface GeminiKeyConfig {
|
|
apiKey: string;
|
|
prefix?: string;
|
|
baseUrl?: string;
|
|
headers?: Record<string, string>;
|
|
excludedModels?: string[];
|
|
}
|
|
|
|
export interface ProviderKeyConfig {
|
|
apiKey: string;
|
|
prefix?: string;
|
|
baseUrl?: string;
|
|
proxyUrl?: string;
|
|
headers?: Record<string, string>;
|
|
models?: ModelAlias[];
|
|
excludedModels?: string[];
|
|
}
|
|
|
|
export interface OpenAIProviderConfig {
|
|
name: string;
|
|
prefix?: string;
|
|
baseUrl: string;
|
|
apiKeyEntries: ApiKeyEntry[];
|
|
headers?: Record<string, string>;
|
|
models?: ModelAlias[];
|
|
priority?: number;
|
|
testModel?: string;
|
|
[key: string]: any;
|
|
}
|