Skip to content

[Reliability]: Implement Exponential Backoff for Gemini API #50

@Kavirubc

Description

@Kavirubc

Problem Statement

The current embedding and LLM integrations for Gemini (internal/integrations/gemini/) do not handle rate limiting (HTTP 429) or transient network errors. When processing high-volume requests (like bulk indexing or frequent triaging), the pipeline fails immediately upon hitting a rate limit.

Proposed Solution

  • Implement a retry mechanism with exponential backoff for:
    • internal/integrations/gemini/embedder.go: Embed and EmbedBatch methods.
    • internal/integrations/gemini/llm.go: All generative methods (AnalyzeIssue, RouteIssue, etc.).
  • Ensure retries only occur on transient errors (429, 5xx) and NOT on client errors (400, 403, 404).

Context

Identified during self-hosting configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreRelated to core engineenhancementNew feature or requesthelp wantedExtra attention is neededreliabilityv0.2.0Target for v0.2.0

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions