Skip to content

Add extra_body to OpenAI client chat request #1436

@rickif

Description

@rickif

Hi, would it be possible to add an extra_body parameter to the OpenAI client's chat completion request, similar to the official Python client?

This would allow passing custom parameters (e.g., beta features) directly to the OpenAI API, improving flexibility without requiring library updates for every new parameter.

ExtraBody: map[string]interface{}{
    "parallel_tool_claims": false,
}

This keeps the client future-proof. Open to feedback and happy to contribute if this is acceptable. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions