Repository navigation
feat(relay): add provider response-model diagnostics across Go, Rust and Web - #584
Conversation
Observe provider-declared models before conversion, retain useful three-name metadata with a sticky derived mismatch, and share a bounded compatibility contract across Go, Rust, and the usage-log UI. Keep existing response and billing behavior, including native Claude model handling. Refs #378.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
[P2] Go 的 selected model 还需要覆盖参数覆写后的实际出站模型
因此,请求 建议在最终出站请求确定后单独冻结诊断用的 selected model,覆盖参数覆写路径,同时保持现有计价/路由字段不变;补一条经过真实请求构建的回归用例,断言上游收到的 model 与 核对版本:801c645909d77ab4324ac4fc7f455f3b4e9fc3ec。相关路径: |
|
更新(head d598662):本评论记录的两项 CI 问题均已修复并验证。集成测试门禁已同步至 35 项;旧 Evidence fixture 补齐了原有 Usage 必填字段,生产 decoder 未放宽。当前 head 的 CI 全部通过,原失败的 missing_empty_or_exact_provider_model_keeps_legacy_evidence_and_logs_unchanged 用例也已通过。 CI:https://github.com/TokenNotIncluded/api.lmm.best/actions/runs/37123734458 以下保留初次失败的定位记录: CI 已确认一个独立阻塞点:新增的两条 PostgreSQL 回归测试尚未加入真实集成测试门禁清单。 当前 Workflow and resource-safety contracts 在 Validate real integration gate contracts 失败,日志为: 需要一起同步:
只改第一处仍会在真实集成 runner 的数量校验处失败。核对版本:801c645。失败 job:https://github.com/TokenNotIncluded/api.lmm.best/actions/runs/37121618855/job/111198708863 补充:Rust workspace 测试也在同一 head 失败(928 passed / 1 failed / 5 ignored)。 |
Bind the settlement integration gate to all 35 source and compiled tests, including both response model diagnostics regressions. Keep exact test names and execution-count guards, and verify that dropping the new regressions fails before execution. Refs #378.
Retain WebSocket capability, authorization and reader isolation alongside provider model observations. Preserve both translation sets and provide a scoped WebSocket copy generator with exact-key regression coverage. Keep all documentation index links and the 35-test settlement gate.
LMM API Pull Request
变更说明 / Summary
用量日志以前只能显示请求和映射模型,无法看到供应商实际声明的模型。本次在转换前观察原始 OpenAI/Responses、Claude、Gemini 响应,保留有用的 requested/selected/returned 三个名称,并在列表和详情动态计算警告。真实不相容声明不会被后续匹配或空事件清除。
比较规则沿用上游最终语义:返回名称与 requested 或 selected 任一相容就不警告;A→B→A 保留三个名称但不报警。仅放行明确的日期/latest/preview 后缀,gpt-4o→mini 等不同模型仍报警。Go/Rust/Web 共用 24 条样例,不存 mismatch boolean。诊断不参与路由或计价,也保留 Claude 原有模型 setter。
Rust 在已有 OpenAI/Responses 消费日志写相同 metadata;其原生 Claude/Gemini 尚无该结算日志、WS 未配置的边界已写入文档。七语言文案经维护脚本生成,旧日志正常显示。
与上游的关系 / Upstream relationship
上游参考 / Upstream reference: QuantumNous/new-api@ed7c4e3 、 QuantumNous/new-api@972aed1 。按 LMM 双后端和现有日志/UI 适配,收窄宽松后缀比较。
关联 Issue / Related issue
Closes #378
依赖 #591 已合入。服务器验收抓到的 main 既有 WS 失败预留释放竞态已修复,此 immutable head 的所有检查已重新通过。
变更类型 / Type of change
验证 / Verification
最终 immutable head
1db2716764167cb80289abaa2c0fcd053a7f3cde,正常 merge 已验9142600c与 #591dff6ae1ff,未 rebase/force。相对 914 仅两个 WS 文件,诊断、翻译、35 项计数及 negative guard 原样;合并后 relay tree 的 31 个有测试包 race 全绿,relay/service/model vet 通过。截图或日志 / Screenshots or logs
真实 HTTP/PG 消费断言保持 quota 32、tokens 20/4,诊断只新增 metadata。源码中的共享 fixture 与组件测试提供 exact/alias/mismatch/旧日志证据。exact head 的 CI、完整服务器资格、Billing safety、browser-review 和 CodeQL 全部通过,25 checks 均已完成,无失败或待执行项。
提交检查 / Checklist