Open antoine-lizee opened 3 weeks ago
call litellm.register_model()
Can you share a sample script for repro? @antoine-lizee
Not on my computer but anything like this would print it:
litellm.register_model({"some_new_model_with_unknown_or_no_provider": {...}})
I can find a better example tomorrow.
What happened?
This is a formal bug, that's quite annoying because it's flooding our logs, but it's not breaking anything.
What's happening is that when you call
litellm.register_model()
it tries to see if there is an existing model with the given key by callingget_model_info()
which itself callsget_llm_provider()
(twice!?), which has this super weird lines:....before building an error.
Problems I see:
get_llm_provider()
behaves. (it tries to do too much imo)register_model
, we can maybe do something at this level?print
behindsuppress_debug_info
when we have a cleanlogger.debug()
debug
)register_models
😅In this case, I would vote for just removing the
print()
statements given that the error message is quite clear and has a reference to the url already. If you catch the exception, nothing happens as expected (including when we register models) if you don't catch the exception, the error will be shown, and it's much more helpful than this print statement.Relevant log output
Twitter / LinkedIn details
No response