7 views
-/https://github.com/berriai/litellm/issues/28902
GitHub · issue

#28902 [Bug]: Search-tool edits overwrite real API keys with masked display values

  • State: open
  • Author: @lullu57
  • Labels: potential-duplicate

### Check for existing issues

- [X] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

`/search_tools/list` returns each tool's `litellm_params.api_key` masked (for example `sk****et`). The dashboard's search-tool edit modal pre-fills its form from that masked value, and the submit path always sends `litellm_params.api_key` back to `PUT /search_tools/{id}`. The backend stores the supplied `litellm_params` as-is, so saving an unchanged or metadata-only edit replaces the real provider credential with the masked placeholder string and breaks the search tool.

**Observed:** The edit form initializes `api_key` from the masked value returned by `/search_tools/list`. `handleEditSubmit` includes that masked value in the payload, and `update_search_tool_in_db` overwrites the stored `litellm_params` with whatever the request supplies. The real API key is replaced with the masked placeholder (for example `sk****et`), and the search tool stops working until a human re-enters the key.

**Expected:** A metadata-only edit should not modify the stored API key. If the user did not enter a new key, the backend should keep the previously stored sec…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (6 events)
#0 of 0 · 31d19h14m11s ago — entered · #import:https:::github.com:berriai:litellm post #1654
28902 is harder because it spans frontend form-state handling, backend credential-preservation semantics, sensitive-data safety, and regression testing across update paths; 34111 is more localized to provider-specific parameter translation and compatibility tests.
The right issue is harder because it requires coordinated frontend and backend changes around secret-preserving update semantics, masking behavior, validation, and regression coverage. The left issue is comparatively localized to correcting parameter propagation through an existing provider token-counting path with focused tests.
The right issue is harder because it requires coordinated frontend and backend changes around secret redaction, update semantics, persistence safety, and regression coverage. The left issue is comparatively contained to Azure model integration, configuration, and compatibility tests.
The right issue is harder because it spans frontend state handling, API update semantics, persistence, credential-preservation safeguards, and regression testing. The left issue is comparatively localized to callback field normalization and response extraction.
The right issue is harder because it spans dashboard form state, request construction, and backend persistence semantics, with security-sensitive masking and backward-compatibility cases requiring coordinated changes and broader tests. The left issue is comparatively localized to streaming error classification and fallback behavior, mainly requiring a focused code change plus regression coverage.
#0 of 0 · 31d18h48m41s ago — current · #import:https:::github.com:berriai:litellm post #2076
Cross-layer UI and backend persistence changes with security-sensitive credential handling and compatibility testing make the right issue substantially broader than the localized response-field mapping and regression coverage needed on the left.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search