feat: Add DeepSeek provider support - #31
Merged
Merged
Conversation
- Add DEEPSEEK to Provider enum with display name and abbreviation - Add DEEPSEEK_API ConnectionType with dedicated balance endpoint - Implement DeepSeekProviderClient for GET /user/balance integration - Parses total_balance and currency from balance_infos array - Handles auth errors (401/403), rate limits (429), and network errors - Stores currency in metadata for future UI enhancements - Add DeepSeekConnectDialog for simple API key input - Wire DeepSeek into AccountEditDialog with provider URL and hint text - Register DeepSeekProviderClient in DefaultProviderRegistry - Add comprehensive unit tests (11 test cases covering success/error paths) - Update README.md with DeepSeek in provider list and auth table - Update plugin.xml to list DeepSeek as supported provider Closes #<issue-number-if-any>
The is_available field indicates whether the account has enough balance to make API calls, not whether the API key is valid. A brand-new key with $0.00 balance returns is_available=false but is perfectly valid. Remove the is_available gate and always parse balance_infos when present. This allows users with fresh, unloaded keys to see $0.00 in the status bar instead of an error. Also fix the test that locked in the wrong behavior.
Commit 60ed88b accidentally committed an unrelated dirty-worktree change to build.gradle.kts (platform plugin 2.3.0->2.18.1 + broken create(it,it) call) and a .salive compiler artifact via 'git add -A'. Both broke CI: - Plugin Verifier: 'Specified type IU-2026.2.1 is unknown' (create() misparse) - platformTest: NoSuchMethodError (platform binary mismatch from version bump) Restore build.gradle.kts to match main; add .kotlin/ to .gitignore.
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.
Summary
Adds DeepSeek as a new provider in TokenPulse. DeepSeek exposes a dedicated
GET /user/balanceendpoint authenticated with a simple Bearer API key — making it the lowest-effort, highest-value new provider to add.What's Included
Core Implementation
DEEPSEEKwith display name "DeepSeek" and abbreviation "DS"DEEPSEEK_APIwithREMAINING_ONLYbalance formatGET https://api.deepseek.com/user/balancetotal_balanceandcurrencyfrombalance_infos[]DefaultProviderRegistry, wired intoAccountEditDialogTests
Documentation
Testing
Architecture Notes
Follows the same pattern as Cline/OpenRouter: static API key, single JSON endpoint, no refresh logic. This is the simplest category of provider integration in the existing architecture.