fix: websearch E2E preventing reasoning token loops#167
Open
Conversation
Member
Author
|
I’ve run the test many times and it now passes consistently. The earlier intermittent failures were likely caused by reasoning hallucinations from gpt-oss-20b. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes websearch E2E tests to prevent reasoning token loops by making the tests more deterministic and constraining response generation. The changes apply uniform adjustments across four test files covering both responses and chat completions API endpoints.
Key changes:
- Reduced temperature from 0.2 to 0.01 for more deterministic outputs
- Added explicit instruction "Answer in 10 words maximum and do not reason" to prevent lengthy reasoning loops
- Removed
max_output_tokensparameter fromtest_responses_http.py
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/e2e/test_responses_http.py | Updated web search test with lower temperature (0.01), added response constraint instructions, and removed max_output_tokens parameter |
| tests/e2e/test_responses.py | Updated web search test with lower temperature (0.01) and added response constraint instructions |
| tests/e2e/test_chat_completions_http.py | Updated web search test with lower temperature (0.01) and added response constraint instructions to system message |
| tests/e2e/test_chat_completions.py | Updated web search test with lower temperature (0.01) and added response constraint instructions to system message |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jcabrero
approved these changes
Jan 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.