#How to pass extra_body in vercel ai sdk, i am running vllm?

1 messages · Page 1 of 1 (latest)

hallow jewel
#
response = await client.chat.completions.create(
            messages=[
                {"role": "user", "content": "tell me a story in 5 line"}
            ],
            model="Qwen/Qwen3-8B",
            extra_body={
                "chat_template_kwargs": {"enable_thinking": False}
            }
        )
mild oxideBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

rain ridge
#

providerOptions

hallow jewel
rain ridge
#

most likely yes

#

but the code you pasted in your 1st message looks like python and not ai sdk

hallow jewel
#

its running fine with openai library in python

rain ridge
#

in that case, you should use createOpenAICompatible