feat: add Chinese mainland LLM providers (DeepSeek, GLM, Kimi, Qwen)#154
Merged
asdek merged 1 commit intovxcontrol:feature/next_releasefrom Mar 4, 2026
Merged
Conversation
- Add DeepSeek, GLM (智谱), Kimi (月之暗面), Qwen (通义千问) provider implementations - Add DB migration for new PROVIDER_TYPE enum values - Register new providers in config, providers controller, and type constants Bug fixes: - fix(server/models): add deepseek/glm/kimi/qwen to ProviderType.Valid() whitelist - fix(gqlgen): regenerate models_gen.go so IsValid() includes new enum values - fix(frontend): add deepseek/glm/kimi/qwen fields to settingsProviders query (enabled/default/models blocks) so form loads correct default agent configs - fix(providers): add explicit API key validation with clear error messages instead of misleading "missing OpenAI API key" from langchaingo fallback - fix(docker-compose): declare DEEPSEEK/GLM/KIMI/QWEN API key and server URL env vars so they are actually injected into the container - docs: add CLAUDE.md with architecture guide and new provider checklist Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5bfe2a0 to
539f6c2
Compare
Contributor
|
hey @niuqun2003 thank you for the PR! |
30 tasks
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 integrates four popular Chinese mainland LLM providers into PentAGI, making the platform more accessible to users in China who rely on domestically available AI services.
New Providers
https://api.deepseek.com/v1https://open.bigmodel.cn/api/paas/v4https://api.moonshot.cn/v1https://dashscope.aliyuncs.com/compatible-mode/v1All four providers use the OpenAI-compatible API format and are implemented following the same pattern as the existing
customprovider.Changes
Backend
backend/pkg/providers/deepseek/— DeepSeek provider implementationbackend/pkg/providers/glm/— GLM provider implementationbackend/pkg/providers/kimi/— Kimi provider implementationbackend/pkg/providers/qwen/— Qwen provider implementationbackend/pkg/providers/provider/provider.go— register newProviderType/ProviderNameconstantsbackend/pkg/providers/providers.go— register providers in controllerbackend/pkg/config/config.go— add env vars:DEEPSEEK_API_KEY,GLM_API_KEY,KIMI_API_KEY,QWEN_API_KEY(+*_SERVER_URLoverrides)backend/pkg/server/models/providers.go— add new types toProviderType.Valid()whitelistbackend/pkg/graph/schema.graphqls— add new types toProviderTypeenum and config fieldsbackend/pkg/graph/model/models_gen.go— regenerated via gqlgenbackend/migrations/sql/20260227_120000_add_cn_providers.sql— add new enum values toPROVIDER_TYPEFrontend
frontend/src/components/icons/deepseek.tsx— DeepSeek iconfrontend/src/components/icons/glm.tsx— GLM iconfrontend/src/components/icons/kimi.tsx— Kimi iconfrontend/src/components/icons/qwen.tsx— Qwen iconfrontend/src/components/icons/provider-icon.tsx— register new iconsfrontend/graphql-schema.graphql— add new provider fields tosettingsProvidersqueryfrontend/src/graphql/types.ts— regenerated via graphql-codegenfrontend/src/pages/settings/settings-providers.tsx— UI support for new provider typesDocker
docker-compose.yml— expose new env vars to containerConfiguration
To enable a provider, set the corresponding environment variable in
.env:Test Plan
🤖 Generated with Claude Code