Skip to content

Conversation

@dcbartlett
Copy link
Collaborator

@dcbartlett dcbartlett commented Dec 7, 2025

Related GitHub Issue

Closes: #

Description

Adds a timeout to the OpenAI Compatable Provider Client. This instructs the client to wait for the configured amount of timeout before giving up on the xhr request and marking it as an error.

Test Procedure

Run Added test.

npx vitest run api/providers/__tests__/base-openai-compatible-provider.spec.ts api/providers/__tests__/base-openai-compatible-provider-timeout.spec.ts api/providers/utils/__tests__/timeout-config.spec.ts

Manual testing can be done by using the provider with the cloud service and monitoring for timeout failures. The Client should recover more quickly and continue on with the agentic loop when a timeout occurs.

Pre-Submission Checklist

  • [-] Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • [-] Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • [-] Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Documentation Updates


Important

Adds a configurable timeout to the OpenAI Compatible Provider Client, with tests to ensure correct application and handling of timeout values.

  • Behavior:
    • Adds timeout to BaseOpenAiCompatibleProvider in base-openai-compatible-provider.ts using getApiRequestTimeout().
    • Timeout is applied to OpenAI client requests, allowing for custom, default, and zero timeout values.
  • Testing:
    • New test file base-openai-compatible-provider-timeout.spec.ts added.
    • Tests ensure getApiRequestTimeout is called and timeout values are correctly passed to OpenAI client.
    • Handles cases for default, custom, and zero timeout values.
  • Utilities:
    • Mocks getApiRequestTimeout in timeout-config to simulate different timeout scenarios.

This description was created by Ellipsis for 6b77a9a. You can customize this summary. It will automatically update as commits are pushed.

@dcbartlett dcbartlett requested review from cte, jr and mrubens as code owners December 7, 2025 06:34
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Dec 7, 2025
@dcbartlett dcbartlett self-assigned this Dec 7, 2025
@roomote
Copy link
Contributor

roomote bot commented Dec 7, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. The implementation correctly adds timeout configuration to the OpenAI Compatible Provider Client. All tests pass and the code follows project standards.

Summary:

  • ✅ Timeout properly integrated into OpenAI client constructor
  • ✅ Comprehensive test coverage for timeout scenarios
  • ✅ Proper validation and edge case handling
  • ✅ All existing and new tests passing

No issues found.

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Dec 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

3 participants