mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-31 20:01:42 +00:00
Fixes #87132. Default Usage now requests all configured agents with `agentScope: "all"`, while selecting a specific agent sends `agentId` consistently to both session usage and cost usage calls. The gateway now supports explicit all-agent session usage, aggregates all-agent cost summaries across configured agents, and keeps scoped cache entries separate. Legacy gateway fallbacks remain for older `agentId` / `agentScope` support, with protocol docs/schema and Swift generated models updated. Verification: - `node scripts/run-vitest.mjs ui/src/ui/controllers/usage.node.test.ts ui/src/ui/app-render-usage-tab.test.ts ui/src/ui/views/usage.test.ts --reporter=dot` - `node scripts/run-vitest.mjs run --config test/vitest/vitest.gateway-methods.config.ts src/gateway/server-methods/usage.test.ts src/gateway/server-methods/usage.cost-usage-cache.test.ts src/gateway/server-methods/usage.sessions-usage.test.ts --reporter=dot` - `pnpm check:test-types` - `pnpm protocol:check` - targeted `node scripts/run-oxlint.mjs ...` - `git diff --check` - autoreview clean after Swift compatibility fix - PR CI green at head `d67156a3c552c4f9c8b6edf8516b6242bf5cdd26` Co-authored-by: Alix-007 <267018309+Alix-007@users.noreply.github.com>