We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I would like to implement an Agent with a custom and strong retry mechanism with fallback to another llm model if something goes wrong.
LiteLLM implements a router to do that: https://docs.litellm.ai/docs/routing
However I cannot pass a Router instance to the model params of the Agent.
You Documentation says the we need to set the model to an instance of LitellmModel, but there is no way to specify a fallback strategy.
Is there a way to do that?
from litellm.router import Router router = Router( model_list=[ { "model_name": "gemini-1.5-flash", "litellm_params": {"model": "gemini/gemini-1.5-flash"}, "timeout": 120, "retries": 1, }, { "model_name": "gemini-1.5-pro-latest", "litellm_params": {"model": "gemini/gemini-1.5-flash"}, "timeout": 80, }, ], fallbacks=[{"gemini-1.5-flash": ["gemini-1.5-pro-latest"]}], ) agent = Agent( name="My Agent", instructions=", model=router, # cannot do that )
Have the possibility to pass a LiteLLM router or specify a fallback strategy for an Agent
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the question
I would like to implement an Agent with a custom and strong retry mechanism with fallback to another llm model if something goes wrong.
LiteLLM implements a router to do that: https://docs.litellm.ai/docs/routing
However I cannot pass a Router instance to the model params of the Agent.
You Documentation says the we need to set the model to an instance of LitellmModel, but there is no way to specify a fallback strategy.
Is there a way to do that?
Debug information
Repro steps
Expected behavior
Have the possibility to pass a LiteLLM router or specify a fallback strategy for an Agent
The text was updated successfully, but these errors were encountered: