Repository navigation
fix(log): derive response model mismatch from names stored flag - #7464
Merged
Merged
Conversation
Contributor
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (11)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
yang-yang9
added a commit
to yyangTeam/new-api
that referenced
this pull request
Sep 19, 2026
…rivation) Merged 2 upstream commits from origin/main (972aed1 QuantumNous#7464 + merge commit). Conflict resolution: zero conflicts — clean auto-merge. The new commit touches 3 files dev also modified (service/log_info_generate.go, usage-logs/types.ts, usage-logs/components/model-badge.tsx) but the changes are in non-overlapping regions; git auto-merged both sides. Upstream change (QuantumNous#7464): derive upstream response model mismatch from the model names instead of a stored flag. Adds relay/common/response_model.go refactor, new web/src/features/usage-logs/lib/response-model.ts, and the AppendResponseModelLogInfo helper in log_info_generate.go that records other.response_model only when names actually diverge. Phase 6a spot-check (dev content in auto-merged files intact): - service/log_info_generate.go: diff vs origin/dev shows only upstream additions (AppendResponseModelLogInfo, request_policy events, MarkRequestPolicySuccess, stream ResponseFailed/ResponseOutcome); 0 dev lines removed. - usage-logs/types.ts: dev fields (is_model_mapped, upstream_model_name, request_policy, response_model) all present; upstream added more. - model-badge.tsx: ResponseModelDetails still exported; upstream name-derivation logic added cleanly. Verification: - go build ./... passes - relaykit standalone build passes (GOWORK=off) - go vet ./... passes (all test packages compile) - bun run typecheck: zero errors - bun run i18n:check: passes Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 of 5 tasks
ChinaToyHunter
added a commit
to ChinaToyHunter/new-api
that referenced
this pull request
Sep 19, 2026
Brings in 972aed1 fix(log): derive response model mismatch from names instead of a stored flag (QuantumNous#7464). Auto-merged with zero conflicts: 10 of the 11 files were untouched by this fork since the merge base, and the only shared file, usage-logs/types.ts, had the two sides editing disjoint regions. Verified rather than assumed, since upstream turned a field into a method: - types.ts keeps every fork addition (ModelNameMode, modelNameMode, model_name_mode, ExportLogsParams, ExportLogsResult) alongside the upstream relocation of the PolicyEvent import and the response_model type without the stored mismatch flag. - relay/common/response_model.go turns ResponseModel.Mismatch into a method; nothing still reads it as a field (the other Mismatch symbols in the tree are unrelated payment/OAuth/session errors). - No .mismatch reader remains in web/src outside upstream own rewritten fixtures. - service/log_info_generate.go only drops a now-redundant guard on whether to attach the diagnostic response_model block; it does not touch attachQuotaSaturation or any quota conversion, so billing invariants stand. Verified: go build ./... ; go vet ./relay/common/... ./relay/ ./service/ ; go test ./relay/ -run ResponseModel ; bun run typecheck ; and 261 vitest cases across the 8 affected usage-logs files. Co-Authored-By: Claude Code <noreply@anthropic.com>
Javabcd
pushed a commit
to Javabcd/new-api
that referenced
this pull request
Sep 22, 2026
GuDong2003
pushed a commit
to GuDong2003/new-api
that referenced
this pull request
Sep 25, 2026
…ed flag (QuantumNous#7464) (cherry picked from commit 972aed1)
TomJKS
pushed a commit
to TomJKS/new-api
that referenced
this pull request
Sep 28, 2026
meatRoll
pushed a commit
to meatRoll/new-api
that referenced
this pull request
Oct 12, 2026
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.
English template:
.github/PULL_REQUEST_TEMPLATE/en.mdImportant
🔗 关联任务 / Related Issue
新功能请填写下方 Issue 编号;若还没有对应 Issue,请先自行创建。功能讨论请放在 Issue 中进行。
改动较大或方向性变更,请先在关联 Issue 中与维护者达成一致,再提交 PR。
Bug 修复请关联对应 Issue。设计取舍、理解偏差或预期不一致,更适合作为讨论或功能请求。
Closes #
🚀 变更类型 / Type of change
📝 变更描述 / Description
(简述做了什么、为什么生效。不得直接粘贴未经人工过滤的大段 AI 文本。如果难以简述,建议先拆分范围,或在 Issue 中与维护者对齐。)
响应模型不一致匹配逻辑放到前端
📸 运行证明 / Proof of Work
(请写明如何验证:实际命令或步骤,以及观察结果。仅声明
go build通过或测试通过,不视为有效证明。UI 变更请附截图或录屏;Bug 修复请说明复现过程与修复后结果。)✅ 提交前检查项 / Checklist
New feature,我已关联对应 Issue;若尚无 Issue,我已先自行创建。go build通过或测试通过,不视为有效证明。Summary by CodeRabbit
Bug Fixes
Tests