Skip to content

Commit

Permalink
test(openai): do not check content length when stopped for max tokens
Browse files Browse the repository at this point in the history
The test_openai_chat_complete_with_tokens_limitation_on_reasoning_models test
is failing randomly. Sometimes the LLM returns content when it is stopped for
length reasons. Sometimes it doesn't. Drop the assertion.
  • Loading branch information
jgpruitt committed Feb 12, 2025
1 parent 3aceda7 commit 1af7384
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/extension/tests/test_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def test_openai_chat_complete_with_tokens_limitation_on_reasoning_models(

if stopped:
assert finish_reason == "length"
assert len(content) == 0
# assert len(content) == 0 have experienced issues with this line. sometimes content is returned
else:
assert len(content) > 0

Expand Down

0 comments on commit 1af7384

Please sign in to comment.