#1035·go-openai

Functional requirements for ExtraBody field support [The local code already supports it. If the author intends to support this field, I can provide a PR]

Author: huangjc7Created Jul 11, 2025Updated Jul 11, 2025
Labelsenhancement

I am using the qwen model. ExtraBody is required to enable some specific functional fields. Initially, I filled in the parameters through the ChatTemplateKwargs field, or changed the struct tag to extra_body. The request parameter is extra_body={"enable_thinking": True}, and the final request body should be "extra_body": { "enable_thinking": true }

But the reasoning function cannot be enabled. By looking at the Python code of openai, I found that {"messages":[{"role":"user","content":"hello"}],"model":"qwen-plus","stream":true,"stream_options":{"include_usue},"enable_thinking":true"} needs to be flattened to the root position to take effect, instead of being included in extra_body, so I implemented this function. I don't know if the author has plans to support this function. If there is a plan, I can provide PR, thank you.