Chore: GenAI hygiene and Spring->GenAI read timeout - #355
Conversation
|
Warning Review limit reached
Next review available in: 57 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
ladu-tu
left a comment
There was a problem hiding this comment.
Good catch regarding the Spring timeout!
What does this PR do?
Cleanup around the GenAI service plus one cross-service timeout fix. No behaviour change to the AI endpoints themselves.
RELEASE_TYPE,APP_VERSION,IMAGE_TAG), the commented-out# ENTRYPOINT ["sleep", "600"]debug line, and the duplicateWORKDIR /app. Also pinned both base images by digest (ghcr.io/astral-sh/uv:python3.14-alpineandpython:3.14-alpine), which is what the client and Spring Dockerfiles already do.dependencieslisteduvicorn,pydantic, andlangchain-openaitwice; removed the duplicates. Bumped the version from 5.0.0 to 6.0.0 so genai lines up with the Spring services (also updatedapp/main.py'sSERVICE_VERSION, which feeds the FastAPI version and theapplication_versionmetric, and thealexandria-genaientry inuv.lock).GenAiClients (knowledgebase- and qa-service) used a 30s read timeout, but the GenAI chat budget isLLM_TIMEOUT_SECONDS=60 with 2 retries, i.e. up to 180s worst case. So Spring could abandon a long-document request at 30s while GenAI kept working (and spending tokens) on something nobody was waiting for. Raised the read timeout to 200s so it sits above GenAI's worst case, rather than shortening GenAI, so the long-document requests the system is built for don't get cut off mid-flight.Type of change
Definition of Done
api/openapi.yamlis updated and lint passesdocker compose up)Notes for the reviewer
/askpath does an embedding call plus the chat call, so in a pathological double-worst-case (both maxing out their retries) it could exceed 200s, but that only happens if GenAI is already badly degraded. If you'd rather cap the total instead, the alternative was shortening GenAI's own budget; I went with raising Spring per our discussion.