Skip to content

Add HTTP 499 and 504 to transient error codes for model fallback #41467

@zeroasterisk

Description

@zeroasterisk

TRANSIENT_HTTP_ERROR_CODES in src/agents/pi-embedded-helpers/errors.ts is missing 499 (Client Closed Request) and 504 (Gateway Timeout).

  • 499: Commonly returned by Anthropic during overload. Currently doesn't trigger model fallback unless the error message happens to match a pattern.
  • 504: Standard gateway timeout. Should obviously be transient.

Both should be in the set so they trigger fallback to the next model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions