Repository navigation
fix(openai-client): retry transient 5xx on embeddings calls - #170
Merged
Merged
Conversation
…R-9G) The Milvus storage link calls OpenAI/LiteLLM embeddings with max_retries=0, so any transient upstream 503 (e.g. proxy "upstream connect error / connection termination") surfaces as an unhandled InternalServerError. Embeddings are idempotent — retry is safe. - get_openai_client() gains an optional max_retries kwarg (default 0, so existing callers keep current behavior). - Milvus embeddings save passes max_retries=3. Co-Authored-By: Claude Opus 4.7 (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
get_openai_client(), which constructs the SDK client withmax_retries=0. Any transient upstream 503 from the proxy or provider (e.g.upstream connect error … reset reason: connection termination) therefore surfaces immediately as an unhandledInternalServerError.get_openai_client(opts=None, max_retries=0)now takes an explicit kwarg. Default of0preserves existing behavior for every other caller; the Milvus embeddings path passesmax_retries=3.Test plan
get_openai_client()still constructs clients withmax_retries=0when no override is passed.🤖 Generated with Claude Code