Skip to content

Commit 3a03119

Browse files
committed
docs: add Bailian (Alibaba Cloud) provider documentation
Add comprehensive provider documentation for Bailian covering: - API key setup guide - Preset model list with capabilities (context, vision, caching, reasoning) - Configuration steps including region selection, workspace ID, and custom models - Supported regions with endpoint routing table - Reasoning capabilities (binary thinking, effort-based, always-on modes) - Automatic prompt caching behavior - Tips and notes for vision models, context window, and region selection
1 parent 4f3581d commit 3a03119

1 file changed

Lines changed: 160 additions & 0 deletions

File tree

docs/bailian-provider-doc.md

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
---
2+
sidebar_label: Bailian (Alibaba Cloud)
3+
description: Configure Alibaba Cloud Bailian (DashScope) models in Zoo Code. Access Qwen, DeepSeek, GLM, Kimi, MiniMax, and MiMo across multiple global regions with reasoning controls and prompt caching.
4+
keywords:
5+
- bailian
6+
- alibaba cloud
7+
- dashscope
8+
- zoo code
9+
- api provider
10+
- qwen
11+
- deepseek
12+
- glm
13+
- kimi
14+
- minimax
15+
- reasoning
16+
- prompt caching
17+
- china ai
18+
---
19+
20+
# Using Bailian (Alibaba Cloud) With Zoo Code
21+
22+
[Bailian](https://modelstudio.alibabacloud.com/) is Alibaba Cloud's AI model platform, providing access to a wide range of large language models through the DashScope API. The platform supports Qwen series, DeepSeek, GLM, Kimi, MiniMax, and MiMo models, with OpenAI-compatible endpoints across multiple global regions.
23+
24+
**Website:** [modelstudio.alibabacloud.com](https://modelstudio.alibabacloud.com/)
25+
26+
---
27+
28+
## Getting an API Key
29+
30+
Refer to the [Bailian API Key documentation](https://www.alibabacloud.com/help/en/model-studio/get-api-key) for instructions on obtaining your DashScope API key.
31+
32+
---
33+
34+
## Available Models
35+
36+
Zoo Code automatically fetches available models from the DashScope API based on your selected region. This ensures you always have access to the latest models, including newly released versioned model IDs.
37+
38+
The following preset models are included:
39+
40+
| Model | Context | Vision | Prompt Caching | Reasoning |
41+
|-------|---------|--------|----------------|-----------|
42+
| `qwen3.7-max` | 1,000,000 | No | Yes | Binary |
43+
| `qwen3.7-plus` | 1,000,000 | Yes | Yes | Binary |
44+
| `qwen3.6-plus` | 1,000,000 | Yes | Yes | Binary |
45+
| `qwen3.6-flash` | 1,000,000 | Yes | Yes | Binary |
46+
| `qwen3.5-plus` | 1,000,000 | Yes | Yes | Binary |
47+
| `qwen3.5-flash` | 1,000,000 | Yes | Yes | Binary |
48+
| `deepseek-v4-pro` | 1,000,000 | No | Yes | Effort-based |
49+
| `deepseek-v4-flash` | 1,000,000 | No | Yes | Effort-based |
50+
| `glm-5.1` | 202,752 | No | Yes | Binary |
51+
| `kimi-k2.6` | 262,144 | No | Yes | Binary |
52+
| `MiniMax-M2.5` | 196,608 | No | No | Always-on |
53+
| `mimo-v2.5-pro` | 1,000,000 | No | No | Binary |
54+
55+
For the complete, up-to-date model list, see the [Bailian Model Documentation](https://www.alibabacloud.com/help/en/model-studio/models).
56+
57+
:::info
58+
When using a custom model or an API-fetched model that isn't in the preset list, Zoo Code applies conservative defaults (200K context, no vision, no caching, temperature supported). You can override these by providing custom model info in the settings panel.
59+
:::
60+
61+
---
62+
63+
## Configuration in Zoo Code
64+
65+
1. **Open Zoo Code Settings:** Click the gear icon (<Codicon name="gear" />) in the Zoo Code panel.
66+
2. **Select Provider:** Choose "Bailian (Alibaba Cloud)" from the "API Provider" dropdown.
67+
3. **Select Region:** Choose your preferred region. See [Available Regions](#available-regions) for details on endpoint locations.
68+
4. **Enter API Key:** Paste your DashScope API key into the "Bailian API Key" field.
69+
5. **(If Required) Enter Workspace ID:** For Frankfurt and Hong Kong regions, enter your workspace ID. Other regions can leave this blank.
70+
6. **Select Model:** Choose your desired model from the "Model" dropdown. Available models are automatically fetched based on your region and API key.
71+
72+
### Reasoning Settings
73+
74+
For models that support reasoning (Qwen, DeepSeek V4, GLM, Kimi, MiMo), you can configure:
75+
76+
* **Reasoning Effort:** Toggle to enable or disable the thinking/reasoning phase. See [Reasoning Capabilities](#reasoning-capabilities) for model-specific behavior.
77+
* **Reasoning Effort Level:** For DeepSeek V4, select Low/Medium/High (`high`) or X-High (`max`).
78+
* **Max Thinking Tokens:** Set a budget cap for the thinking phase. When set, the model will not exceed this token limit during reasoning.
79+
80+
### Custom Model Configuration
81+
82+
If you're using a model that isn't auto-detected, or want to override the preset capabilities:
83+
84+
1. Check **Use custom model info** in settings.
85+
2. Configure the context window, max output tokens, image support, and pricing manually.
86+
87+
---
88+
89+
## Available Regions
90+
91+
Bailian supports multiple regions worldwide. Select your preferred region in the Zoo Code settings panel — the API endpoint will be routed automatically.
92+
93+
| Region | Endpoint | Workspace ID |
94+
|--------|----------|:------------:|
95+
| Beijing | `dashscope.aliyuncs.com` | No |
96+
| Singapore | `dashscope-intl.aliyuncs.com` | No |
97+
| Virginia | `dashscope-us.aliyuncs.com` | No |
98+
| Frankfurt | `<workspaceId>.eu-central-1.maas.aliyuncs.com` | **Yes** |
99+
| Hong Kong | `<workspaceId>.cn-hongkong.maas.aliyuncs.com` | **Yes** |
100+
| Coding Plan (CN) | `coding.dashscope.aliyuncs.com` | No |
101+
| Token Plan (CN) | `token-plan.cn-beijing.maas.aliyuncs.com` | No |
102+
| Token Plan (SG) | `token-plan.ap-southeast-1.maas.aliyuncs.com` | No |
103+
104+
Pricing varies by region. For the complete list of supported regions and guidance on choosing the right one, see the [Bailian Regions documentation](https://www.alibabacloud.com/help/en/model-studio/regions/) and [Bailian Pricing page](https://www.alibabacloud.com/help/en/model-studio/model-pricing).
105+
106+
---
107+
108+
## Reasoning Capabilities
109+
110+
Bailian models support three distinct reasoning modes. Zoo Code automatically detects the correct mode for your selected model.
111+
112+
### Binary Thinking (Qwen, GLM, Kimi, MiMo)
113+
114+
These models use `enable_thinking` to toggle an internal reasoning phase before generating the final response.
115+
116+
* Toggle **Reasoning Effort** on/off in the settings panel.
117+
* Optionally set a **Max Thinking Tokens** budget to cap thinking phase token usage.
118+
* Thinking is **enabled by default** for these models — the thinking phase improves answer quality for complex tasks.
119+
120+
### Effort-Based Reasoning (DeepSeek V4)
121+
122+
DeepSeek V4 supports graded reasoning depth via `reasoning_effort`:
123+
124+
| Zoo Code Setting | API Value | Behavior |
125+
|-----------------|-----------|----------|
126+
| Off | *(not sent)* | No thinking phase |
127+
| Low / Medium / High | `high` | Standard reasoning depth |
128+
| X-High | `max` | Maximum reasoning depth |
129+
130+
:::warning
131+
When reasoning is explicitly disabled for DeepSeek V4, `enable_thinking: false` is sent to the API. This is required because DeepSeek V4 defaults to thinking ON — simply omitting the parameter would leave thinking enabled.
132+
:::
133+
134+
### Always-On Thinking (MiniMax M2.5)
135+
136+
MiniMax M2.5 always performs a thinking phase and does not accept an `enable_thinking` toggle. The Reasoning Effort setting has no effect when using this model.
137+
138+
---
139+
140+
## Prompt Caching
141+
142+
Zoo Code automatically enables prompt caching for supported Bailian models (`qwen3.*`, `deepseek-v4-*`, `glm-5.1`, `kimi-k2.6`). Prompt caching reduces costs and latency by reusing previously processed content.
143+
144+
Cache markers are automatically applied to:
145+
146+
* The system prompt
147+
* The last two user messages
148+
149+
:::info
150+
Prompt caching requires no additional configuration — it is applied automatically whenever the selected model supports it.
151+
:::
152+
153+
---
154+
155+
## Tips and Notes
156+
157+
* **Vision Models:** Models with vision support (`qwen3.7-plus`, `qwen3.6-plus`, `qwen3.6-flash`, `qwen3.5-plus`, `qwen3.5-flash`) can process images attached to your messages. Use the image upload feature in Zoo Code to include images in your prompts.
158+
* **Context Window:** Most models support up to 1 million tokens of context. Note that the thinking phase also consumes context tokens — plan your prompts accordingly when reasoning is enabled.
159+
* **Custom Models:** If the model you want isn't auto-detected, enable the custom model option and configure the context window and capabilities manually.
160+
* **Region Selection:** Pricing varies by region. Choose a region based on your location and applicable local laws and regulations. Refer to the [Bailian Regions documentation](https://www.alibabacloud.com/help/en/model-studio/regions/) and [Bailian Pricing page](https://www.alibabacloud.com/help/en/model-studio/model-pricing) for details.

0 commit comments

Comments
 (0)