feat: improve model rate limit tracking
This commit is contained in:
@@ -69,6 +69,7 @@ export interface IntegrationPlatform {
|
||||
credentialsPreview?: Record<string, unknown>;
|
||||
retryPolicy?: RateLimitPolicy | Record<string, unknown>;
|
||||
rateLimitPolicy?: RateLimitPolicy;
|
||||
cooldownUntil?: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
@@ -644,6 +645,7 @@ export interface PlatformModel {
|
||||
rateLimitPolicy?: RateLimitPolicy;
|
||||
runtimePolicySetId?: string;
|
||||
runtimePolicyOverride?: RuntimePolicyOverride;
|
||||
cooldownUntil?: string;
|
||||
enabled: boolean;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
@@ -748,6 +750,36 @@ export interface RateLimitWindow {
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface RateLimitMetricStatus {
|
||||
currentValue: number;
|
||||
usedValue: number;
|
||||
reservedValue: number;
|
||||
limitValue: number;
|
||||
limited: boolean;
|
||||
ratio: number;
|
||||
resetAt?: string;
|
||||
}
|
||||
|
||||
export interface ModelRateLimitStatus {
|
||||
platformModelId: string;
|
||||
platformId: string;
|
||||
platformName: string;
|
||||
provider: string;
|
||||
modelName: string;
|
||||
providerModelName?: string;
|
||||
modelAlias?: string;
|
||||
displayName: string;
|
||||
modelType: string[];
|
||||
enabled: boolean;
|
||||
rateLimitPolicy?: RateLimitPolicy | Record<string, unknown>;
|
||||
platformCooldownUntil?: string;
|
||||
modelCooldownUntil?: string;
|
||||
concurrent: RateLimitMetricStatus;
|
||||
rpm: RateLimitMetricStatus;
|
||||
tpm: RateLimitMetricStatus;
|
||||
loadRatio: number;
|
||||
}
|
||||
|
||||
export interface GatewayNetworkProxyConfig {
|
||||
globalHttpProxy?: string;
|
||||
globalHttpProxySet: boolean;
|
||||
|
||||
Reference in New Issue
Block a user