Skip to content

Commit dfd2628

Browse files
authored
Merge pull request #46 from Zoo-Code-Org/docs/openai-extra-body-0ckxn8ezfej92
[Docs] Explain OpenAI-compatible custom request fields
2 parents bb7bd7d + a4be5bd commit dfd2628

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

‎docs/providers/openai-compatible.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ You'll find these settings in the Zoo Code settings panel (click the <Codicon na
3838
* **Base URL:** Enter the base URL provided by your chosen provider. **This is crucial.**
3939
* **API Key:** Enter your API key.
4040
* **Model:** Choose a model.
41+
* **Extra Body:** Optionally add provider-specific JSON fields to each request body.
4142
* **Model Configuration:** This lets you customize advanced configuration for the model
4243
- Max Output Tokens
4344
- Context Window
@@ -48,6 +49,28 @@ You'll find these settings in the Zoo Code settings panel (click the <Codicon na
4849

4950
---
5051

52+
## Provider-Specific Request Fields
53+
54+
Some OpenAI-compatible providers support request-body fields that are not part of Zoo Code's standard model settings. Enter these fields as a JSON object in **Extra Body**.
55+
56+
For example, Sail Research uses `metadata.completion_window` to select a completion tier:
57+
58+
<img src="/img/openai-compatible/extra-body.png" alt="OpenAI Compatible Extra Body setting containing Sail Research completion window metadata" width="480" />
59+
60+
```json
61+
{
62+
"metadata": {
63+
"completion_window": "balanced"
64+
}
65+
}
66+
```
67+
68+
Zoo Code validates the JSON before saving the provider profile and adds the fields to streaming, non-streaming, and single-completion requests. The top-level value must be an object.
69+
70+
Extra Body cannot override fields managed by Zoo Code, including the model, messages, streaming mode, tools, reasoning settings, response format, temperature, and token limits. Configure those values through Zoo Code's normal controls where available. Do not put API keys or other secrets in Extra Body because provider profiles can be exported.
71+
72+
---
73+
5174
## Native Tool Calling
5275

5376
Zoo Code uses **native tool calling** exclusively. This is the only supported tool protocol -- there is no XML-based fallback.
74.8 KB
Loading

0 commit comments

Comments
 (0)