litellm/litellm
Marc Abramowitz 322b67833b
Add models import command (#10581)
* Add --only-models-matching-regex option

to `models import` which only processes models where
`litelllm_params.model` matches the regex

* Add test_models_import_only_models_matching_regex

* Print each model we're importing

* Add --only-access-groups-matching-regex option

to `models import` which only processes models where at least one item
in `model_info.access_groups` matches the regex. Add a unit test.

* Add `models import` examples to README.md

Add `models import` examples to proxy/client/cli/README.md

* ruff format litellm/proxy/client/cli/commands/models.py

* Make `models import` display tabular output

* models import refactoring

* Fix failing tests in test_models_commands.py

* Refactor import_models to make it shorter and more readable

* Extract from `import_models` a function called `get_model_list_from_yaml_file`

* Fix mypy error

* Add more specific typing

for better understandability and Intellisense

* More import_models refactoring

* More refactoring

* More refactoring

* Write unit tests for format_iso_datetime_str

* Add more unit tests

* ruff format tests/litellm/proxy/client/cli/test_models_commands.py

* ruff format litellm/proxy/client/cli/commands/models.py

* Make test_format_timestamp use UTC time
2025-05-14 23:05:07 -07:00
..
anthropic_interface [Refactor] Anthropic /v1/messages endpoint - Refactor to use base llm http handler and transformations (#10677) 2025-05-08 17:56:50 -07:00
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 (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
batches fix(router.py): write file to all deployments (#10708) 2025-05-10 00:08:30 -07:00
caching fix(caching_handler.py): fix embedding str caching result (#10700) 2025-05-09 23:37:02 -07:00
experimental_mcp_client fix types on tools.py 2025-03-29 16:48:15 -07:00
files Litellm Unified File ID output file id support (#10713) 2025-05-10 11:02:09 -07:00
fine_tuning Contributor PR - Support OPENAI_BASE_URL in addition to OPENAI_API_BASE (#9995) (#10423) 2025-04-29 21:27:37 -07:00
integrations Supper OTLP standard environment variables for configuration (#10813) 2025-05-14 17:40:28 -07:00
litellm_core_utils Anthropic unified web search + tool cost tracking support (#10846) 2025-05-14 22:41:12 -07:00
llms Anthropic unified web search + tool cost tracking support (#10846) 2025-05-14 22:41:12 -07:00
proxy Add models import command (#10581) 2025-05-14 23:05:07 -07:00
realtime_api Realtime API: Support 'base_model' cost tracking + show response in spend logs (if enabled) (#9897) 2025-04-10 21:24:45 -07:00
rerank_api build(pyproject.toml): add new dev dependencies - for type checking (#9631) 2025-03-29 11:02:13 -07:00
responses [Bug Fix] Responses API - fix for handling multiturn responses API sessions (#10415) 2025-04-29 17:22:47 -07:00
router_strategy fix(router.py): write file to all deployments (#10708) 2025-05-10 00:08:30 -07:00
router_utils complete unified batch id support - replace model in jsonl to be deployment model name (#10719) 2025-05-10 12:04:01 -07:00
secret_managers Squashed commit of the following: (#9709) 2025-04-02 21:24:54 -07:00
types AttributeError: 'Message' object has no attribute 'audio' (#10814) 2025-05-14 22:45:14 -07:00
vector_stores [Docs] Using LiteLLM with vector stores / knowledge bases (#10534) 2025-05-03 11:28:33 -07:00
__init__.py Add new model provider Novita AI (#7582) (#9527) 2025-05-12 21:49:30 -07:00
_logging.py fix debug logs 2025-05-06 14:28:20 -07:00
_redis.py Squashed commit of the following: (#9709) 2025-04-02 21:24:54 -07:00
_service_logger.py clean up service metrics 2025-04-02 17:50:41 -07:00
_version.py Virtual key based policies in Aim Guardrails (#9499) 2025-04-01 21:57:23 -07:00
budget_manager.py Squashed commit of the following: (#9709) 2025-04-02 21:24:54 -07:00
constants.py Fix/issue 10113 embeddings use non default tokenizer (#10629) 2025-05-14 22:55:49 -07:00
cost.json store llm costs in budget manager 2023-09-09 19:11:35 -07:00
cost_calculator.py Anthropic unified web search + tool cost tracking support (#10846) 2025-05-14 22:41:12 -07:00
exceptions.py [Feat] Allow specifying PII Entities Config when using Presidio Guardrails (#10810) 2025-05-13 19:48:56 -07:00
main.py Anthropic unified web search + tool cost tracking support (#10846) 2025-05-14 22:41:12 -07:00
model_prices_and_context_window_backup.json fix: bedrock-sonnet-caching-cost (#10752) 2025-05-14 22:50:45 -07:00
mypy.ini mypy tweaks (#10490) 2025-05-01 22:13:14 -07:00
py.typed feature - Types for mypy - #360 2024-05-30 14:14:41 -04:00
router.py fix: allow using credentials with amoderation (#10723) 2025-05-10 14:27:57 -07:00
scheduler.py Squashed commit of the following: (#9709) 2025-04-02 21:24:54 -07:00
timeout.py Litellm ruff linting enforcement (#5992) 2024-10-01 19:44:20 -04:00
utils.py Anthropic unified web search + tool cost tracking support (#10846) 2025-05-14 22:41:12 -07:00