Skip to content

Throttle Gemini RAG embedding calls#73

Merged
rktclgh merged 1 commit into
developfrom
issue/be-rag-embedding-rate-limit
May 28, 2026
Merged

Throttle Gemini RAG embedding calls#73
rktclgh merged 1 commit into
developfrom
issue/be-rag-embedding-rate-limit

Conversation

@rktclgh

@rktclgh rktclgh commented May 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • serialize Gemini embedding calls with a configurable minimum request interval
  • retry 429/5xx embedding failures with Retry-After aware exponential backoff
  • expose miniserver/app config knobs for provider quota tuning

Why

After PR #71 deployed, comprehensive RAG reload no longer hit the removed endpoint, but UserData indexing failed once Gemini returned 429 Too Many Requests. This keeps the reload and reservation-triggered user-data reindex path from dropping embeddings under burst quota.

Verification

  • ./gradlew test --tests com.fairing.fairplay.ai.rag.service.EmbeddingServiceTest --no-daemon
  • ./gradlew test --no-daemon

Review notes

  • CodeRabbit/Gemini rate limits are non-blocking per project policy; actionable findings will still be handled.

The live reload now reaches the current Gemini embedding endpoint, but comprehensive user-data indexing can still outrun provider quota and fail with 429. Serialize embedding requests through a configurable per-process interval and retry transient provider failures with Retry-After aware backoff.

Constraint: Gemini embedding quota can reject bursty comprehensive reloads with 429

Rejected: Enable deterministic fallback vectors | would store low-quality vectors and hide provider failures

Confidence: high

Scope-risk: narrow

Tested: ./gradlew test --tests com.fairing.fairplay.ai.rag.service.EmbeddingServiceTest --no-daemon

Tested: ./gradlew test --no-daemon

Co-authored-by: OmX <omx@oh-my-codex.dev>
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@rktclgh, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 44 minutes and 41 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 15382fe6-3428-4f84-9946-dc48e5427bfe

📥 Commits

Reviewing files that changed from the base of the PR and between cadd961 and 54a3a8e.

📒 Files selected for processing (4)
  • deploy/miniserver.env.example
  • src/main/java/com/fairing/fairplay/ai/rag/service/EmbeddingService.java
  • src/main/resources/application.yml
  • src/test/java/com/fairing/fairplay/ai/rag/service/EmbeddingServiceTest.java
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue/be-rag-embedding-rate-limit

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rktclgh rktclgh merged commit 0c8778f into develop May 28, 2026
2 checks passed
@rktclgh rktclgh deleted the issue/be-rag-embedding-rate-limit branch May 28, 2026 05:29
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