mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
Fix mypy type error in fireworks_ai transformation (#20391)
Cast message to dict before calling pop() to satisfy mypy's type checker. The message is typed as a Union of TypedDicts which don't have the 'provider_specific_fields' key, but the runtime check already confirms it's a dict with this key.
This commit is contained in:
parent
d2e113111f
commit
d1994a148d
1 changed files with 1 additions and 1 deletions
|
|
@ -239,7 +239,7 @@ class FireworksAIConfig(OpenAIGPTConfig):
|
|||
# Remove fields not permitted by FireworksAI that may cause:
|
||||
# "Not permitted, field: 'messages[n].provider_specific_fields'"
|
||||
if isinstance(message, dict) and "provider_specific_fields" in message:
|
||||
message.pop("provider_specific_fields", None)
|
||||
cast(dict, message).pop("provider_specific_fields", None)
|
||||
|
||||
return messages
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue