litellm - 💡(How to fix) Fix [Bug]: Cannot remove `extra_param` from model's `litellm_info` - PUT requests succeeds but value persists after refresh [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#23447Fetched 2026-04-08 00:44:13
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Timeline (top)
labeled ×2

When editing a model to add a custom field inside litellm_info (for example "extra_param": "this is a test"), once added the field cannot be removed. A subsequent PUT request to update the model returns the model without the extra_param, but after refreshing the UI, the extra_param is still present. This suggests the removal is not being persisted or there is a caching/inconsistency issue.

Root Cause

When editing a model to add a custom field inside litellm_info (for example "extra_param": "this is a test"), once added the field cannot be removed. A subsequent PUT request to update the model returns the model without the extra_param, but after refreshing the UI, the extra_param is still present. This suggests the removal is not being persisted or there is a caching/inconsistency issue.

Code Example

{
  "litellm_info": {
    "extra_param": "this is a test"
  }
}

---
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

Description

When editing a model to add a custom field inside litellm_info (for example "extra_param": "this is a test"), once added the field cannot be removed. A subsequent PUT request to update the model returns the model without the extra_param, but after refreshing the UI, the extra_param is still present. This suggests the removal is not being persisted or there is a caching/inconsistency issue.

Steps to reproduce

  1. Create any model
  2. Add a new field in litellm_info, for example:
{
  "litellm_info": {
    "extra_param": "this is a test"
  }
}
<img width="965" height="450" alt="Image" src="https://github.com/user-attachments/assets/ecb4b4df-ff5e-49a5-a445-0d701adb2f1a" /> The model contains the new fielld as expected <img width="1001" height="424" alt="Image" src="https://github.com/user-attachments/assets/f0df242f-597d-432e-bb49-51fee357812c" />
  1. Update the model again to remove the new field from 'litellm_info'
<img width="987" height="560" alt="Image" src="https://github.com/user-attachments/assets/b60b8a60-6a4e-4549-9345-0c8920f6b64c" /> The update returns the model without the field: <img width="956" height="383" alt="Image" src="https://github.com/user-attachments/assets/a3bb462c-3485-4158-8a87-1d28587b376f" />
  1. Refresh the page, and navigate to the model details again

Expected Behavior

The model should not include the 'extra_param' field

Actual Behavior

The model includes the removed 'extra_param' field <img width="973" height="399" alt="Image" src="https://github.com/user-attachments/assets/26a7d5f5-8953-4a99-8962-e63cfc3a6bf4" />

Steps to Reproduce

Relevant log output

What part of LiteLLM is this about?

UI Dashboard

What LiteLLM version are you on ?

v1.82.0

Twitter / LinkedIn details

No response

extent analysis

Fix Plan

To resolve the issue of the custom field not being removed from litellm_info, we need to ensure that the update operation correctly persists the changes. Here are the steps:

  • Update the model update endpoint:
    • Check if the litellm_info object is being correctly updated in the database.
    • Verify that the update operation is not ignoring the removal of the extra_param field.
  • Implement a cache invalidation mechanism:
    • If the UI is caching the model data, implement a cache invalidation mechanism to ensure that the updated model data is fetched from the database after an update operation.
  • Example code snippet:
# Assuming a Python backend with a database model
from models import Model

def update_model(model_id, updated_data):
    model = Model.objects.get(id=model_id)
    model.litellm_info = updated_data.get('litellm_info', {})
    model.save()
    # Invalidate cache
    cache.delete(f'model_{model_id}')
  • Verify database updates:
    • Check the database to ensure that the litellm_info object is being correctly updated.

Verification

To verify that the fix worked:

  • Update a model to add a custom field to litellm_info.
  • Remove the custom field and update the model again.
  • Refresh the page and navigate to the model details to ensure that the custom field is no longer present.

Extra Tips

  • Ensure that the update endpoint is correctly handling the removal of fields from the litellm_info object.
  • Implement logging to track any issues with the update operation or cache invalidation.
  • Consider implementing a retry mechanism to handle any transient errors during the update operation.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - 💡(How to fix) Fix [Bug]: Cannot remove `extra_param` from model's `litellm_info` - PUT requests succeeds but value persists after refresh [1 participants]