{
"agents": {
"defaults": {
"model": {
"primary": "DMC-claude/your-claude-model-id"
}
}
},
"models": {
"mode": "merge",
"providers": {
"DMC-openai": {
"baseUrl": "https://dmc.cc/v1",
"apiKey": "${DMC_KEY}",
"api": "openai-completions",
"models": [{ "id": "your-chat-model-id", "name": "OpenAI-compatible text model" }]
},
"DMC-openai-responses": {
"baseUrl": "https://dmc.cc/v1",
"apiKey": "${DMC_KEY}",
"api": "openai-responses",
"models": [{ "id": "your-responses-model-id", "name": "Responses API model" }]
},
"DMC-claude": {
"baseUrl": "https://dmc.cc/v1",
"apiKey": "${DMC_KEY}",
"api": "anthropic-messages",
"models": [{ "id": "your-claude-model-id", "name": "Claude family model" }]
},
你可以只保留需要的 providers,或保留全部四个,并使用 `provider/model` 引用在不同格式间切换路由。
将每个 `your-...-model-id` 占位符替换为来自 [DMC Models page](https:
<Note>
对于需要 OpenAI Responses API 的模型,请使用 `DMC-openai-responses`(`api: "openai-responses"`)。对于使用传统聊天补全路径的模型,请使用 `DMC-openai`(`api: "openai-completions"`)。两者共用相同的 `baseUrl`(`https:
</Note>
<Note>
此配置 **不需要** `auth-profiles.json` 文件。Provider keys 会通过 `${DMC_KEY}` 环境变量从 `models.providers.*.apiKey` 解析。只有当你想要在多个密钥之间进行每个 profile 的凭证轮换时,才需要 `auth-profiles.json`。
</Note>
</Step>
</Steps>
## 验证
<Steps>
<Step title="重启并验证">
在加入 `.env` 或更改 provider 配置后,重启 gateway:
```bash theme={null}
openclaw gateway restart