Repository navigation
feat(proxy,monitor): 透传与可视化物理上游模型版本 (Resolves #3654) - #3658
Closed
modded-soldier-9 wants to merge 1 commit into
Closed
modded-soldier-9 wants to merge 1 commit into
modded-soldier-9 wants to merge 1 commit into
Conversation
1. [响应头透传 (Resolves lbjlaq#3654)]: 在 OpenAI、Claude、Gemini 与 Warmup 各协议出站响应头中透传 X-Upstream-Model,便于客户端与调试工具直接观测真实执行的上游物理模型; 2. [监控链路解析]: 在监控中间件中自动捕获 SSE 流式 candidate 与非流式响应报文中的 modelVersion,精准记录物理模型版本; 3. [数据库持久化与 UI 展示]: 扩展 request_logs 表 upstream_model 字段,在 ProxyMonitor 监控列表与详情侧边栏中清晰呈现 '请求模型 => 映射模型 (⚡ 真实物理版本)'; 4. [单测保障]: 新增 test_proxy_request_log_upstream_model_serialization 与 test_proxy_db_upstream_model_roundtrip 单元测试。 Resolves lbjlaq#3654 Co-Authored-By: JeikCode <code@jeikcode.top>
modded-soldier-9
added a commit
to modded-soldier-9/Antigravity-Manager
that referenced
this pull request
Oct 13, 2026
lbjlaq
added a commit
that referenced
this pull request
Oct 13, 2026
Owner
|
Merged into beta in commit 8db23c3, released in v4.9.7-beta.9. Thanks to @modded-soldier-9! |
YuanYeYouTao
added a commit
to YuanYeYouTao/Antigravity-Manager
that referenced
this pull request
Oct 13, 2026
alexeynesteruk
added a commit
to alexeynesteruk/Antigravity-Manager
that referenced
this pull request
Oct 23, 2026
Resolved conflicts per fork policy: upstream scheduler, compact, transport, and security fixes; English-primary docs kept (CHANGELOG.md from upstream CHANGELOG_EN.md, Chinese mirror in CHANGELOG_ZH.md, CHANGELOG_EN.md stays deleted). Fork-only Veo route, Windows keep-alive, and prior proxy fixes remain. Brings endpoint health tracking (Fixes lbjlaq#3635, PR lbjlaq#3657, PR lbjlaq#3660), loopback-only warmup (Fixes lbjlaq#3659, PR lbjlaq#3660), weekly-quota EDF (Fixes lbjlaq#549, PR lbjlaq#3645), Claude Code 95% compact probe (Fixes lbjlaq#867, lbjlaq#1066, lbjlaq#1079), Cowork immunity lease 90s (PR lbjlaq#3647), tool pipeline fixes (Fixes lbjlaq#3195, lbjlaq#3202, lbjlaq#3229, lbjlaq#3224, lbjlaq#3215, PR lbjlaq#3652), the "ok go on" defense replacement (Fixes lbjlaq#3629), and core HTTP API fixes (Fixes lbjlaq#3631, lbjlaq#3630, lbjlaq#1411, lbjlaq#3270, lbjlaq#3275, lbjlaq#3280, lbjlaq#3260). Ref lbjlaq#3654, PR lbjlaq#3655, PR lbjlaq#3658
jeikl
added a commit
that referenced
this pull request
Oct 27, 2026
…Ref #3658, Ref #3654) - 根因分析:PR #3658 引入了在 SSE 流式帧与响应体中自动提取 modelVersion 的逻辑;当请求 Gemini 原生协议时,Google 官方上游下发内部构件名(如 gemini-3.8-flash-n),中间件无条件覆写了已由网关分档路由仲裁好的 upstream_model,导致真实模型被误报并触发非预期的模型变更标记; - 架构收敛:彻底移除 SSE 流式与非流式响应体中提取 modelVersion 覆写 upstream_model 的冗余逻辑,保持零硬编码规则; - 权威基准:上游物理执行模型(upstream_model)统一且唯一从各协议适配器与网关出站响应头 X-Upstream-Model 中提取,确保四协议(Gemini、Anthropic、OpenAI、Warmup)端到端物理模型认知绝对一致。 Co-Authored-By: JeikCode <code@jeikcode.top>
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.
变更类型
基于的分支与版本号
基于
beta分支,版本基线v4.9.7-beta.8。关联 Issue:Resolves #3654
当前问题、对用户使用体验会产生什么问题或影响
在多轮推理或请求
gemini-3.8-flash-high/gemini-3.8-flash等逻辑别名时,用户无法直接获知底层实际上游 Google 节点实际调度运行的具体物理模型版本(例如gemini-2.5-flash-preview、-exp-b等真实后缀,Issue #3654)。在监控面板和调试过程中,只能看到客户端请求名或内部映射名,缺乏物理执行层面的透明度。解決方案
handle_chat_completions、handle_completions)、Claude (handle_messages)、Gemini (handle_generate) 和 Warmup 出站响应中统一注入X-Upstream-Model响应头;modelVersion)及非流式响应 JSON 中自动捕获上游返回的真实物理模型版本,存入ProxyRequestLog.upstream_model;request_logs表中自愈添加upstream_model字段并落盘存储;ProxyMonitor监控表格模型列增加物理版本标识,并在详情抽屉中以⚡ 上游真实模型清晰展示;MiniView迷你悬浮条中展示真实物理模型;test_proxy_request_log_upstream_model_serializationtest_proxy_db_upstream_model_roundtrip提交清单(组内独立、可单独回退)
自检(与 CI 相同的命令)
cargo fmt -- --check代码格式化规范通过v4.9.7-beta.8) 零冲突整洁提交署名
Co-Authored-By: JeikCode code@jeikcode.top