Skip to content

fix: handle HTTP-date in Retry-After header during 429 retries #386

Description

@Yugenjr

Currently, when a rate limit (429) or server load status is received from the LLM provider, OpenAICompatibleProvider.chat attempts to extract the retry delay from the Retry-After header.

According to the HTTP specification, Retry-After can be formatted either as a numeric value in seconds (e.g., 120) or as an HTTP-date string (e.g., Wed, 21 Oct 2015 07:28:00 GMT).

When the LLM API gateway returns a date string, calling float(retry_after) raises a ValueError, crashing the entire scoring execution and preventing successful fallback retries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions