5 'OpenAI-Compatible' API Lies We Hit Building an AI Gateway
respan-81 · reddit · 2026-10-24
A team building an AI gateway (unified chat/images/voice/video) shares five pitfalls found while testing 'OpenAI-compatible' endpoints:
- OpenAI isn't compatible with itself: from gpt-5.4, Chat Completions rejects reasoning and function tools in one request; from 5.6 models reason by default, so sending tools errors out
- Free money: OpenRouter uses price "-1" for unknown, which parsed as a number made the 'route to cheapest model' option always pick those models
- "stop" means "I called a tool": with forced toolchoice, OpenAI (and Gemini) return finishreason "stop" instead of "toolcalls", so agent loops never run the tool
- Streams that just leave: some servers never send [DONE]; Gemini sometimes stops mid-answer with no finishReason, and half-answers were treated as complete
- The signature only the first call gets: Gemini 3's thought signatures are only attached to the first of parallel calls; dropping them on history rebuild causes a 400 (ADK #3705)
Gateway partially open-sourced: respanai/respan-gateway (single Rust binary, 174 stars).
More from coding & agent
- Hanging Context: keyless MCP server for citable news lands in Claude's directory — bshivarthy · 2026-10-24
- Dev who spent $10k in two weeks details why Codex beats Claude Code on mobile — willdepue · 2026-10-24
- Devs debate codex: remote control mode called 'miles better' in workflow comparison — _sholtodouglas · 2026-10-24
- Dev Vibe-Codes MOSS Image Studio, a Friendlier Browser Frontend for ComfyUI — Roorem10 · 2026-10-24
- He Built Custom TV Launchers for Guests and His Backyard With Claude Code — rephlektiv · 2026-10-24
- Claude skill claims to replace Higgsfield Genjutsu with Seedance 2.5 video editing — aziz4ai · 2026-10-24