Inference APIs
Reference/Trackers

Tool calling, JSON output and thinking control by model

Model cards say "supports function calling". Whether a particular host's deployment does, with streaming, with tool_choice, on the second turn, is a different question, and it is the one that breaks agents. Every cell below is a live request we sent to this API on September 17, 2026. Failures are shown, with the workaround where there is one.

Tool calling

ModelTool callStreamed tool callParallel callstool_choice: requiredtool_choice: namedCodex CLI task
GPT-OSS 120BWorksWorksWorksOne tool onlyWorksWorks
DeepSeek V4 FlashWorksWorksWorksWorksWorksWorks
DeepSeek V4.1 FlashWorksWorksWorksWorksWorksnot run
GLM 5.3 FlashWorksWorksWorksWorksWorksWorks
Llama 3.3 70B InstructWorksWorksWorksWorksWorksnot run
GLM 5.3WorksWorksWorksWorksWorksWorks
DeepSeek V4 ProWorksWorksWorksWorksWorksWorks
MiniMax M3WorksWorksWorksWorksWorksWorks
Kimi K2.7 CodeWorksWorksWorksWorksWorksWorks
Qwen3-VL 235BWorksWorksWorksWorksWorksnot run
  • Tool call: one function offered, a prompt that needs it; the model returned a well-formed tool_calls entry. All models also completed the second turn, where the tool result is sent back and the model answers.
  • Streamed: the same request with stream: true; the argument fragments in delta.tool_calls reassembled into valid JSON.
  • Parallel: "weather in Paris and in Tokyo"; two calls came back in one response.
  • GPT-OSS 120B and tool_choice: "required": the upstream deployment answers this with a server error. The gateway works around it: with one tool it sends that tool by name, which is equivalent; with several tools it sends auto and sets an X-Tool-Choice response header saying so. Named and none work normally.
  • Codex CLI task: the real CLI wrote a script, ran it and reported the output through /v1/responses. Setup.

JSON output and basics

ModelJSON modeJSON schemaUsage in streamSystem prompt followed
GPT-OSS 120BWorksWorksWorksWorks
DeepSeek V4 FlashWorksWorksWorksWorks
DeepSeek V4.1 FlashWorksWorksWorksWorks
GLM 5.3 FlashWorksWorksWorksWorks
Llama 3.3 70B InstructWorksWorksWorksWorks
GLM 5.3WorksWorksWorksWorks
DeepSeek V4 ProWorksWorksWorksWorks
MiniMax M3WorksWorksWorksWorks
Kimi K2.7 CodeFailsFailsWorksWorks
Qwen3-VL 235BWorksWorksWorksWorks

Kimi K2.7 Code fails both JSON tests: with response_format set, the JSON arrives in reasoning_content and content is empty. Ask for JSON in the prompt, or use another model for structured output. Its tool calling is unaffected.

Switching thinking off

Reasoning models think before they answer, the thinking is billed as output, and on an easy request it can be most of the wait. Every model family uses a different parameter to turn it off, and the wrong one is silently ignored. This API accepts one spelling for all of them and translates it:

Any chat model · thinking off
resp = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-V4-Pro",
    reasoning_effort="none",        # also accepted: "minimal", reasoning={"enabled": False}, thinking={"type": "disabled"}
    messages=[{"role": "user", "content": "A farmer has 17 sheep. All but 9 run away. How many are left?"}],
    max_tokens=500,
)
# Responses API: reasoning={"effort": "minimal"}     Codex CLI: model_reasoning_effort = "minimal"
Modelreasoning_effort: "none"Completion tokens, default → offReasoning characters, default → offThinking is returned in
GPT-OSS 120BMinimum, not off77 → 30233 → 42reasoning
DeepSeek V4 FlashWorks95 → 6296 → 0reasoning_content
DeepSeek V4.1 FlashWorks32 → 295 → 0reasoning_content
GLM 5.3 FlashWorks88 → 18219 → 0reasoning_content
Llama 3.3 70B Instructdoes not reason
GLM 5.3Works81 → 15181 → 0reasoning_content
DeepSeek V4 ProWorks59 → 2194 → 0reasoning_content
MiniMax M3Works22 → 2764 → 0reasoning_content
Kimi K2.7 CodeWorks29 → 280 → 0reasoning_content
Qwen3-VL 235Bdoes not reason

One question, one run each, so read the direction and not the digits. GPT-OSS 120B has no off switch; none is sent as its lowest effort, and low, medium and high are passed through as they are. The response header X-Thinking: off confirms the translation happened. Leave thinking on for multi-step coding and maths; turn it off for extraction, classification, routing and chat.

Method

Public endpoint, default sampling, max_tokens 1,500 to 3,000 so that no model is cut off while thinking. A cell is marked as working only if the response was structurally correct, for example arguments that parse as JSON and name the right city. Models change and upstream deployments change; the date above is the date of the run, and the scripts are rerun when a model is added. If a cell does not match what you see, tell us.