ChatGPT Pro OAuth, openai SDK 안 씀
Codex-Pippa 는 openai Python SDK 안 써. Codex CLI 의 OAuth session 의 credential 읽어서, OpenAI token endpoint 통해 JWT refresh, provider 의 response endpoint 에서 httpx SSE 로 stream 해.
왜 직접 httpx
openai SDK 가 Codex backend API 를 직접 못 말해 — 그 endpoint 는 ChatGPT 자체가 쓰는 그거. SDK 우회하면 wire format quirk (instructions field, store: false, max_output_tokens unsupported) 의 full control.
multi-turn function calling
매 turn 마다 full history replay. 2026-05-14 이후로는 Claude 도 똑같이 매 turn replay 야 (vessels lesson 1 의 EvNote 참고). Tool call 은 cwkPippa 의 local tool_bridge.py 거치고 — Claude 랑 같은 코드 path. variant 별인 건 wire-format 변환뿐 (Claude 대신 OpenAI tool schema).
전쟁 이야기: Codex wire format 에 surprise 셋:
instructions 가 top-level 로 들어가야 함 (input 의 developer role 아니라), store: false mandatory, max_output_tokens unsupported. 각각 ChatGPT 자체가 보내는 정확한 wire format 매치하기 전까지 400 에러.