Skip to content

feat: add Astraflow provider support#2

Open
ucloudnb666 wants to merge 1 commit into
DestinyLinker:mainfrom
ucloudnb666:feat/astraflow-1778749913
Open

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

Conversation

@ucloudnb666

Copy link
Copy Markdown

Summary

Adds Astraflow (by UCloud / 优刻得) as a native provider in MingLi-Bench.

Astraflow is an OpenAI-compatible AI model aggregation platform supporting 200+ models, available via both a global endpoint and a China endpoint.

Changes

File Change
mingli_bench/models/astraflow_client.py New OpenAI-compatible client (mirrors DeepSeek pattern); includes both AstraflowClient (global) and AstraflowCNClient (China)
mingli_bench/models/factory.py Register both providers, SDK install hint, astraflow-* model prefix detection, example model list
mingli_bench/utils/config.py Add astraflow + astraflow_cn config blocks reading from env vars
.env.example Document ASTRAFLOW_API_KEY / ASTRAFLOW_CN_API_KEY env vars

Usage

from mingli_bench.models.factory import ModelFactory

# Global endpoint (ASTRAFLOW_API_KEY)
client = ModelFactory.create("astraflow-deepseek-ai/DeepSeek-R1", provider="astraflow")

# China endpoint (ASTRAFLOW_CN_API_KEY)
client = ModelFactory.create("astraflow-deepseek-ai/DeepSeek-R1", provider="astraflow_cn")

Because the API is fully OpenAI-compatible, no new SDK is required — the existing openai package is reused.

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