You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Since LiteLLM has many different providers, we add some additional parameter logging here.
206
+
# There's two sets of parameters we have to look at:
207
+
# - unsupported_openai_params: standard OpenAI parameters that LiteLLM will automatically drop for us when `drop_params=True` if the provider doesn't support them.
208
+
# - unknown_keys: parameters that LiteLLM doesn't know about, aren't standard OpenAI parameters, and might be used by the provider. We don't drop these.
unknown_keys= [] # Keys that are unknown to litellm.
212
+
unsupported_openai_params= [] # OpenAI params that are known to litellm but not supported for this model/provider.
198
213
forkeyinbackend_specific.keys():
199
214
ifkeynotinsupported_params:
200
-
unsupported_openai_params.append(key)
201
-
202
-
# if len(unknown_keys) > 0:
203
-
# FancyLogger.get_logger().warning(
204
-
# f"litellm allows for unknown / non-openai input params; mellea won't validate the following params that may cause issues: {', '.join(unknown_keys)}"
205
-
# )
215
+
ifkeyinstandard_openai_subset:
216
+
# LiteLLM is pretty confident that this standard OpenAI parameter won't work.
217
+
unsupported_openai_params.append(key)
218
+
else:
219
+
# LiteLLM doesn't make any claims about this parameter; we won't drop it but we will keep track of it..
220
+
unknown_keys.append(key)
221
+
222
+
iflen(unknown_keys) >0:
223
+
FancyLogger.get_logger().warning(
224
+
f"litellm allows for unknown / non-openai input params; mellea won't validate the following params that may cause issues: {', '.join(unknown_keys)}"
225
+
)
206
226
207
227
iflen(unsupported_openai_params) >0:
208
228
FancyLogger.get_logger().warning(
209
-
f"litellm will automatically drop the following openai keys that aren't supported by the current model/provider: {', '.join(unsupported_openai_params)}"
229
+
f"litellm may drop the following openai keys that it doesn't seem to recognize as being supported by the current model/provider: {', '.join(unsupported_openai_params)}"
0 commit comments