You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text API cases exercise LiteLLM's existing chat-to-text bridge. They do not claim native OpenAI /v1/completions transport coverage. No provider responses are fabricated, tests skipped, callback internals reset, or protected assertions removed. The old gpt-instruct configuration remains for tests that specifically exercise native text providers
CircleCI pipeline 90628 recorded the original failures at bda2763f2c722d617171e71deb331d3de7d345e7. This PR excludes the four cases already fixed by #43676 and the separate changes in #43902
Validation
Merge-base test sources: 8 failed, 2 passed, all eight failures still selected retired fixtures
Current tip with real OpenAI and an isolated PostgreSQL-backed proxy: 10 passed
Temporary product mutations broke engine precedence, finish reasons, SDK/proxy usage, function assembly, fallback authorization, and custom fallback messages: every corresponding test failed
Bypassing both fallback authorization checks caused both denied variants to fail with DID NOT RAISE PermissionDeniedError
Dropping custom fallback messages made the revised live input-usage comparison fail as 10 != 33; its direct controls use identical request settings
Restoring product source returned 10 passed
make check: PASS, including test-tree lint and the test-quality budget
Current-head automatic CI is terminal: 90 passed, 5 failed, 1 skipped. The failures are outside this change: documentation and code-quality report the same three undocumented ClickHouse environment keys, proxy-endpoints reproduces two existing malformed Request mocks, and misc retains the four Google contract lookup failures. Proxy-behavior passed all 929 tests, then failed Codecov download signature verification
Greptile's current-head review is 5/5, with all findings resolved. Veria and patch coverage passed; no Bugbot result is available. Buildkite passed its gate-only job and did not execute these legacy live tests. No automatically created CircleCI pipeline was observed for this branch
Screenshots / Proof of Fix
Both fixture models were configured on an isolated proxy at http://127.0.0.1:59538, backed by its own PostgreSQL/Redis, with real OpenAI credentials. The existing CI setting allowing forced fallback requests was enabled. Product source was identical in both runs; only the selected fixture changed. Temporary generated keys were deleted after these HTTP probes
The streaming proof used this command with FIXTURE_MODEL=gpt-instruct before and FIXTURE_MODEL=gpt-6-luna after:
POST /v1/completions with {"model":"gpt-instruct","prompt":"hey","stream":true,"stream_options":{"include_usage":true},"max_tokens":4,"temperature":0.00000001}
Generate keys with models:["gpt-3.5-turbo"], and with the fallback gpt-instruct additionally allowed
POST /v1/chat/completions using the primary model, mock_testing_fallbacks:true, and fallbacks:["gpt-instruct"]; repeat with a fallback object containing custom messages
Observe HTTP 403 for both denied variants and HTTP 500 for both authorized variants, with the nested fallback retirement failure
Send the same request with fixture model:"gpt-6-luna"
Observe HTTP 200, nonempty text, four SSE chunks, and final usage {prompt_tokens:7,completion_tokens:4,total_tokens:11}
Fallback authorization and messages
Generate the same key variants with fallback gpt-6-luna
Send the same requests with the longer custom weather prompt, then call the fallback model directly with each prompt as positive controls
Observe HTTP 403 for both denied variants and HTTP 200 for both authorized variants; the custom fallback and custom direct control each report 33 prompt tokens, while the original-message control reports 10
The test compares the two live controls rather than hardcoding token counts or provider response wording
Caveats
Medium
Ten other retired-fixture failures remain outside this repair
Three specifically exercise retired native OpenAI transport
Two exercise batching the live chat bridge cannot preserve
Four exercise native echo or integer logprobs
One depends on the separately deferred callback registration defect
OpenAI's retirement inventory covers all three models named by the native completion API. Bounded live probes confirmed the documented replacement gpt-5.6-terra rejects native completions, echo, and integer logprobs; the bridge also collapses string batches and rejects token-ID batches. Those tests are left visible instead of weakening their contracts
Pre-Submission checklist
Meaningful assertions and negative controls included
Focused live tests pass locally
All required CI/CD checks pass
Scope isolates one fixture-retirement problem
Greptile confidence 5/5 on current tip, all findings resolved
[Medium risk] Test fixtures updated to use new model and configuration.
The PR appears safe to merge; no outstanding finding or new actionable issue was identified.
Summary
The PR replaces retired OpenAI fixtures in live completion, streaming, function-call, and fallback tests. The latest changes annotate the reviewed assignments with Final and replace an exact provider-reply assertion with live prompt-usage controls.
The streaming finding was withdrawn after verification.
The two remaining previous findings are addressed by the current code.
@greptileai Please review 1ba94a2: Final annotations fixed, provider wording replaced with live usage controls, and streaming finding withdrawn after runtime verification
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
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:
gpt-6-lunawith reasoning disabledUser Flow
Before: a contributor's live conformance requests stop at retired models
/v1/completionsusing the configured fixture/v1/chat/completionswith an authorized fallbackAfter: the contributor can verify these behaviors against a supported model
/v1/completionsusing the refreshed fixture/v1/chat/completionswith an authorized fallbackScope and coverage
This repairs eight original failing cases, with ten focused executions including both denied-access variants
test_completion_openai_engine_and_model,test_completion_openai_engineengine; engine-only selection works; text is nonemptytest_async_text_completion_streamtest_openai_stream_options_call_text_completiontest_completion_streaming_usage_metrics/completionsfinal prompt/completion/total usagetest_completion_openai_with_functionsfunctionsrequest; actual streamed function name and JSON argumentsThe text API cases exercise LiteLLM's existing chat-to-text bridge. They do not claim native OpenAI
/v1/completionstransport coverage. No provider responses are fabricated, tests skipped, callback internals reset, or protected assertions removed. The oldgpt-instructconfiguration remains for tests that specifically exercise native text providersCircleCI pipeline 90628 recorded the original failures at
bda2763f2c722d617171e71deb331d3de7d345e7. This PR excludes the four cases already fixed by #43676 and the separate changes in #43902Validation
DID NOT RAISE PermissionDeniedErrormake check: PASS, including test-tree lint and the test-quality budgetCurrent-head automatic CI is terminal: 90 passed, 5 failed, 1 skipped. The failures are outside this change: documentation and code-quality report the same three undocumented ClickHouse environment keys, proxy-endpoints reproduces two existing malformed Request mocks, and misc retains the four Google contract lookup failures. Proxy-behavior passed all 929 tests, then failed Codecov download signature verification
Greptile's current-head review is 5/5, with all findings resolved. Veria and patch coverage passed; no Bugbot result is available. Buildkite passed its gate-only job and did not execute these legacy live tests. No automatically created CircleCI pipeline was observed for this branch
Screenshots / Proof of Fix
Both fixture models were configured on an isolated proxy at
http://127.0.0.1:59538, backed by its own PostgreSQL/Redis, with real OpenAI credentials. The existing CI setting allowing forced fallback requests was enabled. Product source was identical in both runs; only the selected fixture changed. Temporary generated keys were deleted after these HTTP probesThe streaming proof used this command with
FIXTURE_MODEL=gpt-instructbefore andFIXTURE_MODEL=gpt-6-lunaafter:Before (52b9fa2)
Text stream usage
/v1/completionswith{"model":"gpt-instruct","prompt":"hey","stream":true,"stream_options":{"include_usage":true},"max_tokens":4,"temperature":0.00000001}gpt-3.5-turbo-instructFallback authorization and messages
models:["gpt-3.5-turbo"], and with the fallbackgpt-instructadditionally allowed/v1/chat/completionsusing the primary model,mock_testing_fallbacks:true, andfallbacks:["gpt-instruct"]; repeat with a fallback object containing custom messagesAfter (1ba94a2)
Text stream usage
model:"gpt-6-luna"{prompt_tokens:7,completion_tokens:4,total_tokens:11}Fallback authorization and messages
gpt-6-lunaCaveats
Medium
OpenAI's retirement inventory covers all three models named by the native completion API. Bounded live probes confirmed the documented replacement
gpt-5.6-terrarejects native completions,echo, and integerlogprobs; the bridge also collapses string batches and rejects token-ID batches. Those tests are left visible instead of weakening their contractsPre-Submission checklist
Type
Test