Repository navigation
fix(decisions): preserve missing native usage (#48147) - #48261
Merged
Merged
Conversation
Contributor
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
ishaan-j-berri
force-pushed
the
litellm_fix_typesafe_decisions_48147
branch
from
October 25, 2026 00:23
aa8ea51 to
212219e
Compare
ishaan-j-berri
marked this pull request as ready for review
October 25, 2026 00:34
ishaan-j-berri
enabled auto-merge (squash)
October 25, 2026 00:34
moe-berri
approved these changes
Oct 25, 2026
3 of 19 tasks
yuneng-berri
added a commit
that referenced
this pull request
Oct 28, 2026
…havior (#48665) * test(integration): update stale expectations to intended provider behavior Each expectation moved because a merged PR changed behavior on purpose. - chatgpt string input is wrapped as one user message (#41522) - Gemini 2.5 tool media sits beside function_response (#48428) - sampling knobs move to Gemini 3.5 Flash, which keeps them (#47645) - a body base_model is stripped without allow_client_pricing_override (#47639) - ai_decide answers without usage return usage null (#48261) - azure_ai forwards mapped client anthropic-beta values (#48033) - the OpenCode scripted upstream mints a fresh id per request * test(e2e-ui): type the guardrail name before deleting it GuardrailDeleteModal requires the exact name before Delete enables since #45893. All three guardrail delete flows now go through one helper. * test(observability): accept any sampled traceresponse flags and expect a 400 for a non-object body OpenTelemetry 1.45 (#48055) sets the W3C random trace id flag on new traces, so the gateway's traceresponse now ends in -03. The producer copies the server span's own trace flags, so the tests now accept any two-digit flags with the sampled bit set instead of pinning -01 #48438 made a non-object JSON body a 400 "Invalid JSON payload: expected an object" on purpose, so the [1] body case is renamed non_object_body and expects that 400 * test(observability): stop waiting on OpenTelemetry's export log line in the langtrace outage test The outage test waited for "Exception while exporting Span batch" in the proxy log, which is OpenTelemetry's wording and no longer appears with 1.45. The test keeps asserting what the gateway guarantees, callers unaffected during the outage, a live gateway, and every span after recovery delivered once with no outage span duplicated * test(guardrails): count the Responses disconnect spend rows #47611 added Since #47611 a streamed /v1/responses disconnect writes its own spend row, so the concurrent disconnect test saw 20 rows where it counted 10 by model group. It now reads each row's call type and expects ten acompletion rows with the outage verdict and ten aresponses rows with success. /v1/messages disconnects still write no row on main, so they are left out of the count rather than pinned as absent The responses-httpx case of the single disconnect test no longer needs its LIT-8603 skip and passes * test(observability): size K4's timeout from the harness boot budget K4 boots three two-worker proxies in a row. On CircleCI each boot takes 43 to 58 seconds, so a passing run took 179.97s against its fixed 180s cap and 6 of 30 runs hit pytest-timeout. The cap and the restart gate wait now come from readiness_seconds and graceful_stop_seconds, like other multi-boot tests
3 of 5 tasks
5 of 6 tasks
mateo-berri
pushed a commit
to owen-hj/litellm
that referenced
this pull request
Nov 23, 2026
…I#48261) Backport of BerriAI#48261 to lts/1.108.x (prerequisite of BerriAI#51220). Cherry-picked from cb65a21 (main). Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This was referenced Nov 24, 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.
Fixes #48147
If TypeSafe omits token usage, LiteLLM reports zero tokens and a $0 cost, so you cannot tell an unbilled request from missing billing data. This fix keeps missing usage and SDK cost unknown for native decisions calls. It leaves the issue’s error-handling and response-size requests for separate fixes, and keeps the OpenAI-format response contract unchanged.
Before (
4710c3b30e5c)I sent this request through the running proxy. The upstream returned an answer without usage. URLs, model aliases, and credentials use placeholders below; the response contains synthetic data.
After (
212219ecc0cd)I repeated the same curl request against the fixed proxy:
Local reproduction setup
Run this upstream in a separate terminal. It returns an answer without usage; no paid inference is involved.
Save this proxy config as
/tmp/typesafe-repro.yaml. SetLITELLM_API_KEYandTYPESAFE_API_KEYin your environment; the local upstream ignores the provider credential.Start each checkout with
uv run litellm --config /tmp/typesafe-repro.yaml --port 4000, setLITELLM_URL=http://127.0.0.1:4000, then run the curl command above. Stop the old proxy before starting the fixed one.