• cyhhao's avatar
    feat(openai): add AI SDK content format compatibility for OAuth accounts · 5b8d4fb0
    cyhhao authored
    - Add normalizeInputForCodexAPI function to convert AI SDK multi-part
      content format to simplified format expected by ChatGPT Codex API
    - AI SDK sends: {"content": [{"type": "input_text", "text": "..."}]}
    - Codex API expects: {"content": "..."}
    - Only applies to OAuth accounts (ChatGPT internal API)
    - API Key accounts remain unchanged (OpenAI Platform API supports both)
    5b8d4fb0
openai_gateway_service.go 46.6 KB