Ishaan Jaff
c7f14e936a
(code quality) run ruff rule to ban unused imports ( #7313 )
...
* remove unused imports
* fix AmazonConverseConfig
* fix test
* fix import
* ruff check fixes
* test fixes
* fix testing
* fix imports
2024-12-19 12:33:42 -08:00
Krish Dholakia
b82add11ba
LITELLM: Remove requests
library usage ( #7235 )
...
* fix(generic_api_callback.py): remove requests lib usage
* fix(budget_manager.py): remove requests lib usgae
* fix(main.py): cleanup requests lib usage
* fix(utils.py): remove requests lib usage
* fix(argilla.py): fix argilla test
* fix(athina.py): replace 'requests' lib usage with litellm module
* fix(greenscale.py): replace 'requests' lib usage with httpx
* fix: remove unused 'requests' lib import + replace usage in some places
* fix(prompt_layer.py): remove 'requests' lib usage from prompt layer
* fix(ollama_chat.py): remove 'requests' lib usage
* fix(baseten.py): replace 'requests' lib usage
* fix(codestral/): replace 'requests' lib usage
* fix(predibase/): replace 'requests' lib usage
* refactor: cleanup unused 'requests' lib imports
* fix(oobabooga.py): cleanup 'requests' lib usage
* fix(invoke_handler.py): remove unused 'requests' lib usage
* refactor: cleanup unused 'requests' lib import
* fix: fix linting errors
* refactor(ollama/): move ollama to using base llm http handler
removes 'requests' lib dep for ollama integration
* fix(ollama_chat.py): fix linting errors
* fix(ollama/completion/transformation.py): convert non-jpeg/png image to jpeg/png before passing to ollama
2024-12-17 12:50:04 -08:00
Ishaan Jaff
2fb2801eb4
(Refactor) Code Quality improvement - stop redefining LiteLLMBase ( #7147 )
...
* fix stop redefining LiteLLMBase
* use better name for base pydantic obj
2024-12-10 15:49:01 -08:00
Ishaan Jaff
441adad3ae
(router_strategy/) ensure all async functions use async cache methods ( #6489 )
...
* fix router strat
* use async set / get cache in router_strategy
* add coverage for router strategy
* fix imports
* fix batch_get_cache
* use async methods for least busy
* fix least busy use async methods
* fix test_dual_cache_increment
* test async_get_available_deployment when routing_strategy="least-busy"
2024-10-29 21:07:17 +05:30
Ishaan Jaff
610974b4fc
(code quality) add ruff check PLR0915 for too-many-statements
( #6309 )
...
* ruff add PLR0915
* add noqa for PLR0915
* fix noqa
* add # noqa: PLR0915
* # noqa: PLR0915
* # noqa: PLR0915
* # noqa: PLR0915
* add # noqa: PLR0915
* # noqa: PLR0915
* # noqa: PLR0915
* # noqa: PLR0915
* # noqa: PLR0915
2024-10-18 15:36:49 +05:30
Ishaan Jaff
4d1b4beb3d
(refactor) caching use LLMCachingHandler for async_get_cache and set_cache ( #6208 )
...
* use folder for caching
* fix importing caching
* fix clickhouse pyright
* fix linting
* fix correctly pass kwargs and args
* fix test case for embedding
* fix linting
* fix embedding caching logic
* fix refactor handle utils.py
* fix test_embedding_caching_azure_individual_items_reordered
2024-10-14 16:34:01 +05:30
Krish Dholakia
d57be47b0f
Litellm ruff linting enforcement ( #5992 )
...
* ci(config.yml): add a 'check_code_quality' step
Addresses https://github.com/BerriAI/litellm/issues/5991
* ci(config.yml): check why circle ci doesn't pick up this test
* ci(config.yml): fix to run 'check_code_quality' tests
* fix(__init__.py): fix unprotected import
* fix(__init__.py): don't remove unused imports
* build(ruff.toml): update ruff.toml to ignore unused imports
* fix: fix: ruff + pyright - fix linting + type-checking errors
* fix: fix linting errors
* fix(lago.py): fix module init error
* fix: fix linting errors
* ci(config.yml): cd into correct dir for checks
* fix(proxy_server.py): fix linting error
* fix(utils.py): fix bare except
causes ruff linting errors
* fix: ruff - fix remaining linting errors
* fix(clickhouse.py): use standard logging object
* fix(__init__.py): fix unprotected import
* fix: ruff - fix linting errors
* fix: fix linting errors
* ci(config.yml): cleanup code qa step (formatting handled in local_testing)
* fix(_health_endpoints.py): fix ruff linting errors
* ci(config.yml): just use ruff in check_code_quality pipeline for now
* build(custom_guardrail.py): include missing file
* style(embedding_handler.py): fix ruff check
2024-10-01 19:44:20 -04:00
Krrish Dholakia
6cca5612d2
refactor: replace 'traceback.print_exc()' with logging library
...
allows error logs to be in json format for otel logging
2024-06-06 13:47:43 -07:00
sumanth
71e0294485
addressed comments
2024-05-14 10:05:19 +05:30
SUMANTH
978672a56d
Merge branch 'BerriAI:main' into usage-based-routing-ttl-on-cache
2024-05-14 09:08:01 +05:30
Krrish Dholakia
4a3b084961
feat(bedrock_httpx.py): moves to using httpx client for bedrock cohere calls
2024-05-11 13:43:08 -07:00
sumanth
3bc6b5d119
usage-based-routing-ttl-on-cache
2024-05-03 10:50:45 +05:30
sumanth
89e655c79e
usage based routing RPM count fix
2024-04-30 00:29:38 +05:30
Krrish Dholakia
2236f283fe
fix(router.py): handle id being passed in as int
2024-04-04 14:23:10 -07:00
Krrish Dholakia
47ca223d0b
fix(lowest_tpm_rpm_routing.py): fix base case where max tpm/rpm is 0
2024-03-28 14:51:31 -07:00
Ishaan Jaff
5d121a9f3c
(fix) stop using f strings with logger
2024-03-25 10:47:18 -07:00
Krrish Dholakia
2f1899284c
fix(router.py): add more debug logs
2024-03-11 12:34:35 -07:00
ishaan-jaff
e23c68b15a
(fix) failing usage based routing test
2024-03-11 12:14:13 -07:00
Krrish Dholakia
0273410310
fix(lowest_tpm_rpm.py): handle async scenarios
2024-03-06 21:38:30 -08:00
ishaan-jaff
d0442ae0f2
(feat) router - usage based routing - consider input_tokens
2024-01-19 13:59:49 -08:00
Krrish Dholakia
2ab31bcaf8
fix(lowest_tpm_rpm.py): handle null case for text/message input
2024-01-02 12:24:29 +05:30
Krrish Dholakia
a37a18ca80
feat(router.py): add support for retry/fallbacks for async embedding calls
2024-01-02 11:54:28 +05:30
Krrish Dholakia
dff4c172d0
refactor(test_router_caching.py): move tpm/rpm routing tests to separate file
2024-01-02 11:10:11 +05:30
Krrish Dholakia
a83e2e07cf
fix(router.py): correctly raise no model available error
...
https://github.com/BerriAI/litellm/issues/1289
2024-01-01 21:22:42 +05:30
Krrish Dholakia
b66cf0aa43
fix(lowest_tpm_rpm_routing.py): broaden scope of get deployment logic
2023-12-30 13:27:50 +05:30
Krrish Dholakia
a34de56289
fix(router.py): handle initial scenario for tpm/rpm routing
2023-12-30 07:28:45 +05:30
Krrish Dholakia
2fc264ca04
fix(router.py): fix int logic
2023-12-29 20:41:56 +05:30
Krrish Dholakia
cf91e49c87
refactor(lowest_tpm_rpm.py): move tpm/rpm based routing to a separate file for better testing
2023-12-29 18:33:43 +05:30