mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
chore: converge to upstream (deepkeep feature merged as #33844)
Drop the two remaining local deltas now that the DeepKeep guardrail is
merged upstream and hardened there:
- proxy_server.py normalize_callback string-filter (not taken upstream;
belongs in a separate PR if still desired)
- add_guardrail_form.tsx preserve={true} (redundant; antd v5 default)
The structured_messages fix made via the PR UI is already present in
upstream's version, so the branch is now identical to
upstream/litellm_internal_staging.
This commit is contained in:
parent
4e682bae63
commit
2423eeca2e
2 changed files with 2 additions and 7 deletions
|
|
@ -15865,17 +15865,13 @@ async def get_config(
|
|||
_failure_callbacks = _litellm_settings.get("failure_callback", [])
|
||||
_success_and_failure_callbacks = _litellm_settings.get("callbacks", [])
|
||||
|
||||
# Normalize string callbacks to lists; filter out non-string entries
|
||||
# (e.g. callback objects stored in litellm.callbacks at runtime) so
|
||||
# that process_callback() always receives plain string names.
|
||||
# Normalize string callbacks to lists
|
||||
def normalize_callback(callback):
|
||||
if isinstance(callback, str):
|
||||
return [callback]
|
||||
elif callback is None:
|
||||
return []
|
||||
elif isinstance(callback, list):
|
||||
return [c for c in callback if isinstance(c, str)]
|
||||
return []
|
||||
return callback
|
||||
|
||||
_success_callbacks = normalize_callback(_success_callbacks)
|
||||
_failure_callbacks = normalize_callback(_failure_callbacks)
|
||||
|
|
|
|||
|
|
@ -1064,7 +1064,6 @@ const AddGuardrailForm: React.FC<AddGuardrailFormProps> = ({ visible, onClose, a
|
|||
<Form
|
||||
form={form}
|
||||
layout="vertical"
|
||||
preserve={true}
|
||||
initialValues={{
|
||||
mode: "pre_call",
|
||||
default_on: false,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue