diff --git a/docs/cli/index.md b/docs/cli/index.md index ef4d956831f..00c7533a85d 100644 --- a/docs/cli/index.md +++ b/docs/cli/index.md @@ -1213,9 +1213,9 @@ Notes: - Data comes directly from provider usage endpoints (no estimates). - Human-readable output is normalized to `X% left` across providers. -- Providers with current usage windows: Anthropic, GitHub Copilot, Gemini CLI, OpenAI Codex, MiniMax, and z.ai. +- Providers with current usage windows: Anthropic, GitHub Copilot, Gemini CLI, OpenAI Codex, MiniMax, Xiaomi, and z.ai. - MiniMax note: raw `usage_percent` / `usagePercent` means remaining quota, so OpenClaw inverts it before display; count-based fields still win when present. `model_remains` responses prefer the chat-model entry, derive the window label from timestamps when needed, and include the model name in the plan label. -- If no matching credentials exist, usage is hidden. +- Usage auth comes from provider-specific hooks when available; otherwise OpenClaw falls back to matching OAuth/API-key credentials from auth profiles, env, or config. If none resolve, usage is hidden. - Details: see [Usage tracking](/concepts/usage-tracking). ### `health` diff --git a/docs/cli/models.md b/docs/cli/models.md index 6e013fb3a19..4c0fdb81248 100644 --- a/docs/cli/models.md +++ b/docs/cli/models.md @@ -27,6 +27,10 @@ openclaw models scan `openclaw models status` shows the resolved default/fallbacks plus an auth overview. When provider usage snapshots are available, the OAuth/API-key status section includes provider usage windows and quota snapshots. +Current usage-window providers: Anthropic, GitHub Copilot, Gemini CLI, OpenAI +Codex, MiniMax, Xiaomi, and z.ai. Usage auth comes from provider-specific hooks +when available; otherwise OpenClaw falls back to matching OAuth/API-key +credentials from auth profiles, env, or config. Add `--probe` to run live auth probes against each configured provider profile. Probes are real requests (may consume tokens and trigger rate limits). Use `--agent ` to inspect a configured agent’s model/auth state. When omitted, diff --git a/docs/concepts/usage-tracking.md b/docs/concepts/usage-tracking.md index ca75eb567af..7d19cbe91fe 100644 --- a/docs/concepts/usage-tracking.md +++ b/docs/concepts/usage-tracking.md @@ -40,6 +40,10 @@ title: "Usage Tracking" chat-model entry, derives the window label from timestamps when explicit `window_hours` / `window_minutes` fields are absent, and includes the model name in the plan label. +- **Xiaomi MiMo**: API key via env/config/auth store (`XIAOMI_API_KEY`). - **z.ai**: API key via env/config/auth store. -Usage is hidden if no matching OAuth/API credentials exist. +Usage is hidden when no usable provider usage auth can be resolved. Providers +can supply plugin-specific usage auth logic; otherwise OpenClaw falls back to +matching OAuth/API-key credentials from auth profiles, environment variables, +or config. diff --git a/docs/reference/api-usage-costs.md b/docs/reference/api-usage-costs.md index 5a74707b8b9..47a822c9350 100644 --- a/docs/reference/api-usage-costs.md +++ b/docs/reference/api-usage-costs.md @@ -41,11 +41,16 @@ per-message dollar estimate that OpenClaw can show in `/usage full`. - `openclaw status --usage` and `openclaw channels list` show provider **usage windows** (quota snapshots, not per-message costs). - Human output is normalized to `X% left` across providers. +- Current usage-window providers: Anthropic, GitHub Copilot, Gemini CLI, + OpenAI Codex, MiniMax, Xiaomi, and z.ai. - MiniMax note: its raw `usage_percent` / `usagePercent` fields mean remaining quota, so OpenClaw inverts them before display. Count-based fields still win when present. If the provider returns `model_remains`, OpenClaw prefers the chat-model entry, derives the window label from timestamps when needed, and includes the model name in the plan label. +- Usage auth for those quota windows comes from provider-specific hooks when + available; otherwise OpenClaw falls back to matching OAuth/API-key + credentials from auth profiles, env, or config. See [Token use & costs](/reference/token-use) for details and examples. diff --git a/docs/reference/token-use.md b/docs/reference/token-use.md index ce5b0bad5d7..a2de7ce82e0 100644 --- a/docs/reference/token-use.md +++ b/docs/reference/token-use.md @@ -60,6 +60,8 @@ Other surfaces: - **TUI/Web TUI:** `/status` + `/usage` are supported. - **CLI:** `openclaw status --usage` and `openclaw channels list` show normalized provider quota windows (`X% left`, not per-response costs). + Current usage-window providers: Anthropic, GitHub Copilot, Gemini CLI, + OpenAI Codex, MiniMax, Xiaomi, and z.ai. Usage surfaces normalize common provider-native field aliases before display. For OpenAI-family Responses traffic, that includes both `input_tokens` / @@ -72,6 +74,9 @@ When the current session snapshot is missing cache counters, `/status` can also recover `cacheRead` / `cacheWrite` from the most recent transcript usage log. Existing nonzero live cache values still take precedence over transcript fallback values. +Usage auth for provider quota windows comes from provider-specific hooks when +available; otherwise OpenClaw falls back to matching OAuth/API-key credentials +from auth profiles, env, or config. ## Cost estimation (when shown)