Skip to content

Add Qiniu Cloud (七牛云) as a built-in model provider#331

Open
HannahKking wants to merge 1 commit into
plandex-ai:mainfrom
HannahKking:add-qiniu-provider
Open

Add Qiniu Cloud (七牛云) as a built-in model provider#331
HannahKking wants to merge 1 commit into
plandex-ai:mainfrom
HannahKking:add-qiniu-provider

Conversation

@HannahKking

Copy link
Copy Markdown

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/v1 with access to 50+ mainstream large models, making it straightforward to integrate as a native Plandex provider.

Changes

  • app/shared/ai_models_providers.go

    • Add ModelProviderQiniu constant ("qiniu")
    • Add QiniuApiKeyEnvVar constant ("QINIU_API_KEY")
    • Register ModelProviderQiniu in AllModelProviders
    • Add provider config in BuiltInModelProviderConfigs with base URL https://api.qnaigc.com/v1
  • app/shared/ai_models_available.go

    • Add Qiniu as an additional provider for deepseek/v3 (model ID: deepseek-v3) and deepseek/r1 (model ID: deepseek-r1)
    • Add qiniu/kimi-k2 model — Moonshot AI Kimi K2.5, 256K context window
    • Add qiniu/glm-5 model — Zhipu AI GLM-5, 128K context window

Setup

Users need to set one environment variable:

export QINIU_API_KEY=<your_api_key>

API keys can be obtained at https://portal.qiniu.com/ai-inference/api-key. New users receive 3 million free tokens.

No client.go changes needed

Qiniu's API is fully OpenAI-compatible, so the existing newClient() generic path handles it without any provider-specific logic.

References

Test plan

  • Set QINIU_API_KEY and verify Qiniu provider appears in plandex models available
  • Test deepseek/v3 via Qiniu provider
  • Test deepseek/r1 via Qiniu provider
  • Test qiniu/kimi-k2 model
  • Test qiniu/glm-5 model

🤖 Generated with Claude Code

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>
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