Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Usage pane (u) mixes traffic across inference servers now that sessions can switch servers

オープン
#1,465 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go
領域
observability

調査の方向性

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 の本文から書いたものです。

説明

enhancement laptop

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

  1. 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.

  2. 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.com ete-int 823 23 (2.8%)
    litellm.cb.ete.res.ibm.com glm 6 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 that glm failed half its requests appears nowhere.

  3. Latency is one mean across all servers. Latency is kept per bucket and per agent, not per host (usage.Counts has 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.

  4. 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.

  5. g → by host comes 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 through servers.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 group axis /v1/usage has (fetchUsage forces GroupAgent). "How is my agent doing on glm" has no view.
    • Latency has no breakdown at all (point 3).

What a fix needs to decide

Questions to settle, not a design:

  • Is "server" a scope (like A), a grouping (like g), or both? A scope answers "how is glm doing"; 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.com call or an agent the router does not route?
  • Should agentop cost get the same axis? Its ledger windows (today, month, 7d) group by endpoint but not by server name.

Pointers

  • Pane: cmd/agentop/tui/usage_pane.go (fetchUsage, readUsage, renderUsage), with grouping in cycleGroup.
  • Aggregation: core/cost/usage/usage.go (foldInto: byHost, byEndpoint, per-agent rings in Aggregator.agents).
  • Host-to-server mapping: cmd/agentop/servers.ForHost, used by sessionServerCell in cmd/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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rossoctl/cortex のほかの issue

rossoctl/cortex の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。