Repository navigation
fix(ai): forward request timeout caps through intent classification - #373
Merged
brokermr810 merged 1 commit intoNov 13, 2026
Merged
Conversation
Signed-off-by: Amazingz <amazingzsys@gmail.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
brokermr810
approved these changes
Nov 13, 2026
brokermr810
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed timeout propagation through safe_call_llm and intent-classification coverage. Each intent-classification request is capped at 20 seconds; this is intentionally a per-request cap rather than a total multi-provider deadline. Backend tests and security checks passed; the pip-audit failure is the pre-existing soupsieve 2.9 baseline on main.
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
call_llm_apialready accepts a caller-specific timeout, butsafe_call_llmcannot forward it. Intent classification therefore uses the provider's full request timeout before returning its existing fallback plan. Add an optional keyword-only timeout and use a 20-second request cap for classification.Related issue
Small internal timeout propagation fix; no matching open PR found.
Changes
Test plan
python -m pytest tests/test_llm_request_timeout.py tests/test_llm_litellm_provider.py tests/test_ai_copilot_latency.py -q— 62 passed.ruff check app/services/llm.py app/routes/ai_chat.py tests/test_llm_request_timeout.py— passed.python scripts/backend_quality_check.pyandgit diff --check— passed.API documentation
No public HTTP contract, migration, or runtime dependency changes.