[PR #6762] feat: Add 'extra_body' parameter support for provider and model options #12093

Closed
opened 2026-02-16 18:17:01 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6762

State: closed
Merged: No


In the OpenAI Python SDK, the Completions.create method includes an extra_body parameter that lets users add custom JSON properties to the request payload. This feature is particularly useful in various scenarios—such as enabling capabilities like thinking [1][2], search, topP, temperature, and more, across different LLM providers.

Here[3] is the implementation in the Python SDK for reference.

[1] https://bailian.console.alibabacloud.com/?tab=api#/api/?type=model&url=2712576
[2] https://docs.z.ai/api-reference/llm/chat-completion
[3] https://github.com/openai/openai-python/blob/af8f606b3eef1af99f98929847f1b5baf19171ae/src/openai/resources/chat/completions.py#L76

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6762 **State:** closed **Merged:** No --- In the OpenAI Python SDK, the `Completions.create` method includes an `extra_body` parameter that lets users add custom JSON properties to the request payload. This feature is particularly useful in various scenarios—such as enabling capabilities like thinking [1][2], search, topP, temperature, and more, across different LLM providers. Here[3] is the implementation in the Python SDK for reference. [1] https://bailian.console.alibabacloud.com/?tab=api#/api/?type=model&url=2712576 [2] https://docs.z.ai/api-reference/llm/chat-completion [3] https://github.com/openai/openai-python/blob/af8f606b3eef1af99f98929847f1b5baf19171ae/src/openai/resources/chat/completions.py#L76
yindo added the pull-request label 2026-02-16 18:17:01 -05:00
yindo closed this issue 2026-02-16 18:17:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12093