Hey @susa . Have you tried adding the
messages
array in override_params in the config object? So your fallback config should look something like this:
{
"strategy": {
"mode": "fallback"
},
"targets": [
{
"virtual_key": "oai-vk",
"override_params": {
"model": "gpt-4"
}
},
{
"virtual_key": "oai-vk",
"override_params": {
"model": "gpt-3.5-turbo",
"messages": [...override_prompt_for_gpt-3.5]
}
}
]
}
When you do this, Portkey will first try the gpt-4 model with the messages sent in the request body. And if that fails, then it will try gpt-3.5-turbo but with the new messages array that you add in the override_params object for that target. Please let me know if this works for you.