Repository navigation
fix: bound unset LLM request timeout (600s) instead of litellm's 6000s default - #5972
Conversation
…0s (fixes #5968) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
@coderabbitai review |
|
/review |
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
|
[Medium impact] The changes appear safe to merge; no blocking issues were found. SummaryUnset
Reviews (2) · Last reviewed commit: "fix: waive LLM.__init__.timeout signatur..." · Reviewed by Greptile |
|
@claude You are the FINAL architecture reviewer. If the branch is under MervinPraison/PraisonAI (not a fork), you are able to make modifications to this branch and push directly. SCOPE: Review changes in this PR. Python SDK: praisonaiagents, praisonai. TypeScript SDK: src/praisonai-ts/. Do NOT modify src/praisonai-rust. Read ALL comments above from Gemini, Qodo, CodeRabbit, and Copilot carefully before responding. MANDATORY READ (before reviewing):
Phase 1: Review per AGENTS.md
MANDATORY COMMENT FORMAT — include this Phase 1 table in your review comment: Phase 1 — AGENTS.md review
For TypeScript PRs (src/praisonai-ts/), also add: Phase 2: FIX Valid Issues Phase 3: Final Verdict |
…SDK's 600s default) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Final architecture review — PR #5972Phase 1 — AGENTS.md review
Phase 2 — Fixes pushed (commit 46ebf06)Prior reviewers (Greptile 5/5, CodeRabbit, Qodo) raised no actionable findings. Qodo's review is paused for billing. The one blocking issue was the failed signatures CI check:
Verification
Phase 3 — Verdict✅ Approve. Every Phase 1 row passes and the blocking CI failure is resolved. |
|
Merge gate scan — eligible for assessment. Claude merge gate will assess and may auto-merge on an APPROVE verdict. |
|
MERGE_GATE_VERDICT: APPROVE Rationale (HEAD 46ebf06):
|
|
Merged by Claude PR merge gate ( |
Fixes #5968
What
LLM(timeout=...)defaulted toNone, so notimeoutwent to litellm and its 6000 s (100 min)request_timeoutceiling applied. A provider that accepts the connection and never answers held the turn that long on every attempt.This PR uses a sentinel default, so an unset
timeoutnow resolves to 600 s. That matches the OpenAI SDK default the bare-model-name path (llm="gpt-4o-mini") already uses, so both routes now have the same bound. For streams it limits the gap between reads, so a slow stream that keeps sending data is not cut off.timeout=Noneor0passed explicitly → same as before: no timeout sent, unbounded (llm={"model": ..., "timeout": None}).timeout=N→ forwarded unchanged.agent.pyis untouched.Why 600 s and not 120 s
A non-streaming call gets no bytes back until the model finishes. High-effort reasoning models often take more than 2 minutes, so 120 s would break working setups. 600 s still cuts the stall from 100 min to 10 min.
Out of scope (deliberately)
I left the
ToolConfig.timeoutdefault atNone. A finite default would abandon tools that legitimately run long or block, such as human-input/approval prompts, long shell/code runs and crawls. Abandoning a thread also doesn't stop it, so the worker stays pinned anyway. Per-toolToolConfig(timeout=...)is still available.Tests
tests/unit/llm/test_default_request_timeout.py. Covers the default, explicitNone/0opt-out and explicit values, for both the completion and Responses param builders.tests/unit: 12278 passed. The 27 failures are all pre-existing onmain(missing optional deps fastapi, starlette and chonkie, plus timing-sensitive tests); I checked by re-running them with this change stashed.🤖 Generated with Claude Code