-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support sending extra headers and changing auth header
This commit introduces support for adding extra HTTP headers that will be sent on every request to backends of type "openai" and "ollama". This is useful for providers implementing the OpenAI API but requiring extra headers, such as Portkey. For openai backends, the header used for authorization can also now be modified via the configuration setting `auth_header`. Azure OpenAI uses the "api-key" header instead of "Authorization". Previously, aiac used this header whenever the URL for the backend was not the default OpenAI API URL. This is clearly wrong as it's really only true for Azure OpenAI, and wrong for providers like Portkey. The new setting is now used instead, but if the URL is an Azure OpenAI URL, aiac will automatically know to use "api-key" instead of "Authorization".
- Loading branch information
Showing
5 changed files
with
73 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters