mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-16 09:22:22 +00:00
fix(anthropic): accept tuple edits when deriving context-management betas
The GitHub Copilot safeguard passes context_management edits as a tuple, which the shared helper ignored, so the dangerous beta check stopped seeing them
This commit is contained in:
parent
408372dbcb
commit
8db6f0d5ed
1 changed files with 1 additions and 1 deletions
|
|
@ -350,7 +350,7 @@ def _beta_header_values(side: str | Sequence[str] | None) -> tuple[str, ...]:
|
|||
|
||||
def context_management_betas(context_management: JsonValue) -> frozenset[str]:
|
||||
edits: Final = context_management.get("edits") if isinstance(context_management, dict) else None
|
||||
if not isinstance(edits, list):
|
||||
if not isinstance(edits, (list, tuple)):
|
||||
return frozenset()
|
||||
return frozenset(
|
||||
ANTHROPIC_BETA_HEADER_VALUES.COMPACT_2026_01_12.value
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue