Skip to content

Fix OpenAI SDK request forwarding - #2582

Open
Danielxu0208 wants to merge 1 commit into
open-compass:mainfrom
Danielxu0208:agent/fix-openai-sdk-contract
Open

Fix OpenAI SDK request forwarding#2582
Danielxu0208 wants to merge 1 commit into
open-compass:mainfrom
Danielxu0208:agent/fix-openai-sdk-contract

Conversation

@Danielxu0208

Copy link
Copy Markdown

Summary

  • forward the effective generation temperature to OpenAI SDK requests
  • delegate OpenAISDKStreaming(stream=False) to the parent request path with the correct signature
  • avoid duplicate preprocessing and rate-limit acquisition in the non-streaming fallback
  • add request-level mock regression coverage

Why

OpenAISDK._generate received the effective temperature from generate but sent self.temperature, which is normally None. The streaming adapter's disabled-stream fallback also passed an extra positional timeout argument to the parent method, so generation failed with TypeError despite initialization succeeding.

Validation

  • default and per-call temperatures reach the SDK request
  • constructor temperature keeps precedence over per-call values
  • stream=False returns a normal response and does not send the streaming flag
  • relevant pre-commit hooks passed
  • modified files compile successfully

@Danielxu0208
Danielxu0208 marked this pull request as ready for review August 6, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants