Back
/v0.1.41/Fixed

OpenAI-Compatible Error Codes


OpenAI-Compatible Errors Return the Right Status

Requests to /openai/v1 returned 500 for every failure, whatever actually went wrong. An invalid key, a rate limit and a bad request were indistinguishable.

That mattered most for rate limits: an OpenAI SDK backs off politely on a 429, but treats a 500 as a server fault and retries it differently. Callers were being retried incorrectly and never saw that they had been throttled.

  • Invalid key → 401 with authentication_error
  • Rate limited → 429 with rate_limit_error
  • Bad request → 400, model not found → 404