Migration

OpenAI function calling migration guide for 2026

There are two migrations hiding behind this topic: moving from Chat Completions to the Responses API, and moving from OpenAI to an OpenAI-compatible provider. Both change the shape of tool definitions and tool results. Neither is a one-line base URL swap.

Short answer. OpenAI recommends the Responses API for new projects and says Chat Completions remains supported. The important 2026 constraint is model-specific: GPT-6 Astra and GPT-6.1 Sol require the Responses API for tool calling, and starting with GPT-5.4, Chat Completions does not support tool calling with a reasoning_effort other than none. If you are staying on Chat Completions, you can still migrate providers by keeping the externally tagged tools format.

Why migrate now

The Responses API is not just a rename. It treats a tool call and a tool result as separate items, supports built-in tools, and can keep state with previous_response_id. OpenAI's migration guide says Responses improves cache utilization by 40% to 80% in its internal tests and improves SWE-bench by 3% for reasoning models with the same prompt. Those are vendor numbers, but they explain why new projects start there.

The stronger reason is compatibility. OpenAI's function-calling documentation states that GPT-6 Astra and GPT-6.1 Sol require the Responses API for tool calling. It also states that from GPT-5.4 onward, Chat Completions does not support tool calling with reasoning effort values other than none. If your roadmap includes those models, Chat Completions is a dead end for tool use.

The shape changes

ConceptChat CompletionsResponses API
Endpoint/v1/chat/completions/v1/responses
Tool definitionExternally tagged: type plus a nested function objectInternally tagged: type, name, description, parameters
Model outputchoices[0].message.tool_calls[]output[] items with type: "function_call"
Tool resultA tool message with tool_call_idA function_call_output item with call_id
Strict modeNon-strict by defaultAttempts strict mode when strict is omitted
Conversation stateYou resend the messages arrayOptional store and previous_response_id

Based on OpenAI's function-calling and Responses migration documentation, checked 20 November 2026. Chat Completions remains supported, but the two APIs are not wire-compatible for tools.

Model and reasoning constraints

If you use a reasoning model, check the combination before you migrate. Chat Completions and Responses both accept tools, but the reasoning settings differ. OpenAI's migration guide says that starting with GPT-5.4, Chat Completions does not support tool calling with reasoning_effort values other than none. The function-calling guide adds that GPT-6 Astra and GPT-6.1 Sol require Responses for tool calling.

Parallel calls are another difference. Both APIs can return several tool calls in one turn, but the handling differs: Chat Completions returns them in message.tool_calls, and Responses returns separate function_call items. Your dispatcher must loop over both, and it must tolerate zero, one or many calls. Do not assume one call per turn.

Code: before and after

The example below keeps the same get_weather function and changes only the request and result handling. The Chat Completions version is first; the Responses version follows. In production, put the tool schema in one shared module and map it to each API shape.

# Before: Chat Completions
completion = client.chat.completions.create(
    model="gpt-5.6-terra",
    messages=messages,
    tools=[{
        "type": "function",
        "function": {
            "name": "get_weather",
            "description": "Get weather for a city.",
            "parameters": {
                "type": "object",
                "properties": {"city": {"type": "string"}},
                "required": ["city"],
                "additionalProperties": False,
            },
        },
    }],
)
call = completion.choices[0].message.tool_calls[0]
messages.append(completion.choices[0].message)
messages.append({
    "role": "tool",
    "tool_call_id": call.id,
    "content": '{"temperature_c": 18}',
})

# After: Responses
response = client.responses.create(
    model="gpt-6.2-astra",
    input=messages,
    tools=[{
        "type": "function",
        "name": "get_weather",
        "description": "Get weather for a city.",
        "parameters": {
            "type": "object",
            "properties": {"city": {"type": "string"}},
            "required": ["city"],
            "additionalProperties": False,
        },
        "strict": True,
    }],
)
for item in response.output:
    if item.type == "function_call" and item.name == "get_weather":
        print(item.call_id, item.arguments)

The Responses result is sent back as an item, not a message: {"type": "function_call_output", "call_id": item.call_id, "output": "..."}. If you use reasoning models, preserve the reasoning items as well; OpenAI's guide warns that they must be passed back with the tool outputs.

Moving to another OpenAI-compatible provider

If you are leaving OpenAI rather than moving to Responses, the safest path is to keep Chat Completions and the externally tagged tool format. Most compatible providers implement that shape. Change the base URL, the API key and the model ID, then test the tool loop end to end. Do not assume the provider supports strict, parallel calls or the same JSON-schema subset.

Plugsky exposes https://api.plugsky.com/v1 with 39 models and OpenAI-compatible tool calling. The free plan is for evaluation: new accounts get 100 requests and 50,000 tokens per day, with Micro and Lite models. Paid plans from $8/month raise the daily caps; Builder and Scale remove the monthly token cap under fair use. See pricing and function calling support.

For the migration checklist, use the API migration checker. For the broader provider swap, see how to migrate from OpenAI to Plugsky.

FAQ

Do I have to migrate from Chat Completions to Responses?

No. OpenAI says Chat Completions remains supported and recommends Responses for new projects. You do need Responses for tool calling on GPT-6 Astra and GPT-6.1 Sol, and for reasoning effort other than none on GPT-5.4 and later.

What changes in the tool schema?

Chat Completions nests the function inside a function object. Responses puts name, description and parameters at the top level of the tool. The JSON schema for parameters is otherwise similar.

How are tool results returned in Responses?

As a function_call_output item with the call_id from the model's function_call item. Chat Completions uses a tool message with tool_call_id instead.

Can I keep using tools with an OpenAI-compatible provider?

Yes, if the provider implements the Chat Completions tool shape. Test strict mode, parallel calls and your JSON schema subset before switching production traffic.

Why does my reasoning model fail with tools on Chat Completions?

OpenAI documents that starting with GPT-5.4, Chat Completions does not support tool calling with reasoning_effort values other than none. Use the Responses API for those combinations.

Sources, checked 20 November 2026: OpenAI migrate to Responses · OpenAI function calling · Groq tool use · Gemini OpenAI compatibility. Provider limits and prices can change; confirm them in the provider console before capacity planning.

Reviewed 20 November 2026. This page is maintained by the Plugsky editorial team. It describes published provider limits and does not promise that a free tier will remain unchanged.