Skip to content

fix(logging): Quota Guard 基线日志增加供应商标识并移除冗余启动日志#139

Merged
ThreeFish-AI merged 1 commit into
feature/1.x.xfrom
vk/71d6-
Apr 9, 2026
Merged

fix(logging): Quota Guard 基线日志增加供应商标识并移除冗余启动日志#139
ThreeFish-AI merged 1 commit into
feature/1.x.xfrom
vk/71d6-

Conversation

@ThreeFish-AI

@ThreeFish-AI ThreeFish-AI commented Apr 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Quota Guard 基线日志增加供应商标识load_baseline() 新增可选 vendor 参数,启动日志由 Quota guard: loaded baseline XXX tokens 变为 Quota guard [anthropic]: loaded baseline XXX tokens,便于多供应商场景下快速定位配额归属
  • 移除冗余启动日志:删除 lifespan()coding-proxy started: host=... port=... 日志,该信息已被 Rich Banner 和 uvicorn 原生日志 Uvicorn running on http://... 覆盖,无需重复输出

变更详情

文件 变更
src/coding/proxy/routing/quota_guard.py load_baseline() 新增 vendor: str | None = None 参数,有值时日志格式为 Quota guard [vendor]: ...,无值时保持原格式(向后兼容)
src/coding/proxy/server/app.py 调用侧传入 vendor=tier.name;移除 coding-proxy started 日志

预期启动日志效果

INFO:     Started server process [18555]
INFO:     Waiting for application startup.
INFO:     定价表加载成功,共 27 条模型配置
INFO:     Quota guard [anthropic]: loaded baseline 41251426 tokens
INFO:     Quota guard [copilot]: loaded baseline 234380 tokens
INFO:     Quota guard [antigravity]: loaded baseline 6312472 tokens
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:8046 (Press CTRL+C to quit)

Test plan

  • 现有 1127 个单元测试全部通过,无回归

🤖 Generated with Claude Code

- load_baseline() 新增可选 vendor 参数,日志输出包含供应商名称(如 Quota guard [anthropic]: loaded baseline ...)
- 移除 lifespan() 中 coding-proxy started 日志,该信息已由 Rich Banner 和 uvicorn 原生日志覆盖

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
@ThreeFish-AI
ThreeFish-AI merged commit 7e0b538 into feature/1.x.x Apr 9, 2026
6 checks passed
@ThreeFish-AI
ThreeFish-AI deleted the vk/71d6- branch April 9, 2026 15:43
@ThreeFish-AI ThreeFish-AI changed the title 如图,启动时的日志中: (vibe-kanban) fix(logging): Quota Guard 基线日志增加供应商标识并移除冗余启动日志 Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant