Skip to main content
Use this migration when you want to keep the same NagaAI platform behavior but move from chat-shaped requests to the main Responses API. You do not need to migrate immediately. Stay on Chat Completions if your current integration already works and the migration cost is not worth it yet.

Mental Model Shift

Chat CompletionsResponses
messages[]input string or typed input items
choices[0].messageoutput item array
delta.contentsemantic SSE events like response.output_text.delta
tool_callsfunction_call items
role: toolfunction_call_output items
repeated conversation historyinput replay or previous_response_id

When To Stay On Chat Completions

  • you already have a large OpenAI chat integration that would gain little from migration right now
  • your SDK wrappers are deeply tied to choices[0].message

When To Migrate

  • you are adding new tools or richer multimodal flows
  • you want the primary platform surface going forward
  • you want docs and examples that match the main product path

Field mapping

Chat Completions fieldResponses equivalent
messagesinput
system messageinstructions or a system / developer input message
toolstools
tool_choicetool_choice
stream: truestream: true
tool result message with role: toolfunction_call_output input item

Simple request conversion

Chat Completions
{
  "model": "gpt-4.1-mini",
  "messages": [
    {
      "role": "user",
      "content": "Summarize this pull request in three bullets."
    }
  ]
}
Responses
{
  "model": "gpt-4.1-mini",
  "input": "Summarize this pull request in three bullets."
}

Tool-calling migration notes

  • tool_calls become function_call items in output[]
  • follow-up tool results become function_call_output items in the next input
  • do not assume the final assistant text is always output[0]

Streaming migration notes

  • Chat Completions streams chat deltas
  • Responses streams semantic events such as response.output_text.delta
  • if your client parses raw delta text today, update it before switching APIs

Next steps