Repository navigation
feat: provider usage for the bighelp app (2.18.0) - #63
Merged
Merged
Conversation
POST /native/usage/list (native-provider-usage-v1) finds the AI tools on the host and reads each one's current usage from its own source: - Claude: Claude Code's login or Hermes' own Claude sign-in, via Claude's usage service (session, week, per-model weeks, extra usage) - Codex: the Codex CLI's app server (account/rateLimits/read), or Hermes' /usage for its own sign-in; a different Hermes account is listed separately - GitHub Copilot: GitHub's Copilot usage with Hermes' token order, the Copilot CLI's account.getQuota as a fallback (after ghc-usage-hermes) - OpenCode (opencode stats, OpenCode Go through Hermes), OpenRouter, DeepSeek, Nous Portal, and any Hermes provider plugin with a usage hook - Google AI Studio: checks the key works; Google publishes no usage API Read-only: borrowed CLI logins are never refreshed (refresh tokens rotate, so that would sign the CLI out), CLIs refresh their own. Keys only go to their provider and never follow redirects; no keys, emails or account IDs reach the app. Hermes lookups use the requested agent's profile. Cached five minutes, refresh throttled to 15 s, 20 s per provider. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3 (plugin side). The app's Usage sheet comes next and will pin this release.
What it does
POST /native/usage/list(native-provider-usage-v1) finds the AI tools on the host and reads each one's usage from its own source. Nothing to configure.account/rateLimits/read; Hermes/usagefor its own sign-in (a different account is listed separately)account.getQuotafallback (approximate). After ghc-usage-hermesopencode stats(7 and 30 days); Go limits through Hermes/keyand/credits/user/balancefetch_account_usageSafety
auth.adopt_external_logins: falsealso stops reading Claude Code's login.Testing
tests/test_provider_usage.py: 25 tests, including fake Codex (JSON lines) and Copilot (Content-Length) servers and a fakeopencode, redirect refusal, timeouts, caching, and the route through Hermes' real auth middleware.mainin my local environment (wiki, steering, packaged install); none are new.🤖 Generated with Claude Code