用途:读取各 AI 提供商的配额状态,为每项任务推荐最优的 Codex、Codex、Gemini 分配,并通过 GitHub 标签实现确定性智能体路由。主要能力:支持用 gh issue edit 添加或移除 agent:gemini、agent:Codex、agent:codex 标签;用 gh issue list --label 查看各智能体队列;批量将 5-6 个研究/规划任务合并进一个 Gemini 会话;刷新配额与利用率工件并生成路由记分卡、工作队列和自动打标候选报告。使用方式:先运行 bash scripts/cron/provider-utilization-refresh.sh 刷新遥测;用 bash scripts/ai/assessment/query-quota.sh --refresh --json 查看配额 JSON;Gemini 一次性执行推荐 hermes chat --provider openrouter --model google/gemini-2.5-pro --quiet -q,交互式可用 --provider copilot --yolo;Codex 实现用 hermes chat --provider anthropic -m Codex-opus-4-6 -q,Codex 用 --provider openai-codex;自动打标先干跑 uv run --no-project python scripts/ai/provider-autolabel.py,保守应用加 --apply --limit 3。适用场景:会话开始前有 3 个以上排队项、Codex 配额接近限制、路由不确定、/session-start 后设置分配。限制:Copilot 的 Gemini 非交互式 CLI 调用返回 HTTP 403;h-router-gemini -q 别名不适用于一次性执行;若配额来源为 unavailable 或 estimated、周百分比缺失或账本过期,无法保证接近 100% 的周利用率;自动打标应保守,信度约 0.90 以上才应用,0.60 仅用于报告。
agent-usage-optimizer
智能体与模型
更新于 10-16 07:16