Repository navigation
test(e2e): backport Together structured-output and text-completion fixes to stable/1.103.x - #44437
Merged
Merged
Conversation
Partial backport to stable/1.103.x: only the Together AI structured-output e2e case moves to the hybrid reasoning backend with reasoning off, since the reasoning-only model it picked returned no content. The CI infrastructure and other test repairs are not needed for this line's e2e suite (cherry picked from commit 6ca90b9)
…ted contracts (#43902) Partial backport to stable/1.103.x: only the text completion endpoint test moves off the retired gpt-3.5-turbo-instruct to openai/gpt-5.4-nano with reasoning off. This line predates the OpenAI SDK rewrite of the test, so reasoning_effort goes through EndpointsClient.text_completions instead of extra_body. The SAIL, spend-log and coverage registry repairs are not needed for this line's e2e suite (cherry picked from commit e61733b)
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Contributor
|
yuneng-berri
approved these changes
Oct 3, 2026
This branch is waiting to be deployed
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.
TLDR
Problem this solves:
How it solves it:
HYBRID_REASONING_BACKENDwithreasoning_effort="none"openai/gpt-5.4-nanowith reasoning offUser Flow
Before: a maintainer re-running the stable/1.103.x e2e suite sees two red tests unrelated to litellm code
test_response_format_json_schema_shapes_the_replyfails because the reply content isNonetest_text_completion_returns_textfails with a 404 from OpenAI forgpt-3.5-turbo-instructAfter: the same run exercises both behaviors on models that still answer
openai/gpt-5.4-nanowith reasoning off and gets text backRelevant issues
Backports part of #43983 and #43902
Affected release
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/test_litellm/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more@greptileaito re-request a review after pushing changes)Delays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
No live provider runs were made for this test-only backport. The maintainer re-runs Buildkite e2e on the line after merge. The proof here is that both files collect cleanly and that the Together hunks match main exactly
Before (8a7280e)
After (ff65781)
Collect-only
PYTHONPATH=tests/e2e:tests/e2e/llm_translation uv run --no-sync pytest tests/e2e/llm_translation/test_together_ai_e2e.py tests/e2e/llm_translation/test_completions_endpoint_e2e.py --collect-only -q -c tests/e2e/pytest.iniuv run --no-sync basedpyrighton the three touched files:0 errors, 0 warnings, 0 notesHunk equality, Together
f=tests/e2e/llm_translation/test_together_ai_e2e.py; diff <(git diff 6ca90b927c8^ 6ca90b927c8 -- $f | grep '^[+-][^+-]') <(git diff origin/stable/1.103.x..HEAD -- $f | grep '^[+-][^+-]')Hunk equality, text completion
e61733b1701andtests/e2e/llm_translation/test_completions_endpoint_e2e.pyreasoning_effortline differs, as expected:This line predates the OpenAI SDK rewrite of the test (LIT-4577), so the test still calls
EndpointsClient.text_completions.reasoning_effortis added there as an optional field onCompletionsRequest, and the e2e transport drops it from the body when unset, so other callers send the same request as beforeType
✅ Test
Caveats (if any)
Low
endpoints_client.pyis a third file, needed because the line has nosdk_clients.pyQA runbook
tests/e2e/llm_translation/test_together_ai_e2e.py::TestTogetherChatCompletions::test_response_format_json_schema_shapes_the_reply - a json_schema response_format on Together comes back as JSON matching the schema
together_ai/Qwen/Qwen3.5-9BandTOGETHERAI_API_KEYreasoning_effort: "none"and a json_schemaresponse_formattests/e2e/llm_translation/test_completions_endpoint_e2e.py::TestCompletionsEndpoint::test_text_completion_returns_text - /v1/completions returns real generated text
openai/gpt-5.4-nanoandOPENAI_API_KEYmax_tokens: 32,reasoning_effort: "none"choices[0].textFinal Attestation
Link to Devin session: https://app.devin.ai/sessions/86e3e785e8564ef5b53fabc96ae7a4c6
Open in Devin Desktop: https://app.devin.ai/desktop/session/86e3e785e8564ef5b53fabc96ae7a4c6?variant=devin