Skip to content

feat(claude): add Claude (Anthropic) provider support for quota checks#16

Merged
0xtbug merged 1 commit intomainfrom
dev
Feb 21, 2026
Merged

feat(claude): add Claude (Anthropic) provider support for quota checks#16
0xtbug merged 1 commit intomainfrom
dev

Conversation

@0xtbug
Copy link
Owner

@0xtbug 0xtbug commented Feb 21, 2026

This commit introduces support for checking quota usage for Claude (Anthropic) accounts.

  • Add Claude API constants: Define CLAUDE_USAGE_URL and CLAUDE_HEADERS in src/constants/api.ts to facilitate API requests to Anthropic.
  • Integrate Claude into provider display: Update useProvidersPresenter.ts to include 'anthropic' and 'other' as recognized providers, allowing Claude files to be grouped and displayed correctly in the UI.
  • Extend quota presenter logic: Modify useQuotaPresenter.ts to recognize 'anthropic' as a provider type, add its icon mapping, and include it in the list of displayed providers.
  • Implement Claude quota fetching: Add a new fetchClaude method to quota.service.ts to handle API calls to the Claude usage endpoint.
  • Create Claude parser: Introduce src/services/api/parsers/claude.parser.ts to parse the response from the Claude usage API into a standardized ClaudeQuotaResult format.
  • Update quota types: Add ClaudeQuotaResult interface to src/types/quota.ts to define the structure of Claude quota data.

This commit introduces support for checking quota usage for Claude (Anthropic) accounts.

- **Add Claude API constants:** Define `CLAUDE_USAGE_URL` and `CLAUDE_HEADERS` in `src/constants/api.ts` to facilitate API requests to Anthropic.
- **Integrate Claude into provider display:** Update `useProvidersPresenter.ts` to include 'anthropic' and 'other' as recognized providers, allowing Claude files to be grouped and displayed correctly in the UI.
- **Extend quota presenter logic:** Modify `useQuotaPresenter.ts` to recognize 'anthropic' as a provider type, add its icon mapping, and include it in the list of displayed providers.
- **Implement Claude quota fetching:** Add a new `fetchClaude` method to `quota.service.ts` to handle API calls to the Claude usage endpoint.
- **Create Claude parser:** Introduce `src/services/api/parsers/claude.parser.ts` to parse the response from the Claude usage API into a standardized `ClaudeQuotaResult` format.
- **Update quota types:** Add `ClaudeQuotaResult` interface to `src/types/quota.ts` to define the structure of Claude quota data.
@0xtbug 0xtbug merged commit a7b7c17 into main Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant