mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-04 11:43:57 +08:00
feat(usage): add automatic models.dev pricing sync (#5734)
* feat(usage): persist model pricing in local config * feat(usage): sync selected models.dev pricing on startup * fix(usage): address models.dev sync review feedback * fix(usage): harden local pricing synchronization
This commit is contained in:
@@ -67,6 +67,20 @@ export interface ModelPricing {
|
||||
cacheCreationCostPerMillion: string;
|
||||
}
|
||||
|
||||
export interface ModelsDevSyncConfig {
|
||||
autoSyncEnabled: boolean;
|
||||
includeCommonModels: boolean;
|
||||
selectedModelKeys: string[];
|
||||
excludedCommonModelKeys: string[];
|
||||
lastSyncAt: number | null;
|
||||
lastSyncError: string | null;
|
||||
}
|
||||
|
||||
export interface ModelsDevSyncState {
|
||||
config: ModelsDevSyncConfig;
|
||||
configPath: string;
|
||||
}
|
||||
|
||||
export interface UsageSummary {
|
||||
totalRequests: number;
|
||||
totalCost: string;
|
||||
|
||||
Reference in New Issue
Block a user