Usage pane (u) mixes traffic across inference servers now that sessions can switch servers
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- go
調査の方向性
Start with cmd/agentop/tui/usage_pane.go and trace fetchUsage, readUsage, renderUsage, and cycleGroup; then read core/cost/usage/usage.go for how foldInto aggregates usage. Check cmd/agentop/servers.ForHost and its use in cmd/agentop/tui/server_route.go to understand host-to-server mapping. The issue lists design questions to settle; done means usage views distinguish server traffic and handle latency, tokens, and non-server hosts, with behavior defined for router-off and single-server cases.
索引モデルが issue の本文から書いたものです。
説明
Summary
With the inference-router, an agent can be pointed at another server (S on the agents pane), and since #1435 a running session can be moved too, mid-conversation. The usage pane (u) did not change with it. It still adds up every request it sees, whichever server answered. So its headline figures (requests, errors, latency, tokens, cost) describe a mix of servers, and nothing on the pane says which part came from which server.
"Server" here means a named entry in the inference-router config (agentop server add <name> <url>), such as glm or ete-int. The router refuses two servers on one host, so a request's host identifies its server.
The problem
-
No scope isolates a server. The pane can be scoped to all sessions, one session, or one agent (
A). Before switching, an agent or a session meant one server. Now neither does: an agent's window holds its traffic to every server it was pointed at, and a moved session's chart joins its time on the old server to its time on the new one. -
A failing server is hidden by a healthy one. From a live laptop proxy, last 6 hours (
/v1/usage?window=6h&group=host):host server requests errors ete-litellm.ai-models.vpc-int.res.ibm.comete-int823 23 (2.8%) litellm.cb.ete.res.ibm.comglm6 3 (50%) mcp.ete-server.vpc-int.res.ibm.com(MCP, not a server) 16 6 others 5 0 The pane's headline says
ERRORS 32 (3.8%). The fact thatglmfailed half its requests appears nowhere. -
Latency is one mean across all servers. Latency is kept per bucket and per agent, not per host (
usage.Countshas no latency fields, and the pane prints "no breakdown for latency"). Different servers run different models on different hardware, so a mean across them describes no server. This is the number someone checks to decide whether to switch servers, and it cannot answer that question. -
Tokens are added across tokenizers. A GLM token and a Claude token are different units, so a total across both has no meaning. Cost is already guarded: a window that mixes billing units withholds the cost chart. Tokens have no such guard.
-
g→by hostcomes close, but does not fill the gap:- It shows raw hostnames (41 columns for
ete-int's host), not server names. The sessions and agents panes already name servers throughservers.ForHost. - It counts every host, including MCP servers and other non-inference traffic, so it does not show inference servers alone.
- It is not available under an agent scope, which takes over the one
groupaxis/v1/usagehas (fetchUsageforcesGroupAgent). "How is my agent doing onglm" has no view. - Latency has no breakdown at all (point 3).
- It shows raw hostnames (41 columns for
What a fix needs to decide
Questions to settle, not a design:
- Is "server" a scope (like
A), a grouping (likeg), or both? A scope answers "how isglmdoing"; a grouping answers "how do my servers compare". - Does the aggregator need latency per host, or per server? Both #1400 (alerts when a backend gets slower) and point 3 need per-server latency, so the answer probably serves both.
- What does the pane show when the router is off, or has one server? (The sessions table hides its SERVER column in both cases.)
- How should traffic to a host with no server be shown, such as a direct
api.anthropic.comcall or an agent the router does not route? - Should
agentop costget the same axis? Its ledger windows (today,month,7d) group byendpointbut not by server name.
Pointers
- Pane:
cmd/agentop/tui/usage_pane.go(fetchUsage,readUsage,renderUsage), with grouping incycleGroup. - Aggregation:
core/cost/usage/usage.go(foldInto:byHost,byEndpoint, per-agent rings inAggregator.agents). - Host-to-server mapping:
cmd/agentop/servers.ForHost, used bysessionServerCellincmd/agentop/tui/server_route.go. - Related: #1400 (per-backend performance baseline and alerts), #1435 (moving a running session).
Assisted-By: Claude (Anthropic AI) [email protected]
- 主要言語
- Go
- スター
- 18
- フォーク
- 42
- 平均マージ
- 12時間 54分
- マージ済み PR(30日)
- 242
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rossoctl/cortex のほかの issue
-
UI shows costs for all sessions even when drilled into a session対応中かも @esnible が 10 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
rossoctl/cortex#1116 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Session titled with a paste's own tag, e.g. <pasted_content id="8f8e">対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug
難易度 4/5 1〜2日 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
laptop
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
メンテナーはふだん 1 日以内に返信
-
enhancement Identity
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
rossoctl/cortex の issue をすべて見る
似ている issue
-
Project submission:オープン
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
slavakurilyak/awesome-ai-agents#845 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
JakeChampion/lang#13132 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] deploy.restart_policy without condition drops the restart policy対応中かも @akshat-lakhera が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
docker/compose#14383 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信