For AI agents: the complete documentation index is available at https://little-butterfly-9bfe.sentia389.workers.dev/llms.txt, the full documentation bundle is available at https://little-butterfly-9bfe.sentia389.workers.dev/llms-full.txt, and this page is available as Markdown at https://little-butterfly-9bfe.sentia389.workers.dev/models/openai/gpt-migration.md.

从 GPT-5 迁移到 GPT-6

OpenAI 的 gpt-5、gpt-5.6-sol、gpt-6.2-sol 均支持 Chat Completions(POST /v1/chat/completions)和 Responses(POST /v1/responses)。用当前 routerlio API Key 核对源和目标 ID,再按下表调整参数。OpenAI 将于 2026 年 12 月 11 日停用 gpt-5,公告推荐 gpt-6.1-sol,本页用更新的 gpt-6.2-sol 演示迁移。停用公告

参数及类型gpt-6.2-solgpt-5.6-solgpt-5
推理强度(字符串)low、medium、high、xhigh、maxnone、low、medium、high、xhigh、maxminimal、low、medium、high
采样(temperature、top_p 为数字,Chat 的 logprobs 为布尔值)Chat 移除上述字段及整数 top_logprobs。Responses 移除 temperature、top_p、top_logprobs 及 include 中的 message.output_text.logprobs先省略这些字段。需要采样时按入口核对字段移除这些参数
工具(tools 为对象数组)工具调用使用 ResponsesChat 函数调用要求 reasoning_effort: "none"。结合推理与工具调用时使用 Responses按端点选择定义格式

沿用 Chat Completions

原集成向 POST /v1/chat/completions 发送以下请求:

JSON
{
  "model": "gpt-5",
  "reasoning_effort": "minimal",
  "messages": [
    {
      "role": "user",
      "content": "用一句话解释幂等请求。"
    }
  ]
}

切换到 GPT-6.2 Sol 后,保留路径和 messages,把 minimal 改成目标型号支持的 low。

JSON
{
  "model": "gpt-6.2-sol",
  "reasoning_effort": "low",
  "messages": [
    {
      "role": "user",
      "content": "用一句话解释幂等请求。"
    }
  ]
}

两个 Chat 请求沿用同一解析方式。以下是迁移后的非流式响应示例,从 choices[].message.content 获取文本。

JSON
{
  "id": "chatcmpl_example",
  "object": "chat.completion",
  "created": 1795900800,
  "model": "gpt-6.2-sol",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "幂等请求执行一次或重复执行多次,对目标资源产生相同的预期效果。"
      },
      "finish_reason": "stop"
    }
  ]
}

改用 Responses

把 URL 改为 POST /v1/responses,用 input 传入提示,推理强度放入 reasoning.effort。需要控制输出预算时使用整数 max_output_tokens。

对于 GPT-6.2 的多轮应用,可把每轮复用的规则放在 input 的第一条 developer 消息,让固定前缀参与提示缓存。顶层 instructions 适合当前轮临时规则,GPT-6.2 会在 input 之后处理它。降级型号或改写历史消息可能使旧的推理项失效,迁移时用原有多轮样例检查工具回合和后续回答。GPT-6.2 迁移指南

JSON
{
  "model": "gpt-6.2-sol",
  "input": "用一句话解释幂等请求。",
  "reasoning": {
    "effort": "low"
  }
}

对应的非流式响应示例。检查 status,从 output[] 的消息项中提取 output_text。流式响应按事件类型读取,见 Responses 接入。

JSON
{
  "id": "resp_example",
  "object": "response",
  "created_at": 1795900800,
  "model": "gpt-6.2-sol",
  "status": "completed",
  "output": [
    {
      "id": "msg_example",
      "type": "message",
      "status": "completed",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "幂等请求执行一次或重复执行多次,对目标资源产生相同的预期效果。",
          "annotations": []
        }
      ]
    }
  ]
}

OpenAI 官方参考