Claude Opus 5.5 vs GPT-6 Astra: Coding Agent의 JSON, Tool Calling, Structured Output 배선
두 플래그십 모두 긴 coding agent용이지만 JSON 계약은 다른 API에 있다. Opus 5.5는 Messages(input_schema, tool_use/tool_result, output_config.format). GPT-6 Astra는 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 json_schema strict | text.format 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 state 가능) | previous_response_id 체인; Decisions 라우트는 별도 |
사실 기준 2026-11-02: Anthropic Opus 5.5, OpenAI Astra/Responses. A-1042, resp_8k1a는 가상.
다른 API 모양—같은 JSON mode가 아님
coding agent 호스트는 UI 객체, 도구 인자, write-back 후 다음 hop을 다룬다. Opus 5.5와 Astra 모두 가능하지만 필드와 이어가기가 다르다:
- Opus 5.5: Messages
input_schema;tool_use(input은 객체).output_config.format으로 추출. - GPT-6 Astra: 도구는 Responses;
function_call_output은call_id. 객체는text.format. - 호스트 책임 동일: Schema, 권한, 부작용, state. 모델 교체는 게이트를 없애지 않는다.
심층: Opus 5.5, GPT-6 Astra. DevDay 분기: DevDay SO. 공통 루프: Coding loop.
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: UI 객체는 output_config.format. 도구 호출과 분리.
{
"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.
{
"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.
{
"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?
반환 계약으로 고른다:
| 필요 | Opus 5.5 | GPT-6 Astra |
|---|---|---|
| UI/하류 구조 객체 | Messages output_config.format | Responses text.format |
| DB 조회, 파일, 셸 | tool_use + tool_result | 플랫 tools + function_call_output |
| 긴 멀티턴 | messages[] + JSON state | previous_response_id + state |
| lookup_order 강제 | forced tool_choice 피함 | auto/none |
| OpenAI 유한 라우트 | 호스트 규칙 또는 Decisions | Decisions answers |
Programmatic Tool Calling·Agents는 OpenAI 측. Opus는 Messages 유지.
듀얼 스택 다섯 단계
staging에서 동일 티켓을 Opus/Astra 각각:
- 세 계약 분리.
- Opus Messages 어댑터.
- Astra Responses 어댑터.
- 구조화 경로 분리.
- vendor 중립 facts in state.
다섯 구간은 Agent JSON State 글 참고.
arguments·input·format 펼치기
듀얼 스택 버그는 id 혼용이 대부분.
- 포맷, Schema 검증로 검사.
- JSON Diff로 Opus vs Astra 요청 비교.
- JSONPath로 last_order_id.
- 루프 필드: Agent JSON state.
- JSONSort 로컬.
각 vendor JSON이 Schema를 통과해야 완료.
흔한 실수
- Chat Completions function 래퍼 공유 가정.
- Opus forced tool_choice.
- 한 Messages에 format+tools 몰아넣기.
- arguments 문자열 무시.
- tools 버전 미기록.
- 승자 기사.
FAQ
Opus가 Responses?
API 혼합 금지.
Astra Chat Completions?
도구 없으면 가능; 도구는 Responses.
Structured Output이 Tool 대체?
아니요.
MCP?
호스트 프로토콜; 모델은 tool_use/function_call.
Opus 기본 Astra fallback?
두 파서·로그 필요.
결론
계약은 Messages vs Responses.
schema와 id 규칙을 먼저.
더 읽기
- Claude Opus 5.5와 도구 JSON Messages, tool_use
- GPT-6 Astra JSON API Responses, text.format
- DevDay Structured Output text.format, 플랫 tools
- Coding Agent JSON 공통 루프
- 모든 글 JSON·AI 노트
변경: 최초 게시