gateway icon indicating copy to clipboard operation
gateway copied to clipboard

custom-host in header overwrites custom_host in config.providers.custom_host in fallback mode

Open villageFlower opened this issue 7 months ago • 0 comments

What Happened?

Hi, the custom_host in config providers does not work when given x-portkey-custom-host in request headers. All fallback providers tends to use the one given in x-portkey-custom-host instead of the one in x-portkey-config. Thank you for the project and feel free to approch me for more details

What Should Have Happened?

No response

Relevant Code Snippet

below is the demo config file. Eventhough custom_host is specified. It still goes to x-portkey-custom-host { "strategy": { "mode": "fallback" }, "targets": [ { "provider": "openai", "api_key": "OPENAI_API_KEY_FROM_HOST_2","custom_host":"HOST_1" }, { "provider": "openai", "api_key": "OPENAI_API_KEY_FROM_HOST_2","custom_host":"HOST_2" } ] }

Your Twitter/LinkedIn

No response

villageFlower avatar Jul 07 '24 19:07 villageFlower