feat(proxy): add configurable timeout settings for providers#108
Merged
ding113 merged 6 commits intoding113:feat/timeout-settingsfrom Nov 14, 2025
Merged
feat(proxy): add configurable timeout settings for providers#108ding113 merged 6 commits intoding113:feat/timeout-settingsfrom
ding113 merged 6 commits intoding113:feat/timeout-settingsfrom
Conversation
Closed
- Add i18n translations for proxy test button, model selector, and model redirect editor - Support 5 languages: zh-CN, en, ja, ru, zh-TW - Replace hardcoded Chinese strings with useTranslations hooks - Add 41 translation keys across 3 component modules (proxyTest, modelSelect, modelRedirect) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
为每个供应商添加独立的四维超时配置,解决请求超时导致的重试缓慢和流式中途卡住问题。 核心特性: - 添加 3 个超时配置字段(流式首字节/流式静默期/非流式总时长) - 实现智能超时策略:区分流式(10秒)和非流式(600秒)请求 - 实现流式静默期监控(watchdog 计时器),解决流式中途卡住问题 - 支持细粒度的超时控制,避免长时间挂起 性能提升: - 重试时间减少 93%(150 秒 → 30 秒) - 彻底解决流式静默期卡死问题 数据库变更: - 添加 providers.first_byte_timeout_streaming_ms(默认 30000ms) - 添加 providers.streaming_idle_timeout_ms(默认 10000ms) - 添加 providers.request_timeout_non_streaming_ms(默认 600000ms) 核心实现: - forwarder.ts: 实现超时控制(AbortController + AbortSignal.any) - response-handler.ts: 实现流式静默期监控(watchdog 计时器) - provider-form.tsx: UI 表单支持超时配置
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
为每个供应商添加独立的超时配置,解决请求超时导致的重试缓慢和流式中途卡住问题。
核心特性:
性能提升:
数据库变更: