Skip to content

feat: add Astraflow provider support#2

Open
ucloudnb666 wants to merge 1 commit into
qjp88995:mainfrom
ucloudnb666:feat/astraflow-1779365721
Open

feat: add Astraflow provider support#2
ucloudnb666 wants to merge 1 commit into
qjp88995:mainfrom
ucloudnb666:feat/astraflow-1779365721

Conversation

@ucloudnb666

Copy link
Copy Markdown

Summary

Adds Astraflow (by UCloud / 优刻得) as a supported AI provider with both the global and China region endpoints.

Astraflow is an OpenAI-compatible model aggregation platform supporting 200+ models. Because it is OpenAI-compatible, integration reuses the existing createOpenAI SDK path — no new dependencies are required.

What was changed

File Change
packages/shared/src/types/provider.ts Added ASTRAFLOW and ASTRAFLOW_CN to the ProviderProtocol const/type
packages/server/src/common/ai-provider.util.ts Added default model IDs, createLanguageModel cases, and resolveModels cases for both protocols
packages/web/src/lib/provider-constants.ts Added default base URLs, PROTOCOL_OPTIONS entries, and PROTOCOL_CONFIG badge styles
packages/web/src/locales/en.json Added English i18n strings
packages/web/src/locales/zh.json Added Chinese i18n strings

Provider details

Global China
Protocol key ASTRAFLOW ASTRAFLOW_CN
Base URL https://api-us-ca.umodelverse.ai/v1 https://api.modelverse.cn/v1
Website https://astraflow.ucloud-global.com https://astraflow.ucloud.cn
SDK @ai-sdk/openai (reused) @ai-sdk/openai (reused)

No breaking changes

All existing protocols are unaffected. The new protocols follow the exact same patterns as DEEPSEEK, ZHIPU, and MOONSHOT.

Signed-off-by: ucloudnb666 <ucloudnb666@users.noreply.github.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