Skip to content

fix: honor retry-after in provider fetchers#2059

Draft
RerankerGuo wants to merge 1 commit into
MemTensor:mainfrom
RerankerGuo:fix/retry-after-backoff
Draft

fix: honor retry-after in provider fetchers#2059
RerankerGuo wants to merge 1 commit into
MemTensor:mainfrom
RerankerGuo:fix/retry-after-backoff

Conversation

@RerankerGuo

Copy link
Copy Markdown

Description

Fixes #1620.

LLM and embedding provider fetchers now honor the upstream Retry-After header before retrying transient HTTP responses. The parser supports integer seconds and HTTP-date values, and falls back to the existing exponential backoff when the header is absent or invalid.

Related Issue (Required): Fixes #1620

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

  • cd apps/memos-local-plugin && npm test -- --run tests/unit/llm/fetcher.test.ts tests/unit/embedding/fetcher.test.ts passed with 22 tests.
  • cd apps/memos-local-plugin && npm run lint passed.
  • make format could not run because poetry is not installed: make: poetry: Command not found.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation, if applicable
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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.

429 retry handling ignores Retry-After header in LLM and embedding fetchers

1 participant