Files
litellm/tests/test_litellm/litellm_core_utils
07472ce21f Logging: prevent double logging logs when bridge is used (anthropic <-> chat completion OR chat completion <-> responses api) (#11687)
* feat(anthropic/passthrough): pass dynamic api key/api base params to litellm.completion

allows calls to work with config.yaml

* fix(responses_api/transformation): fix passing dynamic params to responses api from .completion()

Allows responses api to work with config.yaml

* fix(langfuse.py): fix responses api usage logging to langfuse

* refactor(litellm_logging.py): add more generic solution for responses api usage logging

ensures it works across all logging integrations

* fix(litellm_logging.py): patch for anthropic messages not returning a pydantic object

it should ideally return a pydantic object, which would simplify checks and reduce errors

* fix(handler.py): correctly bubble up empty choices errors to litellm.completion

causes downstream errors as it is expected there is at least one choice set

* feat(litellm_logging.py): prevent double logging litellm responses

ensures accurate spend tracking for calls when bridges are used

* fix(litellm_logging.py): ensure logging is consistently enforced across all call types

* fix: patch - set calltype before entering bridge api

ensures logging object is applying the correct logic on the event hooks

* fix(types/router.py): loosen type hint for mock response

* change space_key header to space_id for Arize (#11595)

* feat(schema): add additional indexes to LiteLLM_SpendLogs for improved query performance (#11675)

* Revert "feat(schema): add additional indexes to LiteLLM_SpendLogs for improve…" (#11683)

This reverts commit 2a7f113fde.

* [Feat] Use dedicated Rest endpoints for list, calling MCP tools  (#11684)

* fix: (fix) use specific rest endpoints for MCP

* ui - use rest mcp endpoints

* fix imports

* docs DISABLE_AIOHTTP_TRUST_ENV

* docs(caching.md): remove batch redis get recommendation - old code path, no longer necessary

* fix(vertex_and_google_ai_studio_gemini.py): handle gemini not passing audio token usage data

* Chat Completions <-> Responses API Bridge Improvements (#11685)

* feat(anthropic/passthrough): pass dynamic api key/api base params to litellm.completion

allows calls to work with config.yaml

* fix(responses_api/transformation): fix passing dynamic params to responses api from .completion()

Allows responses api to work with config.yaml

* fix(langfuse.py): fix responses api usage logging to langfuse

* refactor(litellm_logging.py): add more generic solution for responses api usage logging

ensures it works across all logging integrations

* fix(litellm_logging.py): patch for anthropic messages not returning a pydantic object

it should ideally return a pydantic object, which would simplify checks and reduce errors

* fix(handler.py): correctly bubble up empty choices errors to litellm.completion

causes downstream errors as it is expected there is at least one choice set

* fix(response_metadata.py): allow model_info to be none

* fix(litellm_logging.py): copy object before mutating

* fix: fix lint check

* fix: fix linting error

* fix: fix linting error

---------

Co-authored-by: vanities <mischkeaa@gmail.com>
Co-authored-by: Cole McIntosh <82463175+colesmcintosh@users.noreply.github.com>
Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
2025-06-12 23:07:36 -07:00
..