Request body 를 직접 만들면 wire 가 보여. JSON key (model, input, tools, instructions, max_output_tokens, stream, tool_choice) 의 정확한 spelling. SDK helper 가 이름 바꾼 거 없음. Snuck-in default 없음.
Debugging 의 layer
'SDK 호출은 동작하는데 hand-rolled 호출은 422?' 답은 거의 항상 한 필드 이름 오타 또는 tool 에 type: "function" 빠진 거. 한 번 수동 build 해 보면 SDK 의 magic 이 사라져 — 단순한 contract 가 보여.
Header 도 직접
Authorization: Bearer <key>, Content-Type: application/json, OpenAI-Beta: ... (beta features 시). Org/project header 도 직접 — OpenAI-Organization, OpenAI-Project.
Streaming 시 Accept
Streaming 호출은 Accept: text/event-stream 박아 — 일부 proxy 는 이게 없으면 SSE 를 buffer 해서 streaming 효과를 죽임.