What's the intended way to fallback from anthropic to openai #2265
Replies: 2 comments 4 replies
|
Hey Nick Thapen (@Hellebore), what version are you running? This should work out of the box when you pass |
4 replies
This comment has been hidden.
This comment has been hidden.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I've been running into problems trying to add a fallback from anthropic to openai, in case of rate limiting or other issues with anthropic.
When I use ModelFallbackMiddleware with Anthropic primary + OpenAI fallback, the fallback path inherits Anthropic-specific model_settings from AnthropicPromptCachingMiddleware (specifically cache_control), and the OpenAI chat completions client then fails with TypeError: AsyncCompletions.create() got an unexpected keyword argument 'cache_control'.
Also it seems difficult to add fallbacks for e.g. subagents and summarisation.
Whats the intended way of doing this falling back in general?
Thanks!
All reactions