Add Qiniu Cloud (七牛云) as a built-in model provider#331
Open
HannahKking wants to merge 1 commit into
Open
Conversation
Qiniu Cloud's AI Inference Hub (api.qnaigc.com) provides OpenAI-compatible access to 50+ models including DeepSeek V3, DeepSeek R1, Kimi K2, and GLM-5. Changes: - Add ModelProviderQiniu constant and QiniuApiKeyEnvVar (QINIU_API_KEY) - Register Qiniu provider config with base URL https://api.qnaigc.com/v1 - Add Qiniu as an additional provider for deepseek/v3 and deepseek/r1 models - Add qiniu/kimi-k2 model (moonshotai/kimi-k2.5, 256K context) - Add qiniu/glm-5 model (z-ai/glm-5, 128K context) Docs: https://developer.qiniu.com/aitokenapi Co-Authored-By: Claude <noreply@anthropic.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.
Summary
This PR adds Qiniu Cloud AI Inference Hub (七牛云) as a built-in model provider.
Qiniu Cloud provides an OpenAI-compatible API at
https://api.qnaigc.com/v1with access to 50+ mainstream large models, making it straightforward to integrate as a native Plandex provider.Changes
app/shared/ai_models_providers.goModelProviderQiniuconstant ("qiniu")QiniuApiKeyEnvVarconstant ("QINIU_API_KEY")ModelProviderQiniuinAllModelProvidersBuiltInModelProviderConfigswith base URLhttps://api.qnaigc.com/v1app/shared/ai_models_available.godeepseek/v3(model ID:deepseek-v3) anddeepseek/r1(model ID:deepseek-r1)qiniu/kimi-k2model — Moonshot AI Kimi K2.5, 256K context windowqiniu/glm-5model — Zhipu AI GLM-5, 128K context windowSetup
Users need to set one environment variable:
API keys can be obtained at https://portal.qiniu.com/ai-inference/api-key. New users receive 3 million free tokens.
No
client.gochanges neededQiniu's API is fully OpenAI-compatible, so the existing
newClient()generic path handles it without any provider-specific logic.References
/v1/modelsfor full list)Test plan
QINIU_API_KEYand verify Qiniu provider appears inplandex models availabledeepseek/v3via Qiniu providerdeepseek/r1via Qiniu providerqiniu/kimi-k2modelqiniu/glm-5model🤖 Generated with Claude Code