Make the OpenAI-compatible LLM request timeout configurable #732
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.65) × (1 − Review Confidence (0.58)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.65 · 214 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.321
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.065
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #732"
general
weight: 0.35
jackboyla
What
Adds
--responses_api_request_timeout_s(default20.0, unchanged) to the OpenAI-compatible LLM backends (chat-completionsandresponses-api). The field lives onResponsesApiLanguageModelHandlerArguments(inherited byChatCompletionsLanguageModelHandlerArguments), sonormalize_dataclass_configstrips the prefix and it plumbs straight into the existingBaseOpenAICompatibleHandler.request_timeout_s— no handler changes needed.Why
The read timeout bounds the wait for the upstream model to start answering. With agent-style backends — an OpenAI-compatible endpoint that runs a full tool-using agent turn before replying (self-hosted assistant servers, MCP orchestrators, etc.) — replies routinely take 20-60s. Today the request dies at the hardcoded 20s, the pipeline speaks
PROVIDER_FAILURE_FALLBACK("I'm having trouble responding right now. Please try again." — the fallback added in #471), and long agent turns become unusable over voice.Real-world reproduction: pointing
chat-completionsat a self-hosted agent server where every turn takes 15-40s, every longer reply triggered the fallback; at 90s the same turns complete. The connect timeout remains capped at 10s (min(10.0, request_timeout_s)) exactly as before, and the default is unchanged so existing deployments see no behavior difference.Tests
chat-completions,responses-api)tests/test_cli_defaults.py: 106 passedUsage:
speech-to-speech serve --llm_backend chat-completions --responses_api_base_url https://my-agent.example/v1 --responses_api_api_key ... --responses_api_request_timeout_s 90