> For the complete documentation index, see [llms.txt](https://docs.cherryai.com.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cherryai.com.cn/docs/zhong-wen-fan-ti/pre-basic/providers/zi-ding-yi-fu-wu-shang.md).

# 自定義服務商

Cherry Studio 不僅整合咗主流嘅 AI 模型服務，仲俾你強大嘅自訂能力。透過 **自訂 AI 服務商** 功能，你就可以輕鬆接入任何你需要嘅 AI 模型。

## 點解需要自訂 AI 服務商？

* **靈活性：** 唔再受限於預置嘅服務商列表，自由揀最適合你需求嘅 AI 模型。
* **多樣性：** 試吓唔同平台嘅 AI 模型，發掘佢哋獨特嘅優勢。
* **可控性：** 直接管理你嘅 API 密鑰同存取地址，確保安全同私隱。
* **度身訂造：** 接入私有化部署嘅模型，滿足特定業務場景嘅需求。

## 點樣添加自訂 AI 服務商？

淨係幾個簡單步驟，就可以喺 Cherry Studio 入面添加你嘅自訂 AI 服務商：

<figure><img src="https://2742912793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Ut5BptC3t8CtSU1UWpM%2Fuploads%2Fgit-blob-59715a41e2aaaa0ba901caa7cc06b2b7953174a5%2Fimage%20(2)%20(5).png?alt=media" alt=""><figcaption></figcaption></figure>

1. **打開設定：** 喺 Cherry Studio 界面左側導覽欄入面，撳「設定」（齒輪圖示）。
2. **進入模型服務：** 喺設定頁面入面，揀「模型服務」分頁。
3. **添加供應商：** 喺「模型服務」頁面入面，你會見到已有嘅服務商列表。撳列表下方嘅「+ 添加服務商」按鈕，打開「添加自訂供應商」彈窗。
4. **填寫資料：** 喺彈窗入面，你需要填寫以下資料：
   * **供應商名稱：** 幫你嘅自訂服務商起個容易識認嘅名稱（例如：MyCustomOpenAI）。
   * **API 密鑰** 你從你嘅服務商攞到嘅 API 密鑰。
   * **端點設定** 預設可以添加 **OpenAI** 同 **Anthdropic** 端點。你亦可以撳「更多設定」，嚟添加 **OpenAl Responses**、**Gemini**、**圖像生成 Base URL** 同 **圖像編輯 Base URL**。Cherry Studio 會向端點發送請求。

{% hint style="warning" %}
一定要參考你嘅 AI 服務商提供嘅官方文件，攞正確嘅 API 端點同密鑰。
{% endhint %}

{% hint style="info" %}
你亦可以喺「更多設定」入面，揀從預設建立，適用於 Coding Plan 接入、多個帳號管理或者項目隔離；端點同 API Key 可以獨立配置。
{% endhint %}

6. **儲存配置：** 填完之後，撳「添加」按鈕儲存你嘅配置。

## 配置自訂 AI 服務商

<figure><img src="https://2742912793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Ut5BptC3t8CtSU1UWpM%2Fuploads%2Fgit-blob-23e8cbe38cfef9a8b85f0ddf32e10dd7116b37a4%2Fimage%20(3)%20(5)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

添加完成之後，你需要喺列表入面搵返你頭先添加嘅服務商，然後進行詳細配置：

1. **啟用狀態** 喺自訂服務商列表入面，已啟用嘅自訂服務商右邊會顯示一個綠色圓點。你可以喺服務商頁面右上角開啟或者關閉呢個服務商。
2. **模型管理：**

   * 撳「獲取模型列表」按鈕，Cherry Studio 會嘗試從你嘅服務商攞模型列表，攞成功之後可以添加同刪除模型。
   * 撳「+」按鈕，手動添加呢個供應商底下你想用嘅模型 ID。例如 `gpt-5.6-sol`、`gemini-3.7-flash` 等等。

   <figure><img src="https://2742912793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Ut5BptC3t8CtSU1UWpM%2Fuploads%2Fgit-blob-d6612da0f778f8429d084c238e9952b03d02976e%2Fimage%20(4)%20(5).png?alt=media" alt=""><figcaption></figcaption></figure>

   * 如果你唔確定具體嘅模型名稱，請參考你嘅 AI 服務商提供嘅官方文件。
   * 你可以撳模型右邊嘅「-」嚟刪除模型，撳設定按鈕嚟編輯模型嘅名稱、類型、價格等資料。

## 開始使用

完成以上配置之後，你就可以喺 Cherry Studio 嘅聊天界面入面，揀你自訂嘅 AI 服務商同模型，開始同 AI 對話喇！

## 用 vLLM 作為自訂 AI 服務商

vLLM 係一個類似 Ollama 嘅快速同易用嘅 LLM 推理庫。以下係點樣將 vLLM 整合到 Cherry Studio 入面嘅步驟：

1. **安裝 vLLM：** 按照 vLLM 官方文件（<https://docs.vllm.ai/en/latest/getting_started/quickstart.html>）安裝 vLLM。

   ```sh
   pip install vllm # 如果你使用 pip
   uv pip install vllm # 如果你使用 uv
   ```
2. **啟動 vLLM 服務：** 使用 vLLM 提供嘅 OpenAI 相容介面啟動服務。主要有兩種方式，分別如下：

   * 使用 `vllm.entrypoints.openai.api_server` 啟動

   ```sh
   python -m vllm.entrypoints.openai.api_server --model gpt2
   ```

   * 使用 `uvicorn` 啟動

   ```sh
   vllm --model gpt2 --served-model-name gpt2
   ```

確保服務成功啟動，並監聽喺預設端口 `8000` 上。當然，你亦可以透過參數 `--port` 指定 vLLM 服務嘅端口號。

3. **喺 Cherry Studio 入面添加 vLLM 服務商：**
   * 按照前面講嘅步驟，喺 Cherry Studio 入面添加一個新嘅自訂 AI 服務商。
   * **供應商名稱：** `vLLM`
   * **供應商類型：** 揀 `OpenAI`。
4. **配置 vLLM 服務商：**
   * **API 密鑰：** 因為 vLLM 唔需要 API 密鑰，可以將呢個欄位留空，或者填任何內容。
   * **API 地址：** 填寫 vLLM 服務嘅 API 地址。預設情況下，地址係： `http://localhost:8000/`（如果你用咗唔同嘅端口，請相應修改）。
   * **模型管理：** 添加你喺 vLLM 入面載入嘅模型名稱。喺上面運行 `python -m vllm.entrypoints.openai.api_server --model gpt2` 嘅例子入面，呢度應該填入 `gpt2`
5. **開始對話：** 而家，你可以喺 Cherry Studio 入面揀 vLLM 服務商同 `gpt2` 模型，開始同 vLLM 驅動嘅 LLM 對話喇！

## 提示同技巧

* **仔細閱讀文件：** 喺添加自訂服務商之前，請一定要仔細閱讀你所使用嘅 AI 服務商官方文件，了解 API 密鑰、存取地址、模型名稱等關鍵資料。
* **檢查 API 密鑰：** 使用「檢查」按鈕可以快速驗證 API 密鑰嘅有效性，避免因密鑰錯誤導致用唔到。
* **留意 API 地址：** 唔同嘅 AI 服務商同模型，API 地址可能會唔同，請一定要填正確嘅地址。
* **模型按需要添加:** 請只添加你實際會用到嘅模型，避免添加太多冇用模型.

***

### 獲取幫助同提交反饋

如果你喺配置或者使用過程中遇到任何疑問、Bug 或者有功能改善建議，請參考 [反饋與建議](/docs/zhong-wen-fan-ti/question-contact/suggestions.md) 入面提供嘅官方渠道。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cherryai.com.cn/docs/zhong-wen-fan-ti/pre-basic/providers/zi-ding-yi-fu-wu-shang.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
