chore: 提升 SSE 单行上限到 40MB
This commit is contained in:
@@ -544,7 +544,7 @@ func setDefaults() {
|
|||||||
viper.SetDefault("gateway.concurrency_slot_ttl_minutes", 30) // 并发槽位过期时间(支持超长请求)
|
viper.SetDefault("gateway.concurrency_slot_ttl_minutes", 30) // 并发槽位过期时间(支持超长请求)
|
||||||
viper.SetDefault("gateway.stream_data_interval_timeout", 180)
|
viper.SetDefault("gateway.stream_data_interval_timeout", 180)
|
||||||
viper.SetDefault("gateway.stream_keepalive_interval", 10)
|
viper.SetDefault("gateway.stream_keepalive_interval", 10)
|
||||||
viper.SetDefault("gateway.max_line_size", 25*1024*1024)
|
viper.SetDefault("gateway.max_line_size", 40*1024*1024)
|
||||||
viper.SetDefault("gateway.scheduling.sticky_session_max_waiting", 3)
|
viper.SetDefault("gateway.scheduling.sticky_session_max_waiting", 3)
|
||||||
viper.SetDefault("gateway.scheduling.sticky_session_wait_timeout", 45*time.Second)
|
viper.SetDefault("gateway.scheduling.sticky_session_wait_timeout", 45*time.Second)
|
||||||
viper.SetDefault("gateway.scheduling.fallback_wait_timeout", 30*time.Second)
|
viper.SetDefault("gateway.scheduling.fallback_wait_timeout", 30*time.Second)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const (
|
|||||||
claudeAPIURL = "https://api.anthropic.com/v1/messages?beta=true"
|
claudeAPIURL = "https://api.anthropic.com/v1/messages?beta=true"
|
||||||
claudeAPICountTokensURL = "https://api.anthropic.com/v1/messages/count_tokens?beta=true"
|
claudeAPICountTokensURL = "https://api.anthropic.com/v1/messages/count_tokens?beta=true"
|
||||||
stickySessionTTL = time.Hour // 粘性会话TTL
|
stickySessionTTL = time.Hour // 粘性会话TTL
|
||||||
defaultMaxLineSize = 25 * 1024 * 1024
|
defaultMaxLineSize = 40 * 1024 * 1024
|
||||||
claudeCodeSystemPrompt = "You are Claude Code, Anthropic's official CLI for Claude."
|
claudeCodeSystemPrompt = "You are Claude Code, Anthropic's official CLI for Claude."
|
||||||
maxCacheControlBlocks = 4 // Anthropic API 允许的最大 cache_control 块数量
|
maxCacheControlBlocks = 4 // Anthropic API 允许的最大 cache_control 块数量
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -154,9 +154,9 @@ gateway:
|
|||||||
# Stream keepalive interval (seconds), 0=disable
|
# Stream keepalive interval (seconds), 0=disable
|
||||||
# 流式 keepalive 间隔(秒),0=禁用
|
# 流式 keepalive 间隔(秒),0=禁用
|
||||||
stream_keepalive_interval: 10
|
stream_keepalive_interval: 10
|
||||||
# SSE max line size in bytes (default: 25MB)
|
# SSE max line size in bytes (default: 40MB)
|
||||||
# SSE 单行最大字节数(默认 25MB)
|
# SSE 单行最大字节数(默认 40MB)
|
||||||
max_line_size: 26214400
|
max_line_size: 41943040
|
||||||
# Log upstream error response body summary (safe/truncated; does not log request content)
|
# Log upstream error response body summary (safe/truncated; does not log request content)
|
||||||
# 记录上游错误响应体摘要(安全/截断;不记录请求内容)
|
# 记录上游错误响应体摘要(安全/截断;不记录请求内容)
|
||||||
log_upstream_error_body: false
|
log_upstream_error_body: false
|
||||||
|
|||||||
@@ -154,9 +154,9 @@ gateway:
|
|||||||
# Stream keepalive interval (seconds), 0=disable
|
# Stream keepalive interval (seconds), 0=disable
|
||||||
# 流式 keepalive 间隔(秒),0=禁用
|
# 流式 keepalive 间隔(秒),0=禁用
|
||||||
stream_keepalive_interval: 10
|
stream_keepalive_interval: 10
|
||||||
# SSE max line size in bytes (default: 25MB)
|
# SSE max line size in bytes (default: 40MB)
|
||||||
# SSE 单行最大字节数(默认 25MB)
|
# SSE 单行最大字节数(默认 40MB)
|
||||||
max_line_size: 26214400
|
max_line_size: 41943040
|
||||||
# Log upstream error response body summary (safe/truncated; does not log request content)
|
# Log upstream error response body summary (safe/truncated; does not log request content)
|
||||||
# 记录上游错误响应体摘要(安全/截断;不记录请求内容)
|
# 记录上游错误响应体摘要(安全/截断;不记录请求内容)
|
||||||
log_upstream_error_body: false
|
log_upstream_error_body: false
|
||||||
|
|||||||
Reference in New Issue
Block a user