Back to Chatgpt On Wechat

Custom

docs/en/models/custom.mdx

2.0.91.7 KB
Original Source

For model services accessed via the OpenAI-compatible protocol or locally deployed models, such as:

  • Third-party API proxies: call multiple models through a unified API base
  • Local models: models deployed locally with tools like Ollama, vLLM, LocalAI
  • Private deployments: model services deployed inside an enterprise
<Note> Difference from the `openai` vendor: when a custom vendor is selected, switching models via `/config model` does not automatically switch the vendor type — the custom API address is always used. </Note>

Text Chat

Third-party API proxy

json
{
  "bot_type": "custom",
  "model": "",
  "custom_api_key": "YOUR_API_KEY",
  "custom_api_base": "https://{your-proxy.com}/v1"
}
ParameterDescription
bot_typeMust be set to custom
modelModel name; any model name supported by the proxy service
custom_api_keyAPI key provided by the proxy service
custom_api_baseAPI endpoint provided by the proxy service; must be OpenAI-compatible

Local models

Local models usually do not require an API key — only the API base needs to be filled in:

json
{
  "bot_type": "custom",
  "model": "qwen3.5:27b",
  "custom_api_base": "http://localhost:11434/v1"
}

Common local deployment tools and their default endpoints:

ToolDefault API Base
Ollamahttp://localhost:11434/v1
vLLMhttp://localhost:8000/v1
LocalAIhttp://localhost:8080/v1

Switching Models

Switching models under a custom vendor only changes modelbot_type and the API endpoint remain unchanged:

/config model qwen3.5:27b