feat(gateway): 增强候选路由策略与可观测信息

This commit is contained in:
fawney19
2026-04-14 11:50:52 +08:00
parent 62e0a0338d
commit 593640ac19
44 changed files with 1828 additions and 302 deletions

View File

@@ -183,6 +183,9 @@ export interface RequestDetail {
has_response_body?: boolean
has_client_response_body?: boolean
metadata?: Record<string, unknown>
routing?: Record<string, unknown>
body_capture?: Record<string, unknown>
trace?: Record<string, unknown>
settlement?: {
billing_snapshot?: Record<string, unknown>
billing_snapshot_schema_version?: string

View File

@@ -30,6 +30,11 @@ export interface RoutingEndpointInfo {
api_format: string
base_url: string
custom_path?: string | null
format_acceptance_config?: {
enabled?: boolean
accept_formats?: string[] | null
reject_formats?: string[] | null
} | null
is_active: boolean
keys: RoutingKeyInfo[]
total_keys: number
@@ -53,6 +58,8 @@ export interface RoutingProviderInfo {
name: string
model_id: string
provider_priority: number
enable_format_conversion?: boolean
keep_priority_on_conversion?: boolean
billing_type?: string | null
monthly_quota_usd?: number | null
monthly_used_usd?: number | null
@@ -91,5 +98,6 @@ export interface ModelRoutingPreviewResponse {
active_providers: number
scheduling_mode: string
priority_mode: string
keep_priority_on_conversion?: boolean
all_keys_whitelist: GlobalKeyWhitelistItem[]
}