openai.internal._transient_code

(internal) Error codes that name a TRANSIENT provider-side failure. The Responses API's own `response.failed` example is `{"code":"server_error", …}` — a 500 delivered inside a 200 body — and the same failure arriving as an HTTP status classifies as ai.errors.NetworkFailure (ai.errors.classify_http maps >=500 there). Classifying the in-body form as InvalidRequest instead would make it permanently non-retryable under ai.Retry's default judgment, purely because of which envelope the provider chose.

Reference version

Signature

function openai.internal._transient_code(code: string) -> bool

(internal) Error codes that name a TRANSIENT provider-side failure. The Responses API's own response.failed example is {"code":"server_error", …} — a 500 delivered inside a 200 body — and the same failure arriving as an HTTP status classifies as ai.errors.NetworkFailure (ai.errors.classify_http maps >=500 there). Classifying the in-body form as InvalidRequest instead would make it permanently non-retryable under ai.Retry's default judgment, purely because of which envelope the provider chose.

Source:<builtin>/openai/ns_internal/responses.bamlbytes 3031130586