docs(config): document provider extra body

Show how to configure OpenAI-compatible request body extensions such as sampling and chat template parameters.

Made-with: Cursor
This commit is contained in:
Xubin Ren 2026-04-28 07:37:58 +00:00 committed by Xubin Ren
parent 415e617398
commit 278ef22776

View File

@ -208,6 +208,25 @@ Connects directly to any OpenAI-compatible endpoint — llama.cpp, Together AI,
>
> In short: **chat-completions-compatible endpoint → `custom`**; **Responses-compatible endpoint → `azure_openai`**.
Some OpenAI-compatible gateways expose request-body extensions such as vLLM guided decoding or local sampling controls. Put those under `extraBody`; nanobot merges them into the chat-completions request body after its provider defaults:
```json
{
"providers": {
"custom": {
"apiKey": "your-api-key",
"apiBase": "https://api.your-provider.com/v1",
"extraBody": {
"repetition_penalty": 1.15,
"chat_template_kwargs": {
"enable_thinking": false
}
}
}
}
}
```
</details>
<details>