Skip to content

Commit bdf4acc

Browse files
authored
Merge pull request #24468 from BerriAI/litellm_opencode-drop-reasoningSummary-docs
docs(opencode): add guidance for dropping reasoningSummary param
2 parents df2a36d + 80af635 commit bdf4acc

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

docs/my-website/docs/tutorials/opencode_integration.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ model_list:
253253
litellm_params:
254254
model: openai/gpt-4
255255
api_key: os.environ/OPENAI_API_KEY
256-
256+
257257
- model_name: gpt-4o
258258
litellm_params:
259259
model: openai/gpt-4o
@@ -264,14 +264,27 @@ model_list:
264264
litellm_params:
265265
model: anthropic/claude-3-5-sonnet-20241022
266266
api_key: os.environ/ANTHROPIC_API_KEY
267-
267+
268268
# DeepSeek models
269269
- model_name: deepseek-chat
270270
litellm_params:
271271
model: deepseek/deepseek-chat
272272
api_key: os.environ/DEEPSEEK_API_KEY
273273
```
274274
275+
### Dropping OpenCode-specific parameters
276+
277+
OpenCode sends a `reasoningSummary` parameter with reasoning-capable models such as `gpt-5`. This parameter is not supported by the Chat Completions API and will cause errors. Add `additional_drop_params` to every model entry in your `model_list` that will receive requests from OpenCode with reasoning enabled:
278+
279+
```yaml
280+
model_list:
281+
- model_name: gpt-5
282+
litellm_params:
283+
model: openai/gpt-5
284+
api_key: os.environ/OPENAI_API_KEY
285+
additional_drop_params: ["reasoningSummary"]
286+
```
287+
275288
## Troubleshooting
276289

277290
**OpenCode not connecting:**
@@ -294,6 +307,16 @@ model_list:
294307
- Validate JSON syntax using a JSON validator
295308
- Ensure the `$schema` URL is accessible
296309

310+
**`Unknown parameter: 'reasoningSummary'` error:**
311+
- OpenCode sends a `reasoningSummary` parameter that is not supported by the Chat Completions API. Add `additional_drop_params: ["reasoningSummary"]` to each affected model entry in your `litellm_params`:
312+
```yaml
313+
- model_name: gpt-5
314+
litellm_params:
315+
model: openai/gpt-5
316+
api_key: os.environ/OPENAI_API_KEY
317+
additional_drop_params: ["reasoningSummary"]
318+
```
319+
297320
## Tips
298321

299322
- Add more models to the config as needed - they'll appear in `/models`

0 commit comments

Comments
 (0)