Fix: add retry logic to LiteLLM embedding for transient 500 errors#396
Merged
ArnavAgrawal03 merged 3 commits intomainfrom Apr 2, 2026
Merged
Fix: add retry logic to LiteLLM embedding for transient 500 errors#396ArnavAgrawal03 merged 3 commits intomainfrom
ArnavAgrawal03 merged 3 commits intomainfrom
Conversation
The embedding path lacked num_retries, causing OpenAI 500 errors to propagate as unhandled exceptions. The completion path already uses num_retries=3; this aligns embedding to match. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The test was running the Morphik container standalone without any database or cache, causing the entrypoint to timeout waiting for PostgreSQL. Now spins up pgvector and Redis containers in a shared Docker network, fixes the POSTGRES_URI scheme, and disables ColPali to avoid loading ML models in CI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Settings model expects a list[str] for MORPHIK_EMBEDDING_API_DOMAIN but the CI test config provided a plain string. Fixed by: 1. Using a list in the CI test TOML config 2. Adding a defensive str-to-list coercion in config.py for robustness Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
num_retries=3to thelitellm.aembedding()call, matching the retry behavior already present in the completion path.Test plan