Krish Dholakia
9b7ebb6a7d
build(pyproject.toml): add new dev dependencies - for type checking ( #9631 )
...
* build(pyproject.toml): add new dev dependencies - for type checking
* build: reformat files to fit black
* ci: reformat to fit black
* ci(test-litellm.yml): make tests run clear
* build(pyproject.toml): add ruff
* fix: fix ruff checks
* build(mypy/): fix mypy linting errors
* fix(hashicorp_secret_manager.py): fix passing cert for tls auth
* build(mypy/): resolve all mypy errors
* test: update test
* fix: fix black formatting
* build(pre-commit-config.yaml): use poetry run black
* fix(proxy_server.py): fix linting error
* fix: fix ruff safe representation error
2025-03-29 11:02:13 -07:00
Krish Dholakia
3671829e39
Complete 'requests' library removal ( #7350 )
...
Read Version from pyproject.toml / read-version (push) Successful in 12s
* refactor: initial commit moving watsonx_text to base_llm_http_handler + clarifying new provider directory structure
* refactor(watsonx/completion/handler.py): move to using base llm http handler
removes 'requests' library usage
* fix(watsonx_text/transformation.py): fix result transformation
migrates to transformation.py, for usage with base llm http handler
* fix(streaming_handler.py): migrate watsonx streaming to transformation.py
ensures streaming works with base llm http handler
* fix(streaming_handler.py): fix streaming linting errors and remove watsonx conditional logic
* fix(watsonx/): fix chat route post completion route refactor
* refactor(watsonx/embed): refactor watsonx to use base llm http handler for embedding calls as well
* refactor(base.py): remove requests library usage from litellm
* build(pyproject.toml): remove requests library usage
* fix: fix linting errors
* fix: fix linting errors
* fix(types/utils.py): fix validation errors for modelresponsestream
* fix(replicate/handler.py): fix linting errors
* fix(litellm_logging.py): handle modelresponsestream object
* fix(streaming_handler.py): fix modelresponsestream args
* fix: remove unused imports
* test: fix test
* fix: fix test
* test: fix test
* test: fix tests
* test: fix test
* test: fix patch target
* test: fix test
2024-12-22 07:21:25 -08:00
Krish Dholakia
516c2a6a70
Litellm remove circular imports ( #7232 )
...
* fix(utils.py): initial commit to remove circular imports - moves llmproviders to utils.py
* fix(router.py): fix 'litellm.EmbeddingResponse' import from router.py
'
* refactor: fix litellm.ModelResponse import on pass through endpoints
* refactor(litellm_logging.py): fix circular import for custom callbacks literal
* fix(factory.py): fix circular imports inside prompt factory
* fix(cost_calculator.py): fix circular import for 'litellm.Usage'
* fix(proxy_server.py): fix potential circular import with `litellm.Router'
* fix(proxy/utils.py): fix potential circular import in `litellm.Router`
* fix: remove circular imports in 'auth_checks' and 'guardrails/'
* fix(prompt_injection_detection.py): fix router impor t
* fix(vertex_passthrough_logging_handler.py): fix potential circular imports in vertex pass through
* fix(anthropic_pass_through_logging_handler.py): fix potential circular imports
* fix(slack_alerting.py-+-ollama_chat.py): fix modelresponse import
* fix(base.py): fix potential circular import
* fix(handler.py): fix potential circular ref in codestral + cohere handler's
* fix(azure.py): fix potential circular imports
* fix(gpt_transformation.py): fix modelresponse import
* fix(litellm_logging.py): add logging base class - simplify typing
makes it easy for other files to type check the logging obj without introducing circular imports
* fix(azure_ai/embed): fix potential circular import on handler.py
* fix(databricks/): fix potential circular imports in databricks/
* fix(vertex_ai/): fix potential circular imports on vertex ai embeddings
* fix(vertex_ai/image_gen): fix import
* fix(watsonx-+-bedrock): cleanup imports
* refactor(anthropic-pass-through-+-petals): cleanup imports
* refactor(huggingface/): cleanup imports
* fix(ollama-+-clarifai): cleanup circular imports
* fix(openai_like/): fix impor t
* fix(openai_like/): fix embedding handler
cleanup imports
* refactor(openai.py): cleanup imports
* fix(sagemaker/transformation.py): fix import
* ci(config.yml): add circular import test to ci/cd
2024-12-14 16:28:34 -08:00
Krish Dholakia
60709a0753
LiteLLM Minor Fixes and Improvements (09/13/2024) ( #5689 )
...
* refactor: cleanup unused variables + fix pyright errors
* feat(health_check.py): Closes https://github.com/BerriAI/litellm/issues/5686
* fix(o1_reasoning.py): add stricter check for o-1 reasoning model
* refactor(mistral/): make it easier to see mistral transformation logic
* fix(openai.py): fix openai o-1 model param mapping
Fixes https://github.com/BerriAI/litellm/issues/5685
* feat(main.py): infer finetuned gemini model from base model
Fixes https://github.com/BerriAI/litellm/issues/5678
* docs(vertex.md): update docs to call finetuned gemini models
* feat(proxy_server.py): allow admin to hide proxy model aliases
Closes https://github.com/BerriAI/litellm/issues/5692
* docs(load_balancing.md): add docs on hiding alias models from proxy config
* fix(base.py): don't raise notimplemented error
* fix(user_api_key_auth.py): fix model max budget check
* fix(router.py): fix elif
* fix(user_api_key_auth.py): don't set team_id to empty str
* fix(team_endpoints.py): fix response type
* test(test_completion.py): handle predibase error
* test(test_proxy_server.py): fix test
* fix(o1_transformation.py): fix max_completion_token mapping
* test(test_image_generation.py): mark flaky test
2024-09-14 10:02:55 -07:00
Krish Dholakia
9c8f1d7815
anthropic prompt caching cost tracking ( #5453 )
...
* fix(utils.py): support 'drop_params' for embedding requests
Fixes https://github.com/BerriAI/litellm/issues/5444
* feat(anthropic/cost_calculation.py): Support calculating cost for prompt caching on anthropic
* feat(types/utils.py): allows us to migrate to openai's equivalent, once that comes out
* fix: fix linting errors
* test: mark flaky test
2024-08-31 14:09:35 -07:00
Ishaan Jaff
364492297d
feat - add fim codestral api
2024-06-17 13:46:03 -07:00
Krrish Dholakia
4f91205530
refactor(utils.py): refactor Logging to it's own class. Cut down utils.py to <10k lines.
...
Easier debugging
Reference: https://github.com/BerriAI/litellm/issues/4206
2024-06-15 10:57:20 -07:00
Krrish Dholakia
180bc46ca4
fix(bedrock_httpx.py): move anthropic bedrock calls to httpx
...
Fixing https://github.com/BerriAI/litellm/issues/2921
2024-05-16 21:51:55 -07:00
Krrish Dholakia
49ab1a1d3f
fix(bedrock_httpx.py): working async bedrock command r calls
2024-05-11 16:45:20 -07:00
Krrish Dholakia
ebe752fb61
build(pyproject.toml): drop certifi dependency (unused)
2024-01-10 08:09:03 +05:30
Krrish Dholakia
4905929de3
refactor: add black formatting
2023-12-25 14:11:20 +05:30
Krrish Dholakia
9fd7c5b343
test: set request timeout at request level
2023-11-15 17:42:31 -08:00
Krrish Dholakia
a7222f257c
fix(main.py): keep client consistent across calls + exponential backoff retry on ratelimit errors
2023-11-14 16:26:05 -08:00
Krrish Dholakia
45b6f8b853
refactor: fixing linting issues
2023-11-11 18:52:28 -08:00
Krrish Dholakia
d3323ba637
refactor(openai.py): making it compatible for openai v1
...
BREAKING CHANGE:
2023-11-11 15:33:02 -08:00
Krrish Dholakia
7c5fd5824b
refactor(azure.py): fix linting errors
2023-11-08 19:24:53 -08:00
Krrish Dholakia
0e7b83785b
fix(init.py): expose complete client session
2023-10-10 15:16:10 -07:00
Krrish Dholakia
b50013386f
fix(openai.py): enable custom proxy to pass in ca_bundle_path
2023-10-10 13:23:27 -07:00
ishaan-jaff
1bb2aefea1
all fixes to linting
2023-08-18 11:56:44 -07:00
ishaan-jaff
fbcb6d1c20
mypy linting fixes 2
2023-08-18 11:16:31 -07:00
ishaan-jaff
15b1da9dc8
add linting
2023-08-18 11:05:05 -07:00
Krrish Dholakia
a4cf7e1edd
added exception mapping to anthropic class
2023-08-12 17:39:11 -07:00