litellm-mirror/litellm/litellm_core_utils
Ishaan Jaff e98f1d16fd (feat) /batches - track user_api_key_alias, user_api_key_team_alias etc for /batch requests (#7401)
* run azure testing on ci/cd

* update docs on azure batches endpoints

* add input azure.jsonl

* refactor - use separate file for batches endpoints

* fixes for passing custom llm provider to /batch endpoints

* pass custom llm provider to files endpoints

* update azure batches doc

* add info for azure batches api

* update batches endpoints

* use simple helper for raising proxy exception

* update config.yml

* fix imports

* add type hints to get_litellm_params

* update get_litellm_params

* update get_litellm_params

* update get slp

* QOL - stop double logging a create batch operations on custom loggers

* re use slp from og event

* _create_standard_logging_object_for_completed_batch

* fix linting errors

* reduce num changes in PR

* update BATCH_STATUS_POLL_MAX_ATTEMPTS
2024-12-24 17:44:28 -08:00
..
audio_utils fix import error 2024-09-05 10:09:44 -07:00
llm_cost_calc LiteLLM Minor Fixes & Improvements (12/23/2024) - p3 (#7394) 2024-12-23 22:02:52 -08:00
llm_response_utils LiteLLM Minor Fixes & Improvements (12/16/2024) - p1 (#7263) 2024-12-17 15:33:36 -08:00
prompt_templates (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
tokenizers Code Quality Improvement - remove tokenizers/ from /llms (#7163) 2024-12-10 23:50:15 -08:00
asyncify.py (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
core_helpers.py (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
default_encoding.py Code Quality Improvement - remove tokenizers/ from /llms (#7163) 2024-12-10 23:50:15 -08:00
duration_parser.py (QOL improvement) Provider budget routing - allow using 1s, 1d, 1mo, 2mo etc (#6885) 2024-11-23 16:59:46 -08:00
exception_mapping_utils.py (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
get_llm_provider_logic.py (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
get_supported_openai_params.py [Bug fix ]: Triton /infer handler incompatible with batch responses (#7337) 2024-12-20 20:59:40 -08:00
json_validation_rule.py feat(vertex_ai_anthropic.py): support response_schema for vertex ai anthropic calls 2024-07-18 16:57:38 -07:00
litellm_logging.py (feat) /batches - track user_api_key_alias, user_api_key_team_alias etc for /batch requests (#7401) 2024-12-24 17:44:28 -08:00
llm_request_utils.py Litellm ruff linting enforcement (#5992) 2024-10-01 19:44:20 -04:00
logging_utils.py Complete 'requests' library removal (#7350) 2024-12-22 07:21:25 -08:00
mock_functions.py (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
README.md (QOL improvement) Provider budget routing - allow using 1s, 1d, 1mo, 2mo etc (#6885) 2024-11-23 16:59:46 -08:00
realtime_streaming.py (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
redact_messages.py (feat) Allow enabling logging message / response for specific virtual keys (#7071) 2024-12-06 21:25:36 -08:00
response_header_helpers.py fix(utils.py): guarantee openai-compatible headers always exist in response 2024-09-28 21:08:15 -07:00
rules.py Litellm dev 11 07 2024 (#6649) 2024-11-08 19:34:22 +05:30
streaming_chunk_builder_utils.py (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
streaming_handler.py Complete 'requests' library removal (#7350) 2024-12-22 07:21:25 -08:00
token_counter.py fix: Support WebP image format and avoid token calculation error (#7182) 2024-12-12 14:32:39 -08:00

Folder Contents

This folder contains general-purpose utilities that are used in multiple places in the codebase.

Core files:

  • streaming_handler.py: The core streaming logic + streaming related helper utils
  • core_helpers.py: code used in types/ - e.g. map_finish_reason.
  • exception_mapping_utils.py: utils for mapping exceptions to openai-compatible error types.
  • default_encoding.py: code for loading the default encoding (tiktoken)
  • get_llm_provider_logic.py: code for inferring the LLM provider from a given model name.
  • duration_parser.py: code for parsing durations - e.g. "1d", "1mo", "10s"