Repository navigation
fix(onboard): fit streaming probe within phase budget - #8038
Conversation
Signed-off-by: Senthil Ravichandran <[email protected]>
📝 WalkthroughWalkthroughThe Responses API streaming probe timeout changed from 12 seconds to 5 seconds. Chat Completions fallback behavior remains unchanged. Tests and documentation now cover the updated timeout and fallback sequence. ChangesStreaming probe timeout
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant OnboardingValidation
participant ResponsesAPI
participant ChatCompletionsAPI
OnboardingValidation->>ResponsesAPI: Probe streaming events for up to 5 seconds
ResponsesAPI-->>OnboardingValidation: No response.output_text.delta
OnboardingValidation->>ChatCompletionsAPI: Run fallback validation
ChatCompletionsAPI-->>OnboardingValidation: Return fallback result
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in commit 134e9cb in the TypeScript / code-coverage/cliThe overall coverage in commit 134e9cb in the Show a code coverage summary of the most impacted files.
Updated |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/inference/understand-provider-validation.mdx`:
- Line 40: In the Responses streaming description, format the API event
identifier response.output_text.delta as inline code by wrapping it in
backticks; leave the surrounding prose unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 57f0e614-a86d-416a-915d-cb546f499b07
📒 Files selected for processing (6)
docs/changelog/2026-07-31.mdxdocs/inference/understand-provider-validation.mdxsrc/lib/inference/onboard-probes.test.tssrc/lib/inference/openai-validation-session.test.tssrc/lib/inference/probe-http-helpers.test.tssrc/lib/inference/probe-http-helpers.ts
PR Review Advisor — No blocking findings reportedAdvisor assessment: No blocking advisor findings reported Model lanes
2 additional E2E selections from the second opinionAdvisory only. The primary lane did not select these E2E jobs or targets.
Second-opinion E2E selections are advisory. They do not change the primary assessment or E2E / PR Gate. E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
Summary
Onboarding could spend 12 seconds on a stalled Responses API stream even though the calibrated full-E2E inference-phase budget is 6 seconds. This change limits that probe to the budget's existing 5-second headroom, preserves Chat Completions API fallback, and leaves the E2E budget unchanged.
Changes
No new abstraction, configuration, fallback, migration, compatibility path, or supported surface is added. The existing custom-endpoint onboarding flow and Chat Completions API fallback are the current consumers.
The product root cause was a source deadline introduced after the blocking phase gate without checking the two contracts together. The detection gap was that PR #7884 tested the 12-second value in isolation; the full-E2E run exercised the real stalled-stream path and measured 11,950 ms for the inference phase.
Type of Change
Quality Gates
134e9cbf77d43859bbaf84c5d02d3005ac847b5b. All nine categories pass. The diff changes no credential, input-validation, authorization, dependency, logging, cryptography, configuration, header, policy, or SSRF boundary. Both transports retain authentication, address pinning, and the established Chat Completions API fallback. Focused tests cover the curl and native deadline boundaries.Documentation Writer Review
docs-updateddocs/inference/understand-provider-validation.mdxanddocs/changelog/2026-07-31.mdx, plus changed comments and test titles. Generated OpenClaw, Hermes, and Deep Agents variants render the 5-second deadline. Focused inference tests passed 54 tests with 1 skipped, changelog tests passed 6 tests, the docs build completed with 0 errors and 2 existing warnings, andgit diff --checkpassed.DGX Station Hardware Evidence
scripts/prepare-dgx-station-host.shis unchanged.Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run validate:prpassed after refreshingorigin/mainwhen hooks were skipped or unavailablenpx vitest run --project cli src/lib/inference/probe-http-helpers.test.ts src/lib/inference/onboard-probes.test.ts src/lib/inference/openai-validation-session.test.ts src/lib/inference/openai-validation-session-fallback.test.ts: 4 files passed, 54 tests passed, 1 skipped.npx vitest run test/changelog-docs.test.ts: 1 file and 6 tests passed.npm run docsbuilds without warnings (doc changes only) — the build completed with 0 errors and 2 existing warnings.Signed-off-by: Senthil Ravichandran [email protected]
Summary by CodeRabbit
Improvements
Documentation
Tests