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

[Bug]: Error after deleting fallback using UI #8331

Closed
vargacypher opened this issue Feb 6, 2025 · 5 comments · Fixed by #8550
Closed

[Bug]: Error after deleting fallback using UI #8331

vargacypher opened this issue Feb 6, 2025 · 5 comments · Fixed by #8550
Assignees
Labels
bug Something isn't working mlops user request

Comments

@vargacypher
Copy link

What happened?

We're testing litllm proxy server to helped us with fallbacks, and we're facing a problem when trying to delete a fallback rule and recreating it.

  • Docker deployment using litellm:main-latest
  • Postgres DB

config.yaml

model_list:
  - model_name: gpt-4o-mini
    litellm_params:
      model: openai/gpt-4o-mini
      api_key: os.environ/OPENAI_API_KEY     
  - model_name: gpt-4o
    litellm_params:
      model: openai/gpt-4o
      api_key: os.environ/OPENAI_API_KEY   
  - model_name: gemini-pro
    litellm_params:
      model: vertex_ai/gemini-2.0-flash-001 
      vertex_project: "project"
      vertex_location: "us-central1"
      vertex_credentials: "/app/user.json" 

How to replicate:

In UI panel >> router settings >> add falbacks >> test

Image

Success

In UI panel >> router settings >> delete falbacks >> add (updated) fallback >> test

Image

Error

Relevant log output

Error occurred while generating model response. Please try again. Error: Error: 500 litellm.InternalServerError: This is a mock exception for model=gemini-pro, to trigger a fallback. Fallbacks=[{}, {'gemini-pro': ['gpt-4o-mini']}] Received Model Group=gemini-pro Available Model Group Fallbacks=None Error doing the fallback: list index out of range

Are you a ML Ops Team?

Yes

What LiteLLM version are you on ?

latest

Twitter / LinkedIn details

No response

@vargacypher vargacypher added the bug Something isn't working label Feb 6, 2025
@krrishdholakia krrishdholakia self-assigned this Feb 7, 2025
@krrishdholakia
Copy link
Contributor

Thank you for this issue @vargacypher i'll pick this up tomorrow.

@rzqtet
Copy link

rzqtet commented Feb 11, 2025

For me to fix it I needed to open LiteLLM_Config table in the database and add it manually

Image

@krrishdholakia
Copy link
Contributor

cc: @ishaan-jaff for qa

@krrishdholakia
Copy link
Contributor

Picking this up today

@dkindlund
Copy link

Yeah, deleting and re-adding fallback model groups via the Admin UI doesn't work either -- you'll just end up creating more empty placeholders in the array stored in the DB:

prod-litellm-conf=> select param_value from "LiteLLM_Config" where param_name = 'router_settings';
                                                                                                                                param_value
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 {"timeout": 6000.0, "fallbacks": [{}, {}], "num_retries": 3, "retry_after": 5.0, "allowed_fails": 1, "cooldown_time": 30.0, "routing_strategy": "latency-based-routing", "routing_strategy_args": {"ttl": 3600, "lowest_latency_buffer": 0, "max_latency_list_size": 10}}
(1 row)

This part is clearly the bug:

"fallbacks": [{}, {}]

krrishdholakia added a commit that referenced this issue Feb 15, 2025
* refactor(organization.tsx): initial commit with orgs tab refactor

make it similar to 'Teams' tab - simplifies org management actions

* fix(page.tsx): pass user orgs to component

* fix(organization_view.tsx): fix to pull info from org info endpoint

* feat(organization_endpoints.py): return org members when calling /org/info

* fix(organization_view.tsx): show org members on info page

* feat(organization_view.tsx): allow adding user to org via user email

Resolves #8330

* fix(organization_endpoints.py): raise better error when duplicate user_email found in db

* fix(organization_view.tsx): cleanup user_email for now

not in initial org info - will need to prefetch

* fix(page.tsx): fix getting user models on page load

allows passing down the user models to org

* fix(organizations.tsx): fix creating org on ui

* fix(proxy/_types.py): include org created at and updated at

cleans up ui

* fix(navbar.tsx): cleanup

* fix(organizations.tsx): fix tpm/rpm limits on org

* fix(organizations.tsx): fix linting error

* fix(organizations.tsx): fix linting \

* (Feat) - Add `/bedrock/meta.llama3-3-70b-instruct-v1:0` tool calling support + cost tracking + base llm unit test for tool calling (#8545)

* Add support for bedrock meta.llama3-3-70b-instruct-v1:0 tool calling (#8512)

* fix(converse_transformation.py): fixing bedrock meta.llama3-3-70b tool calling

* test(test_bedrock_completion.py): adding llama3.3 tool compatibility check

* add TestBedrockTestSuite

* add bedrock llama 3.3 to base llm class

* us.meta.llama3-3-70b-instruct-v1:0

* test_basic_tool_calling

* TestAzureOpenAIO1

* test_basic_tool_calling

* test_basic_tool_calling

---------

Co-authored-by: miraclebakelaser <65143272+miraclebakelaser@users.noreply.github.com>

* fix(general_settings.tsx): filter out empty dictionaries post fallback delete (#8550)

Fixes #8331

* bump: version 1.61.3 → 1.61.4

* (perf) Fix memory leak on `/completions` route (#8551)

* initial mem util test

* fix _cached_get_model_info_helper

* test memory usage

* fix tests

* fix mem usage

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
Co-authored-by: miraclebakelaser <65143272+miraclebakelaser@users.noreply.github.com>
abhijitherekar pushed a commit to acuvity/litellm that referenced this issue Feb 20, 2025
abhijitherekar pushed a commit to acuvity/litellm that referenced this issue Feb 20, 2025
* refactor(organization.tsx): initial commit with orgs tab refactor

make it similar to 'Teams' tab - simplifies org management actions

* fix(page.tsx): pass user orgs to component

* fix(organization_view.tsx): fix to pull info from org info endpoint

* feat(organization_endpoints.py): return org members when calling /org/info

* fix(organization_view.tsx): show org members on info page

* feat(organization_view.tsx): allow adding user to org via user email

Resolves BerriAI#8330

* fix(organization_endpoints.py): raise better error when duplicate user_email found in db

* fix(organization_view.tsx): cleanup user_email for now

not in initial org info - will need to prefetch

* fix(page.tsx): fix getting user models on page load

allows passing down the user models to org

* fix(organizations.tsx): fix creating org on ui

* fix(proxy/_types.py): include org created at and updated at

cleans up ui

* fix(navbar.tsx): cleanup

* fix(organizations.tsx): fix tpm/rpm limits on org

* fix(organizations.tsx): fix linting error

* fix(organizations.tsx): fix linting \

* (Feat) - Add `/bedrock/meta.llama3-3-70b-instruct-v1:0` tool calling support + cost tracking + base llm unit test for tool calling (BerriAI#8545)

* Add support for bedrock meta.llama3-3-70b-instruct-v1:0 tool calling (BerriAI#8512)

* fix(converse_transformation.py): fixing bedrock meta.llama3-3-70b tool calling

* test(test_bedrock_completion.py): adding llama3.3 tool compatibility check

* add TestBedrockTestSuite

* add bedrock llama 3.3 to base llm class

* us.meta.llama3-3-70b-instruct-v1:0

* test_basic_tool_calling

* TestAzureOpenAIO1

* test_basic_tool_calling

* test_basic_tool_calling

---------

Co-authored-by: miraclebakelaser <65143272+miraclebakelaser@users.noreply.github.com>

* fix(general_settings.tsx): filter out empty dictionaries post fallback delete (BerriAI#8550)

Fixes BerriAI#8331

* bump: version 1.61.3 → 1.61.4

* (perf) Fix memory leak on `/completions` route (BerriAI#8551)

* initial mem util test

* fix _cached_get_model_info_helper

* test memory usage

* fix tests

* fix mem usage

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
Co-authored-by: miraclebakelaser <65143272+miraclebakelaser@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mlops user request
Projects
None yet
4 participants