Claude Opus 5.5 と GPT-6 Astra:Coding Agent の JSON・Tool Calling・Structured Output の配線
両フラッグシップは長時間の coding agent 向けだが、JSON 契約は別 API。Opus 5.5 は Anthropic Messages:tools[].input_schema、返信 tool_use / 書き戻し tool_result、構造化は output_config.format。GPT-6 Astra は OpenAI Responses:text.format、フラット tools[]、function_call、previous_response_id。ランキングではなくフィールド対照。
読む前の早見
| 次元 | Claude Opus 5.5 | GPT-6 Astra |
|---|---|---|
| API 面 | POST /v1/messages;messages[] で継続 | POST /v1/responses;previous_response_id で継続 |
| Structured Output | output_config.format type=json_schema strict | text.format type=json_schema strict |
| Tool Calling | tools[].input_schema;tool_use / tool_result | フラット tools[];function_call / function_call_output |
| tool_choice | forced 指定はエラー;Schema で絞る | Responses では auto / none;DevDay 後ツールはここ |
| Session | 宿主が messages[] を組み立て(session_id 状態可) | previous_response_id チェーン;Decisions 経路は別 |
事実は 2026-11-02 まで:Anthropic Opus 5.5、OpenAI Astra / Responses 移行と Structured Outputs。A-1042、resp_8k1a は架空。
違うのは API 形状であり「同じ JSON mode」ではない
coding agent 宿主は通常、UI 向け構造オブジェクト、モデルが求めるツール引数、書き戻し後の次ホップの三つを扱う。Opus 5.5 と Astra はどちらも可能だが、フィールド名と継続方法が異なる:
- Opus 5.5 は Messages で
input_schemaを宣言;モデルはtool_use(inputは既にオブジェクト)。抽出はoutput_config.format。 - GPT-6 Astra はツール付きなら Responses:フラット
type/name/parameters、argumentsは文字列のことが多い;call_idでfunction_call_output。オブジェクトはtext.format。 - 宿主の責務は同じ:Schema 検証、権限、副作用、state 永続化。モデル交換は JSON 門を消さない—パーサと id だけ変える。
深読み:Opus 5.5 深読み と GPT-6 Astra 深読み。OpenAI DevDay 後の分路:DevDay Structured Output。汎用ループ:Coding Agent ループ。
Opus ツール/形式 vs Astra text.format/フラットツール
1. Opus 5.5:Messages + input_schema ツール表。 架空注文 A-1042:
{
"model": "claude-opus-5-5",
"max_tokens": 16000,
"effort": "medium",
"tools": [{
"name": "lookup_order",
"description": "Look up an order by ID. Confirm before any refund.",
"input_schema": {
"type": "object",
"properties": {
"order_id": { "type": "string", "pattern": "^[A-Z]-\\d{4}$" }
},
"required": ["order_id"],
"additionalProperties": false
}
}],
"messages": [{
"role": "user",
"content": "Look up order A-1042 and say if it is paid."
}]
}
2. Opus 5.5:UI オブジェクトは output_config.format。 ツール呼び出しと分離;forced と巨大 schema を一リクエストにしない。
{
"model": "claude-opus-5-5",
"max_tokens": 8192,
"effort": "medium",
"messages": [{
"role": "user",
"content": "Extract order A-1042 as JSON for the UI."
}],
"output_config": {
"format": {
"type": "json_schema",
"strict": true,
"schema": {
"type": "object",
"properties": {
"order_id": { "type": "string", "pattern": "^[A-Z]-\\d{4}$" },
"status": { "type": "string", "enum": ["paid", "open"] }
},
"required": ["order_id", "status"],
"additionalProperties": false
}
}
}
}
3. Astra:Responses + text.format でフィールド抽出。 公式フックは text.format。
{
"model": "gpt-6-astra",
"input": "Jane paid order A-1042.",
"text": {
"format": {
"type": "json_schema",
"name": "order_extract",
"strict": true,
"schema": {
"type": "object",
"properties": {
"order_id": { "type": "string", "pattern": "^[A-Z]-\\d{4}$" },
"status": { "type": "string", "enum": ["paid", "open"] }
},
"required": ["order_id", "status"],
"additionalProperties": false
}
}
}
}
4. Astra:副作用は strict フラット tools + previous_response_id。 function_call 履歴を手 stringify しない。
{
"model": "gpt-6-astra",
"previous_response_id": "resp_8k1a",
"tools": [{
"type": "function",
"name": "lookup_order",
"strict": true,
"parameters": {
"type": "object",
"properties": {
"order_id": { "type": "string", "pattern": "^[A-Z]-\\d{4}$" }
},
"required": ["order_id"],
"additionalProperties": false
}
}],
"input": [{
"role": "user",
"content": [{ "type": "input_text", "text": "Look up A-1042 if needed." }]
}]
}
一つの Coding Agent:どの API?
返却契約で選ぶ。「より賢いモデル」で選ばない。vendor アダプタがある前提:
| 必要なもの | Opus 5.5 | GPT-6 Astra |
|---|---|---|
| UI / 下流向け構造オブジェクト | Messages output_config.format json_schema | Responses text.format json_schema |
| DB 参照、ファイル編集、シェル | tools + tool_use;tool_result 書き戻し | Responses フラット tools + function_call_output |
| 長いマルチターン(数十 turn) | messages[] + 宿主 JSON state | previous_response_id チェーン + 宿主 state |
| 「lookup_order 必須」を強制 | forced tool_choice を避ける;Schema + prompt | tool_choice auto/none;forced は安定と仮定しない |
| OpenAI 有界ルーティング | 宿主ルールまたは Decisions(OpenAI スタック時) | Decisions answers;DevDay 分路記事参照 |
Programmatic Tool Calling と Agents ホストループは OpenAI 側。Opus 宿主は Messages のまま。生 output 項と正規化 JSON の両方を保存する。
デュアルスタック五ステップ
staging で同一架空チケットを Opus と Astra で各一度:
- 三契約に分割。 UI schema、各 tool parameters/input_schema、書き戻し schema。
- Opus Messages アダプタ。tool_use.id → 実行 → tool_result.tool_use_id。
- Astra Responses アダプタ。function_call.call_id → function_call_output。
- 構造化経路を分離。Opus output_config.format;Astra text.format。
- state に vendor 中立 facts。order_id、route、pending_tool;生 call id は書き戻し用。
五セグメント循環は Agent JSON State 記事;本篇は Call/Result 形状の vendor 切替。
arguments・input・format を広げる
デュアルスタックのバグは「Astra call_id を Opus tool_result に書く」等が大半。
- 整形 で tool_use.input、function_call.arguments、format 結果;Schema 検証 で両 schema。
- JSON Diff で同一 turn の Opus messages と Astra input;response_format 残存確認。
- JSONPath で last_order_id;ツール引数と一致。
- 循環フィールド:Agent JSON state。
- JSONSort はローカル。鍵や本番パスを上げない。
各 vendor の JSON が Schema を通って初めて完了。
よくある誤り
- 両社が Chat Completions function ラッパを共有すると思う。Astra ツールは Responses フラット。
- Opus で forced tool_choice を安定装置にする。公式経路はエラー。
- output_config.format と tools を一 Messages に詰める。オブジェクトと副作用は分離。
- arguments 文字列を無視。Astra は parse + Schema;Opus input も検証。
- previous_response_id だけ使い tools 版を記録しない。replay 用に版をログ。
- 「どちらが勝つ」記事にする。事実は API と id の差。
FAQ
Opus も OpenAI Responses を使える?
API を混ぜない。ビジネス JSON は統一可だが HTTP 形状は各社ドキュメント通り。
Astra は Chat Completions のまま?
ツールなしは可;ツール付き Astra は Responses へ。DevDay 後移行参照。
Structured Output は Tool Calling の代替?
いいえ。format はテキスト出力;副作用はツール+宿主実行。
MCP は?
宿主が外部ツールに接続するプロトコル;モデル側は tool_use か function_call。
Opus 既定で Astra フォールバック?
可能だが二パーサ、二 id 規則、別 replay ログが必要。
結論
Opus 5.5 と GPT-6 Astra は長時間ツール JSON を推すが、契約は別 API:Messages + output_config + tool_use vs Responses + text.format + function_call。
三 schema と書き戻し id 規則を先に描く。モデルは JSON を埋めるだけ;実行は宿主。
関連記事
- Claude Opus 5.5 とツール JSON Messages、effort、tool_use 書き戻し
- GPT-6 Astra と JSON API Responses、text.format、async ツール
- DevDay 後 Structured Output text.format、フラット tools、Decisions
- AI Coding Agent と JSON 汎用ループ、宿主実行
- すべての記事 JSON と AI 開発メモ
更新: 初出