r-ayin/dsh-ttft-hedge ↗★ 0

dsh-ttft-hedge

对流式LLM请求进行对冲以优化首字响应时间 适合需要降低TTFT延迟、自动重试5xx错误的用户。

包名
dsh-ttft-hedge
兼容性
待验证
Harness 依赖范围
>=0.0.1-rc <2
版本
0.0.1
许可证
MIT
最近更新
2026年10月15日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:r-ayin/dsh-ttft-hedge

dsh-ttft-hedge

TTFT 优化:对发往 LLM 中继 /v1/messages 的流式请求做对冲(hedged request)——deadline 内未收到响应头则并行发第二个请求,先到先用;5xx/504 立即重抽;4xx/429 原样返回。附统计工具与 stats 文件。

由 dsh-super-injector dev_scaffold_plugin 生成。

构建与注入

bash scripts/build.sh
# 注入器环境内:dev_inject_plugin