Repository navigation
feat: add PowerTokens provider - #655
Open
PowerTokens wants to merge 1 commit into
Open
PowerTokens wants to merge 1 commit into
PowerTokens wants to merge 1 commit into
Conversation
Signed-off-by: uselesssoso <210961205+uselesssoso@users.noreply.github.com>
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.
What
Adds PowerTokens as an inference provider. I'm on the PowerTokens team.
PowerTokens is an OpenAI-compatible gateway for China-origin models (GLM, MiniMax, Qwen, DeepSeek). It is aimed at developers outside China. One API key works for every model.
https://api.powertokens.ai/v1$POWERTOKENS_API_KEYopenai-compatglm-5.2, smallglm-5-turboglm-5.2,glm-5.3,glm-5-turbo,glm-4.7,MiniMax-M3,MiniMax-M2.7,qwen3-coder-plus,deepseek-v3-2-251201Follows the existing pattern
internal/providers/configs/powertokens.jsonmirrors the otheropenai-compatconfigs.//go:embed+powerTokensProvider()+providerRegistryentry ininternal/providers/providers.go.InferenceProviderPowerTokensconstant, also added toKnownProviders()inpkg/catwalk/provider.go.Verified
go buildwas not re-run after the rebase onto currentmaingo test ./pkg/catwalk/ ./internal/providers/passed (internal/providersok)https://api.powertokens.ai/v1/chat/completionswith modeldeepseek-v3-2-251201(the lowest listed per-token price in this file),max_tokens16, user message "Reply with the single word hi". HTTP 200, returned modeldeepseek-v3-2-251201,finish_reasonstop, contenthi, usage prompt_tokens 10 / completion_tokens 1. This was the OpenAI-compatible request the config points at, not a Crush TUI session.Sources
Happy to keep this file up to date when models or prices change. Contact: service@powertokens.ai