-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
Description
Expected Behavior
I noticed that the chat.completions.create method in version 1.82.1 of the Python OpenAI package includes support for extra_headers, extra_query, and extra_body.
completion = client.chat.completions.create(
model="qwen-plus-2025-04-28",
messages=messages,
extra_headers={
"Authorization": f"Bearer {os.getenv('DASHSCOPE_API_KEY')}"
},
extra_body={"enable_thinking": True},
stream=True
)
In OpenAiChatOptions, we already have the httpHeaders parameter which can serve as an alternative to extra_headers. However, there are no corresponding alternatives for extra_query and extra_body.
Will Spring AI support these two parameters? Doing so might avoid the need for a lot of model-specific implementations.
Context
https://pypi.org/project/openai/
781574155, asaikali, tong1132, tomivirkki and marcushellberg