•   8 months ago

Tool calling not working with gpt-oss:20b + vLLM on an A100 GPU

Hello, I am testing gpt-oss:20b with vLLM on an A100 GPU, I followed these instructions: https://cookbook.openai.com/articles/gpt-oss/run-vllm.
The documentation states "Function calling works through both the Responses and Chat Completions APIs" and provides this example:
```
tools = [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather in a given city",
"parameters": {
"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"]
},
},
}]

response = client.chat.completions.create(
model="openai/gpt-oss-20b",
messages=[{"role": "user", "content": "What's the weather in Berlin right now?"}],
tools=tools
)
```
However, this doesn't work. The model returns tool_calls=[] (empty) and refuses to call the function, instead saying it doesn't have access to weather data. The responses API also fails with "tool type custom not supported" errors.
Is custom function calling actually supported? Looking forward to your guidance, thank you.

  • 1 comment

  • Manager   •   8 months ago

    Hi Adam,

    Thanks for pointing this out and apologies for the delay. I've asked the OpenAI team and they said this is a good call out. Chat Completions is currently actually not supporting function calling in vLLM. The team is working on it. You'd have to use Responses instead. Good luck!

Comments are closed.