Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ollama ssl verify = False + Spend Logs reliability fixes #7931

Merged
merged 20 commits into from
Jan 24, 2025

Conversation

krrishdholakia
Copy link
Contributor

@krrishdholakia krrishdholakia commented Jan 23, 2025

Title

  • Ollama ssl verify = False
  • Spend Logs reliability fixes

Relevant issues

Closes #6499
Fixes issue where client app was passing user = int, which caused spend tracking to raise errors on proxy

Type

🆕 New Feature
🐛 Bug Fix

Changes

  • support ssl_verify as a litellm param - e.g. completion(...,ssl_verify=False), on proxy - litellm_param::ssl_verify: False
  • prevent end user failed request from breaking other tracking (team tracking)
  • drop bad log if raises constant error → raise an error/warning in logs so admin knows
  • convert end user id int to str on logging payloads

[REQUIRED] Testing - Attach a screenshot of any new tests passing locally

If UI changes, send a screenshot/GIF of working UI fixes

Copy link

vercel bot commented Jan 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2025 7:06am

@krrishdholakia krrishdholakia changed the title Litellm dev 01 22 2025 p3 Ollama ssl verify = False + Spend Logs reliability fixes Jan 23, 2025
@krrishdholakia krrishdholakia merged commit 1e011b6 into main Jan 24, 2025
3 of 20 checks passed
@krrishdholakia krrishdholakia deleted the litellm_dev_01_22_2025_p3 branch January 24, 2025 07:05
jarobey pushed a commit to jarobey/litellm that referenced this pull request Jan 28, 2025
* fix(http_handler.py): support passing ssl verify dynamically and using the correct httpx client based on passed ssl verify param

Fixes BerriAI#6499

* feat(llm_http_handler.py): support passing `ssl_verify=False` dynamically in call args

Closes BerriAI#6499

* fix(proxy/utils.py): prevent bad logs from breaking all cost tracking + reset list regardless of success/failure

prevents malformed logs from causing all spend tracking to break since they're constantly retried

* test(test_proxy_utils.py): add test to ensure bad log is dropped

* test(test_proxy_utils.py): ensure in-memory spend logs reset after bad log error

* test(test_user_api_key_auth.py): add unit test to ensure end user id as str works

* fix(auth_utils.py): ensure extracted end user id is always a str

prevents db cost tracking errors

* test(test_auth_utils.py): ensure get end user id from request body always returns a string

* test: update tests

* test: skip bedrock test- behaviour now supported

* test: fix testing

* refactor(spend_tracking_utils.py): reduce size of get_logging_payload

* test: fix test

* bump: version 1.59.4 → 1.59.5

* Revert "bump: version 1.59.4 → 1.59.5"

This reverts commit 1182b46.

* fix(utils.py): fix spend logs retry logic

* fix(spend_tracking_utils.py): fix get tags

* fix(spend_tracking_utils.py): fix end user id spend tracking on pass-through endpoints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: How to disable ssl verification for ollama?
1 participant