> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mixroute.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GPT 6.1 Sol

> OpenAI 面向複雜程式設計、計算機操作和專業工作的推理模型，支援文本與影像輸入。

OpenAI 面向複雜程式設計、計算機操作和專業工作的推理模型，支援文本與影像輸入。

使用完整模型 ID `gpt-6.1-sol`。它與 `gpt-6-sol` 是不同模型；切換 ID 時也需要檢查推理和工具呼叫設定。

## 模型資訊

| 欄位 | 說明 |
| - | - |
| `model` | gpt-6.1-sol |
| `context` | 1,050,000 tokens |
| `max output` | 128,000 tokens |
| `input` | 文本和影像，不支援原生音訊或影片輸入。 |
| `output` | 文本；通過對應介面支援結構化輸出和函式呼叫。 |

上下文和輸出長度為模型規格；實際限制、模型可用性和價格取決於 MixRoute 賬號及路由。並非每條路由都提供所有託管工具。

## 介面與推理設定

| 介面 | 推理欄位 | 可用值 | 函式呼叫 |
| - | - | - | - |
| [Responses API](/zh-hant/api-reference/endpoint/responses-openai) | `reasoning.effort` | `low`, `medium`, `high`, `xhigh`, `max` | 支援 |
| [Chat Completions API](/zh-hant/api-reference/endpoint/chat-openai) | `reasoning_effort` | `low`, `medium`, `high`, `xhigh` | 此模型不支援 |

模型預設推理強度為 `medium`，最低為 `low`，不支援 `none` 或 `minimal`。需要 `max` 時使用 Responses，不要通過 Chat Completions 傳入。

<Warning>
  不要將 reasoning\_effort="none" 作為 Chat Completions 工具呼叫報錯的修復方式。GPT 6.1 Sol 不接受 none；應遷移至 /v1/responses，並使用 reasoning.effort="low" 或更高的有效等級。
</Warning>

不要傳入 `temperature`、`top_p` 或 `top_logprobs`。Chat Completions 還應移除 `logprobs`，Responses 的 `include` 中不要加入 `message.output_text.logprobs`；這些取樣或機率欄位與本模型的推理模式不相容。

## Responses 請求

呼叫前設定 `MIXROUTE_API_KEY`。

```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/responses" \
  --header "Authorization: Bearer $MIXROUTE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "gpt-6.1-sol",
  "input": "Explain the role of database indexes.",
  "reasoning": {
    "effort": "low"
  },
  "max_output_tokens": 1024,
  "store": false
}'
```

### Python

```python theme={null}
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["MIXROUTE_API_KEY"],
    base_url="https://api.mixroute.ai/v1",
)
response = client.responses.create(
    model="gpt-6.1-sol",
    input="Explain the role of database indexes.",
    reasoning={"effort": "low"},
    max_output_tokens=1024,
    store=False,
)
print(response.output_text)
```

| 欄位 | 說明 |
| - | - |
| `model` | 必填，使用 gpt-6.1-sol。 |
| `input` | 必填，文本或 Responses 輸入條目陣列。 |
| `reasoning.effort` | low / medium / high / xhigh / max，預設 medium。 |
| `max_output_tokens` | 可選，預算同時包含可見輸出和推理 token。 |
| `stream` | 可選布林值；true 啟用 Responses SSE 事件流。 |
| `store` | 可選布林值；示例使用 false 關閉響應儲存。 |
| `tools` | 可選，Responses 工具定義；函式欄位不巢狀在 function 物件中。 |
| `tool_choice` | 可選，工具選擇策略或指定名稱的函式物件。 |

## 不帶工具的 Chat Completions

```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/chat/completions" \
  --header "Authorization: Bearer $MIXROUTE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "gpt-6.1-sol",
  "messages": [
    {
      "role": "user",
      "content": "Explain the role of database indexes."
    }
  ],
  "reasoning_effort": "low",
  "max_completion_tokens": 1024
}'
```

使用 `messages` 代替 `input`，使用 `reasoning_effort` 代替巢狀的 `reasoning` 物件，輸出預算使用 `max_completion_tokens` 而非 `max_output_tokens`。文本結果從 `choices[0].message.content` 讀取，此模型在該介面不應攜帶 `tools`。

## 函式呼叫

```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/responses" \
  --header "Authorization: Bearer $MIXROUTE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "gpt-6.1-sol",
  "input": "Call lookup_status for service demo.",
  "reasoning": {
    "effort": "low"
  },
  "tools": [
    {
      "type": "function",
      "name": "lookup_status",
      "description": "Return the status of a named service.",
      "parameters": {
        "type": "object",
        "properties": {
          "service": {
            "type": "string"
          }
        },
        "required": [
          "service"
        ],
        "additionalProperties": false
      },
      "strict": true
    }
  ],
  "tool_choice": {
    "type": "function",
    "name": "lookup_status"
  },
  "include": [
    "reasoning.encrypted_content"
  ],
  "max_output_tokens": 1024,
  "store": false
}'
```

函式呼叫以 `output` 中的 `function_call` 條目返回，包含 `name`、JSON 字串形式的 `arguments` 和 `call_id`。應用需要校驗參數並執行自己的函式；宣告工具不會讓服務端自動執行該函式。

無狀態續傳時，將完整的返回 `output` 陣列追加到會話輸入，再新增 `function_call_output` 條目，攜帶匹配的 `call_id` 和字串型別的 `output`。保留所有 reasoning 條目及其加密內容，不要改寫。續傳時將 `tool_choice` 恢復為 `"auto"`，讓模型繼續回答，避免再次強制呼叫同一函式。不要假設 `output[0]` 是文本訊息；Python SDK 可通過 `response.output_text` 讀取文本。

```json theme={null}
{
  "type": "function_call_output",
  "call_id": "CALL_ID_FROM_RESPONSE",
  "output": "{\"service\":\"demo\",\"status\":\"ok\"}"
}
```

## 從 GPT 6 Sol 遷移

1. 將 `model` 改為 `gpt-6.1-sol`；需要繼續使用 GPT 6 Sol 時保留原 ID。
2. 將 `none` 或 `minimal` 改為 `low`，或選擇更高的有效推理等級。
3. 將 Chat Completions 的函式工具工作流遷移到 Responses，按 Responses 格式調整輸入和工具定義。
4. 移除不相容的取樣參數；最高推理強度使用 Responses。
