litellm/litellm
Ishaan Jaff 9f459c5c57
fix(logging): preserve pass-through endpoint response_cost (#21844)
* fix(logging): preserve pass-through endpoint response_cost in async_success_handler

Two places in the logging pipeline were overwriting response_cost that
pass-through handlers (Gemini/Vertex) had already calculated:

1. _process_hidden_params_and_response_cost fell through to
   _response_cost_calculator which returns None for pass-through calls
2. async_success_handler pass-through branch unconditionally set
   response_cost = None (introduced in PR #19887)

Now both places check if response_cost is already set before overwriting.

* test: add regression test for pass-through endpoint response_cost preservation
2026-02-21 15:09:45 -08:00
..
a2a_protocol fix: prompt registry 2026-02-18 00:34:54 +05:30
anthropic_interface fix: prompt registry 2026-02-18 00:34:54 +05:30
assistants Contributor PR - Support OPENAI_BASE_URL in addition to OPENAI_API_BASE (#9995) (#10423) 2025-04-29 21:27:37 -07:00
batch_completion fix: prompt registry 2026-02-18 00:34:54 +05:30
batches fix: prompt registry 2026-02-18 00:34:54 +05:30
caching fix: add logging to sync client close failure in disconnect() 2026-02-20 17:36:36 -08:00
completion_extras fix code quality tests and mypy 2026-02-18 17:36:36 +05:30
containers fix: prompt registry 2026-02-18 00:34:54 +05:30
endpoints/speech/speech_to_completion_bridge fix: fix import errors 2025-09-14 09:32:21 -07:00
evals fix: prompt registry 2026-02-18 00:34:54 +05:30
experimental_mcp_client fix: prompt registry 2026-02-18 00:34:54 +05:30
files fix: prompt registry 2026-02-18 00:34:54 +05:30
fine_tuning Litellm managed file updates combined (#11040) 2025-05-22 17:20:41 -07:00
google_genai fix: prompt registry 2026-02-18 00:34:54 +05:30
images fix: prompt registry 2026-02-18 00:34:54 +05:30
integrations fix(websearch_interception): fix pre_call_deployment_hook not triggering via proxy router (#21433) 2026-02-19 06:38:45 -08:00
interactions fix: prompt registry 2026-02-18 00:34:54 +05:30
litellm_core_utils fix(logging): preserve pass-through endpoint response_cost (#21844) 2026-02-21 15:09:45 -08:00
llms style: add missing PEP 8 blank line before top-level function 2026-02-21 13:31:19 -08:00
ocr [Feat] /ocr - Add VertexAI OCR provider support + cost tracking (#16216) 2025-11-03 15:56:49 -08:00
passthrough fix(types): fix mypy errors in pass-through endpoint query param types 2026-02-19 12:24:14 -03:00
proxy fix(lint): fix ruff/flake8 violations - unused imports, PLR0915, print statements (#21846) 2026-02-21 15:07:47 -08:00
proxy_auth fix: prompt registry 2026-02-18 00:34:54 +05:30
rag fix: prompt registry 2026-02-18 00:34:54 +05:30
realtime_api fix: prompt registry 2026-02-18 00:34:54 +05:30
rerank_api fix: prompt registry 2026-02-18 00:34:54 +05:30
responses fix(responses): eliminate per-chunk thread spawning in async streaming path (#21709) 2026-02-20 16:26:23 -08:00
router_strategy fix(lint): fix ruff/flake8 violations - unused imports, PLR0915, print statements (#21846) 2026-02-21 15:07:47 -08:00
router_utils feat: add session_id to have better routing 2026-02-21 18:45:50 +05:30
search [Bug Fix] Exa Search API - ensure request params are sent to Exa AI (#15855) 2025-10-23 11:56:30 -07:00
secret_managers fix: prompt registry 2026-02-18 00:34:54 +05:30
skills fix: prompt registry 2026-02-18 00:34:54 +05:30
types feat(router): Add complexity-based auto routing strategy (#21789) 2026-02-21 13:23:37 -08:00
vector_store_files Vector store files Stable Release (#16643) 2025-11-15 13:00:33 -08:00
vector_stores Fix vector store configuration synchronization failure 2025-12-05 11:46:14 +05:30
videos fix: respect videos content db creds 2025-12-10 23:00:01 +05:30
__init__.py Merge branch 'main' into litellm_oss_staging_02_17_2026 2026-02-18 17:26:33 +05:30
_lazy_imports.py fix: prompt registry 2026-02-18 00:34:54 +05:30
_lazy_imports_registry.py Merge branch 'main' into litellm_oss_staging_02_17_2026 2026-02-18 17:26:33 +05:30
_logging.py fix: prompt registry 2026-02-18 00:34:54 +05:30
_redis.py fix: close leaked Redis connection pools on cache eviction and disconnect 2026-02-20 17:09:32 -08:00
_service_logger.py fix: prompt registry 2026-02-18 00:34:54 +05:30
_uuid.py Fix: revert fastuuid optional dependency, always use fastuuid in .__uid helper (#14941) 2025-09-26 09:14:20 -07:00
_version.py Virtual key based policies in Aim Guardrails (#9499) 2025-04-01 21:57:23 -07:00
anthropic_beta_headers_config.json Add supoort for context-1m-2025-08-07 2026-02-19 09:52:23 +05:30
anthropic_beta_headers_manager.py fix: prompt registry 2026-02-18 00:34:54 +05:30
budget_manager.py Squashed commit of the following: (#9709) 2025-04-02 21:24:54 -07:00
constants.py [Fix] Replace deprecated claude-3-7-sonnet in test_anthropic_completion, add store to OPENAI_CHAT_COMPLETION_PARAMS 2026-02-20 17:26:19 -08:00
cost.json
cost_calculator.py perf: optimize completion_cost() — eliminate enum overhead, reduce function call indirection 2026-02-21 12:14:55 -08:00
exceptions.py fix: prompt registry 2026-02-18 00:34:54 +05:30
main.py fix(responses): eliminate per-chunk thread spawning in async streaming path (#21709) 2026-02-20 16:26:23 -08:00
model_prices_and_context_window_backup.json feat(openrouter): add openrouter/minimax/minimax-m2.5 pricing (#21664) 2026-02-20 22:24:58 -08:00
mypy.ini fix mypy 2025-09-27 12:21:32 -07:00
policy_templates_backup.json feat(ui): show latency overhead for AI-suggested policy templates (#21620) 2026-02-19 15:45:07 -08:00
py.typed
router.py fix(lint): fix ruff/flake8 violations - unused imports, PLR0915, print statements (#21846) 2026-02-21 15:07:47 -08:00
scheduler.py fix: prompt registry 2026-02-18 00:34:54 +05:30
timeout.py
utils.py Merge origin/main into perf/callback-registration-routing 2026-02-21 12:40:23 -08:00