feat(cloud): manage LLM providers in database
Tests / Test passed: 664

This commit is contained in:
2026-07-14 00:31:47 +08:00
parent b613a315ff
commit a166ffd8a4
35 changed files with 2432 additions and 204 deletions
+29
View File
@@ -149,3 +149,32 @@ export interface TokenUsageEvent {
total_tokens: number;
occurred_at: string;
}
export type LlmProviderType = "anthropic" | "openai-compatible";
export interface LlmProviderProfile {
id: string;
name: string;
provider_type: LlmProviderType;
model: string;
base_url: string | null;
timeout_seconds: number;
enabled: boolean;
revision: number;
has_api_key: boolean;
key_last_rotated_at: string;
created_at: string;
updated_at: string;
active: boolean;
}
export interface LlmProviderSettings {
active_profile_id: string | null;
revision: number;
updated_at: string | null;
}
export interface LlmProviderProfileListResponse {
settings: LlmProviderSettings;
items: LlmProviderProfile[];
}