feat: FreeLLM 代理层 — compression + freellm 包 + README 诚实化#2
Open
anbeime wants to merge 1 commit into
Open
Conversation
Co-authored-by: traeagent <traeagent@users.noreply.github.com>
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.
交付内容
把 OmniRoute 的三个独有卖点(免费源池 / token 压缩 / 多级 failover)反哺进 TOPGO Gateway 的 FreeLLM 代理层。基于真实
backend/internal/代码落地,不是空气架构。新增
backend/internal/service/compression/— Token 压缩包Engine接口,调用点只传body []byte进出,零耦合 ent/wireLiteEngine(空白归一,CJK 安全)+RuleEngine(~80 条 Caveman 类规则,standard/aggressive 两档)backend/internal/service/freellm/— 免费源池 seedchannel_monitor探活,不新建表TOPGO_FREELLM_PROXY.md— 设计文档,三卖点逐条映射到真实代码 + 集成点 + 闭环(串四色卡片 MCP)改动
README.md诚实化:orchestrator/docs/configuration.mdorchestrator/src/,加新包)验证
go vet ./internal/service/compression/ ./internal/service/freellm/干净go test ./internal/service/compression/— 15 用例 PASSgo test ./internal/service/freellm/— PASSgo build ./...— exit 0,全量编译无回归未做(Roadmap)
ForwardAsChatCompletions入口加一行调用 + wire 注入 + usage_log 遥测,建议单独 PR备注
OmniRoute 的"8ms Provider→Connection→Model"三层 failover 表述未能从原文核实(mp.weixin.qq.com 抓取受限),README 对位表按 OmniRoute 官方"4-tier auto-fallback"口径写。