mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 01:40:21 +08:00
refactor: 移除 Provider/Endpoint 级别的 timeout 配置,改用全局环境变量
- 废弃 Provider.timeout 和 ProviderEndpoint.timeout 字段(保留数据库列以兼容) - 非流式请求超时由 HTTP_REQUEST_TIMEOUT 环境变量控制(默认 300 秒) - 流式请求首字节超时由 STREAM_FIRST_BYTE_TIMEOUT 环境变量控制(默认 30 秒) - 移除前端表单中的超时配置输入框 - 简化 settings.py 中的 TTFB 超时解析逻辑 - 更新 API 请求/响应模型,移除 timeout 字段 - 更新导入导出功能,不再包含 timeout 配置
This commit is contained in:
@@ -28,7 +28,6 @@ export async function createEndpoint(
|
||||
base_url: string
|
||||
custom_path?: string
|
||||
header_rules?: HeaderRule[]
|
||||
timeout?: number
|
||||
max_retries?: number
|
||||
is_active?: boolean
|
||||
config?: Record<string, any>
|
||||
@@ -48,7 +47,6 @@ export async function updateEndpoint(
|
||||
base_url: string
|
||||
custom_path: string | null
|
||||
header_rules: HeaderRule[]
|
||||
timeout: number
|
||||
max_retries: number
|
||||
is_active: boolean
|
||||
config: Record<string, any>
|
||||
|
||||
@@ -34,7 +34,6 @@ export async function updateProvider(
|
||||
quota_expires_at: string
|
||||
rpm_limit: number | null
|
||||
// 请求配置(从 Endpoint 迁移)
|
||||
timeout: number
|
||||
max_retries: number
|
||||
proxy: ProxyConfig | null
|
||||
cache_ttl_minutes: number // 0表示不支持缓存,>0表示支持缓存并设置TTL(分钟)
|
||||
|
||||
@@ -96,7 +96,6 @@ export interface ProviderEndpoint {
|
||||
custom_path?: string // 自定义请求路径(可选,为空则使用 API 格式默认路径)
|
||||
// 请求头配置
|
||||
header_rules?: HeaderRule[] // 请求头规则列表,支持 set/drop/rename 操作
|
||||
timeout: number
|
||||
max_retries: number
|
||||
is_active: boolean
|
||||
config?: Record<string, any>
|
||||
@@ -302,7 +301,6 @@ export interface ProviderWithEndpointsSummary {
|
||||
quota_last_reset_at?: string // 当前周期开始时间
|
||||
quota_expires_at?: string
|
||||
// 请求配置(从 Endpoint 迁移)
|
||||
timeout?: number // 请求超时(秒)
|
||||
max_retries?: number // 最大重试次数
|
||||
proxy?: ProxyConfig | null // 代理配置
|
||||
is_active: boolean
|
||||
|
||||
Reference in New Issue
Block a user