feat: improve model catalog aggregation
This commit is contained in:
@@ -559,6 +559,7 @@ export interface PlatformModel {
|
||||
provider?: string;
|
||||
platformName?: string;
|
||||
modelName: string;
|
||||
providerModelName?: string;
|
||||
modelAlias?: string;
|
||||
modelType: string[];
|
||||
displayName: string;
|
||||
@@ -579,6 +580,93 @@ export interface PlatformModel {
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface ModelCatalogFilterOption {
|
||||
value: string;
|
||||
label: string;
|
||||
count: number;
|
||||
iconPath?: string;
|
||||
}
|
||||
|
||||
export interface ModelCatalogProviderSummary {
|
||||
key: string;
|
||||
name: string;
|
||||
iconPath?: string;
|
||||
sourceCount: number;
|
||||
}
|
||||
|
||||
export interface ModelCatalogText {
|
||||
label: string;
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export interface ModelCatalogPricing {
|
||||
lines: string[];
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export interface ModelCatalogRateLimits {
|
||||
rpm?: number;
|
||||
tpm?: number;
|
||||
concurrent?: number;
|
||||
label: string;
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export interface ModelCatalogPermission {
|
||||
label: string;
|
||||
title?: string;
|
||||
allowGroups?: string[];
|
||||
denyGroups?: string[];
|
||||
}
|
||||
|
||||
export interface ModelCatalogSource {
|
||||
id: string;
|
||||
platformId?: string;
|
||||
platformName?: string;
|
||||
providerKey: string;
|
||||
providerName: string;
|
||||
modelName: string;
|
||||
modelAlias?: string;
|
||||
displayName: string;
|
||||
modelType: string[];
|
||||
enabled: boolean;
|
||||
rateLimits: ModelCatalogRateLimits;
|
||||
}
|
||||
|
||||
export interface ModelCatalogItem {
|
||||
id: string;
|
||||
alias: string;
|
||||
displayName: string;
|
||||
modelName: string;
|
||||
description?: string;
|
||||
iconPath?: string;
|
||||
modelType: string[];
|
||||
capabilityTags: string[];
|
||||
providerKeys: string[];
|
||||
providers: ModelCatalogProviderSummary[];
|
||||
sourceCount: number;
|
||||
source: ModelCatalogText;
|
||||
discount: ModelCatalogText;
|
||||
rateLimits: ModelCatalogRateLimits;
|
||||
permission: ModelCatalogPermission;
|
||||
pricing: ModelCatalogPricing;
|
||||
enabled: boolean;
|
||||
statusLabel?: string;
|
||||
sources?: ModelCatalogSource[];
|
||||
}
|
||||
|
||||
export interface ModelCatalogResponse {
|
||||
items: ModelCatalogItem[];
|
||||
filters: {
|
||||
capabilities: ModelCatalogFilterOption[];
|
||||
providers: ModelCatalogFilterOption[];
|
||||
};
|
||||
summary: {
|
||||
modelCount: number;
|
||||
sourceCount: number;
|
||||
};
|
||||
}
|
||||
|
||||
export interface RateLimitWindow {
|
||||
scopeType: string;
|
||||
scopeKey: string;
|
||||
@@ -647,4 +735,7 @@ export interface GatewayTaskEvent {
|
||||
|
||||
export interface ListResponse<T> {
|
||||
items: T[];
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
total?: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user