Mateo Wang
48b5a5a0cc
style: unify ruff format width on 120 ( #31518 )
...
The repo linted at 120 (E501, isort) but ran ruff format at 88 via a
--line-length 88 override in the Makefile and CI, leaving the formatter
and the linter disagreeing on wrap width. Drop the override so ruff.toml's
line-length = 120 is the single source of truth and reformat the tree to
match.
2026-06-27 12:39:29 -07:00
Mateo Wang
17bfd415ae
chore: migrate Python formatter from black to ruff format ( #31317 )
2026-06-25 11:27:43 -07:00
oss-agent-shin
ca82761e48
docs(budget_manager): add docstring to BudgetManager.reset_cost ( #27867 )
...
Co-authored-by: oss-agent-shin <279349115+oss-agent-shin@users.noreply.github.com>
2026-05-13 13:28:22 -07:00
Krish Dholakia
8ee32291e0
Squashed commit of the following: ( #9709 )
...
commit b12a9892b7
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date: Wed Apr 2 08:09:56 2025 -0700
fix(utils.py): don't modify openai_token_counter
commit 294de31803
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date: Mon Mar 24 21:22:40 2025 -0700
fix: fix linting error
commit cb6e9fbe40
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date: Mon Mar 24 19:52:45 2025 -0700
refactor: complete migration
commit bfc159172d
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date: Mon Mar 24 19:09:59 2025 -0700
refactor: refactor more constants
commit 43ffb6a558
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date: Mon Mar 24 18:45:24 2025 -0700
fix: test
commit 04dbe4310c
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date: Mon Mar 24 18:28:58 2025 -0700
refactor: refactor: move more constants into constants.py
commit 3c26284aff
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date: Mon Mar 24 18:14:46 2025 -0700
refactor: migrate hardcoded constants out of __init__.py
commit c11e0de69d
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date: Mon Mar 24 18:11:21 2025 -0700
build: migrate all constants into constants.py
commit 7882bdc787
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date: Mon Mar 24 18:07:37 2025 -0700
build: initial test banning hardcoded numbers in repo
2025-04-02 21:24:54 -07:00
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
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
6575143460
feat(proxy_server.py): return litellm version in response headers
2024-05-08 16:00:08 -07:00
Krrish Dholakia
f5da95685a
feat(utils.py): support region based pricing for bedrock + use bedrock's token counts if given
2024-01-26 14:53:58 -08:00
Jakob
7ba7272a9a
add headers to budget manager
2024-01-18 16:10:45 -08:00
Krrish Dholakia
4905929de3
refactor: add black formatting
2023-12-25 14:11:20 +05:30
ishaan-jaff
762f28e4d7
(fix) make print_verbose non blocking
2023-12-07 17:31:32 -08:00
Krrish Dholakia
6b40546e59
refactor(all-files): removing all print statements; adding pre-commit + flake8 to prevent future regressions
2023-11-04 12:50:15 -07:00
Krrish Dholakia
2af46e8be9
remove budget manager
2023-09-30 11:42:56 -07:00
Krrish Dholakia
5acd1c9d47
update budget manager
2023-09-18 15:48:29 -07:00
Krrish Dholakia
53b10e4372
allow updating budget manager cost by passing in text
2023-09-13 15:12:47 -07:00
Krrish Dholakia
041817124f
fix testing
2023-09-12 22:03:51 -07:00
Krrish Dholakia
2a555eddfa
update budget manager docs
2023-09-12 20:25:59 -07:00
Krrish Dholakia
e1c91903da
add reset budget on duration end to budget manager
2023-09-12 13:01:55 -07:00
Krrish Dholakia
5f496f7d2a
save budget manager data threaded
2023-09-11 15:53:34 -07:00
Krrish Dholakia
34c6f3a25b
updates to budget manager naming schema
2023-09-11 15:22:52 -07:00
Krrish Dholakia
ee07cb9657
adding budget manager to docs
2023-09-11 14:51:01 -07:00
Krrish Dholakia
817798c692
return user list from budget manager
2023-09-11 14:15:00 -07:00
Krrish Dholakia
32fff1e462
fix linting issues
2023-09-11 13:54:03 -07:00
Krrish Dholakia
9f504a4ff5
update budget manager with hosted client
2023-09-11 13:46:27 -07:00
Krrish Dholakia
d4806cd686
updating budget manager
2023-09-11 10:58:09 -07:00
Krrish Dholakia
274640b3ef
fix linting issues
2023-09-09 20:23:18 -07:00
Krrish Dholakia
b1ec504421
update budget manager
2023-09-09 20:06:09 -07:00
ishaan-jaff
ca72ebd2df
store llm costs in budget manager
2023-09-09 19:11:35 -07:00
Krrish Dholakia
8ed85b0523
rename apimanager to budget manager
2023-09-09 16:10:41 -07:00