Ishaan Jaff
c84cfe977e
(feat) add /key/health endpoint to test key based logging ( #6073 )
...
* add /key/health endpoint
* add /key/health endpoint
* fix return from /key/health
* update doc string
* fix doc string for /key/health
* add test for /key/health
* fix linting
* docs /key/health
2024-10-05 11:56:55 +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
Ishaan Jaff
391b107909
[Feat UI sso] store 'provider' in user metadata ( #5856 )
...
* store sso provider in user metadata
* store user metadata
* store user auth_provider in user metadata
* add "metadata" for LiteLLM_UserTable
* fix sso test
2024-09-23 17:49:36 -07:00
Krish Dholakia
8039b95aaf
LiteLLM Minor Fixes & Improvements (09/21/2024) ( #5819 )
...
* fix(router.py): fix error message
* Litellm disable keys (#5814 )
* build(schema.prisma): allow blocking/unblocking keys
Fixes https://github.com/BerriAI/litellm/issues/5328
* fix(key_management_endpoints.py): fix pop
* feat(auth_checks.py): allow admin to enable/disable virtual keys
Closes https://github.com/BerriAI/litellm/issues/5328
* docs(vertex.md): add auth section for vertex ai
Addresses - https://github.com/BerriAI/litellm/issues/5768#issuecomment-2365284223
* build(model_prices_and_context_window.json): show which models support prompt_caching
Closes https://github.com/BerriAI/litellm/issues/5776
* fix(router.py): allow setting default priority for requests
* fix(router.py): add 'retry-after' header for concurrent request limit errors
Fixes https://github.com/BerriAI/litellm/issues/5783
* fix(router.py): correctly raise and use retry-after header from azure+openai
Fixes https://github.com/BerriAI/litellm/issues/5783
* fix(user_api_key_auth.py): fix valid token being none
* fix(auth_checks.py): fix model dump for cache management object
* fix(user_api_key_auth.py): pass prisma_client to obj
* test(test_otel.py): update test for new key check
* test: fix test
2024-09-21 18:51:53 -07:00
Ishaan Jaff
39e872c7eb
fix premium user check for tags on keys ( #5826 )
2024-09-21 16:56:33 -07:00
Ishaan Jaff
036fce8f18
[Fix] Tag Based Routing not work with wildcard routing ( #5805 )
...
* allow using tag routing for free
* only enforce tags for teams / keys
2024-09-20 14:05:56 -07:00
Ishaan Jaff
186db292ae
[Feat] Add Error Handling for /key/list endpoint ( #5787 )
...
* raise error from unsupported param
* add testing for key list endpoint
* add testing for key list error handling
* fix key list test
2024-09-19 17:14:12 -07:00
Ishaan Jaff
8fbe2abb89
[Feat-Proxy] Add upperbound key duration param ( #5727 )
...
* add upperbound key duration param
* use upper bound values when None set
* docs upperbound params
2024-09-16 16:28:36 -07:00
Krish Dholakia
0295a22561
LiteLLM Minor Fixes and Improvements (09/10/2024) ( #5618 )
...
* fix(cost_calculator.py): move to debug for noisy warning message on cost calculation error
Fixes https://github.com/BerriAI/litellm/issues/5610
* fix(databricks/cost_calculator.py): Handles model name issues for databricks models
* fix(main.py): fix stream chunk builder for multiple tool calls
Fixes https://github.com/BerriAI/litellm/issues/5591
* fix: correctly set user_alias when passed in
Fixes https://github.com/BerriAI/litellm/issues/5612
* fix(types/utils.py): allow passing role for message object
https://github.com/BerriAI/litellm/issues/5621
* fix(litellm_logging.py): Fix langfuse logging across multiple projects
Fixes issue where langfuse logger was re-using the old logging object
* feat(proxy/_types.py): support adding key-based tags for tag-based routing
Enable tag based routing at key-level
* fix(proxy/_types.py): fix inheritance
* test(test_key_generate_prisma.py): fix test
* test: fix test
* fix(litellm_logging.py): return used callback object
2024-09-11 11:30:29 -07:00
Ishaan Jaff
428762542c
fix regen keys when no duration is passed
2024-09-10 08:04:18 -07:00
Ishaan Jaff
204c384400
add /key/list endpoint
2024-09-07 16:52:28 -07:00
Ishaan Jaff
7f461dbf68
fix linting
2024-09-06 16:54:43 -07:00
Ishaan Jaff
aed59abe35
allow passing expiry time to /key/regenerate
2024-09-06 08:36:34 -07:00
Krrish Dholakia
325538f8a4
fix(key_management_endpoints.py): expose 'key' param, for setting your own key value
2024-08-28 12:27:32 -07:00
Ishaan Jaff
75cbbea071
enforce regenerating keys in enterprise tier
2024-08-26 18:54:50 -07:00
Ishaan Jaff
4dc2eea58d
update key name when regenerating a key
2024-08-26 18:40:51 -07:00
Ishaan Jaff
2615edc468
allow using hashed api keys on regen key
2024-08-26 18:15:52 -07:00
Ishaan Jaff
7230ee1f55
add regenerate_key_fn
2024-08-26 17:59:44 -07:00
Krrish Dholakia
a61f3e7656
refactor(team_endpoints.py): refactor auth checks for team member endpoints to ui team admin to manage it
2024-08-20 16:57:18 -07:00
Ishaan Jaff
30e985d79c
feat control guardrails per API Key
2024-08-20 08:16:28 -07:00
Ishaan Jaff
b83fa87880
update tpm / rpm limit per model
2024-08-17 15:26:12 -07:00
Ishaan Jaff
68b54bed85
add tpm limits per api key per model
2024-08-17 13:20:55 -07:00
Ishaan Jaff
47953aaa96
use management_endpoint_wrapper for key endpoints
2024-08-12 11:02:21 -07:00
Krrish Dholakia
b5c5ed2209
fix(key_management_endpoints.py): if budget duration set, set budget_reset_at
2024-07-24 15:02:22 -07:00
Ishaan Jaff
25ddbbb41d
raise budget_exceeded in user_api_key_auth
2024-07-08 12:45:39 -07:00
Krrish Dholakia
bab4a6c5df
feat(internal_user_endpoints.py): expose /user/delete
endpoint
2024-06-24 13:29:26 -07:00
Krrish Dholakia
511c0dc4d7
fix(key_management_endpoints.py): use common _duration_in_seconds function
2024-06-20 17:02:31 -07:00
Ishaan Jaff
0f8237e263
fix - refactor key endpoints
2024-06-15 14:13:32 -07:00