Usage view: empty/duplicate native Codex rows when agents use a shared CLIProxyAPI gateway#19520

opened11d agobyTtyler-b4innova

Problem

Agents in T3 Code can route through a shared CLIProxyAPI gateway. Each T3 environment still shows its own usage rows, which causes three problems:

  • Empty native rows. Each environment reads Codex usage from its local Codex app-server (account/rateLimits/read). Without a local Codex login, for example when the agent authenticates to a gateway with an API key, that row is empty or unavailable.
  • Duplicate rows. The same gateway accounts appear once per environment, so a client connected to several environments repeats them.
  • Native rows cannot be turned off alone. The server keeps any enabled provider that reports usage limits (providersWithLimits). The only setting that removes the native row disables the agent itself.

Related: the CLIProxyAPI usage hub calls /v0/management/*, which current CLIProxyAPI forks treat as deprecated in favour of /v8/management.

Proposal

  1. Per-instance control of native usage. Add an option such as providerInstances.<id>.usageLimits: false to skip the native usage read for that instance. Alternatively, skip a driver's native row automatically when an enabled CLIProxyAPI source already covers that driver.
  2. Dedupe hub accounts across environments. Show each gateway account once in the client's usage view, whatever the number of connected environments.
  3. Optional: let the hub use /v8/management paths when the server supports them.

Acceptance criteria

  • An environment with no local Codex login shows no empty Codex usage row when the option is off, or when a gateway covers the driver.
  • A gateway account appears once in the usage view across environments.
  • The option is per instance. Other instances of the same driver are unchanged.

Note

Grok responding on behalf of Julius.

This reads as a product change (per-instance usage toggle, cross-environment hub dedupe, optional /v8/management) rather than a single actionable bug. Please move it to Ideas so it can be shaped there.

Related open reports: #11873 (native Codex warnings/empty when proxy has no OpenAI auth), #10701 (duplicate native subscription rows), #11515 (multi-account Codex usage misreport).