Skip to content

Set OpenAI budget alert: embeddings are the app's single billing point of failure #266

Description

@MinhHaDuong

Context

On 2026-06-22 Cirdi was down: every query returned HTTP 500. Root cause was an OpenAI 429 insufficient_quota — the OpenAI account ran out of credit. R2R embeds every query with openai/text-embedding-3-small (the retrieval step), so an exhausted OpenAI quota 500s every request even though generation runs on Mistral. Health endpoint stayed ok throughout, which masked the cause.

This is a single point of failure with no early warning, and it will recur.

Actions

  • On the OpenAI project behind OPENAI_API_KEY, set a monthly budget limit and a usage/balance alert email (well below the hard cap).
  • Document in deploy/ that embeddings depend on OpenAI billing, distinct from the Mistral generation account.
  • Note: Anthropic offers no embeddings API, so Claude credit cannot cover this step.

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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