Skip to content

Conversation

a-klos
Copy link
Member

@a-klos a-klos commented Sep 3, 2025

This pull request introduces configurable retry behavior for the StackitEmbedder, allowing for fine-grained control of retry and backoff parameters via environment variables, Helm chart values, or code. The changes ensure that retry settings can be overridden per embedder instance, falling back to shared defaults when not specified. Documentation and dependency injection are updated to reflect this new flexibility.

Embedder Retry Configuration

  • Added new optional retry-related fields (max_retries, retry_base_delay, retry_max_delay, backoff_factor, attempt_cap, jitter_min, jitter_max) to the StackitEmbedderSettings model, allowing per-embedder overrides of retry/backoff parameters. [1] [2]
  • Updated the StackitEmbedder implementation to use a shared retry decorator with exponential backoff, resolving settings from both StackitEmbedderSettings and fallback RetryDecoratorSettings. The retry logic now handles OpenAI API errors and rate limits robustly. [1] [2] [3]

Dependency Injection and Configuration

  • Modified the dependency container to inject both StackitEmbedderSettings and RetryDecoratorSettings into the StackitEmbedder, supporting the new configuration pattern. [1] [2] [3]
  • Added corresponding environment variable keys to the Helm chart (values.yaml), enabling retry configuration via deployment configuration for both backend and adminBackend services. [1] [2]

Documentation Updates

  • Documented the new retry configuration mechanism in libs/README.md, explaining how override and fallback resolution works, and how to configure via environment variables and Helm chart values. [1] [2]

tackles following issue:
#87

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant