Skip to content
New issue

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

fix: add support for Azure OpenAI Services endpoints #1286

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

senk
Copy link
Contributor

@senk senk commented Oct 30, 2024

Context

adds support for Azure OpenAI Services endpoints.

Proposed solution

add another header api-key that is required for azure openai services endpoints.
OpenAI ignores the api-key header and Microsofts token auth ignores the Authorization header so this is a pragmatic solutionto just set both to same value.
Bonus: support for EntraID auth also is working (which uses the Authorization Header)

Related issues

fix #1282

Has this been tested?

  • 👍 yes, I added tests to the test suite
  • 💭 no, because this PR is a draft and still needs work
  • 🙅 no, because this is not relevant here
  • 🙋 no, because I need help

Copy link
Member

@paulfitz paulfitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this @senk! It feels a little icky to sprinkle the API key into multiple headers unconditionally. I can imagine theoretical scenarios in which it isn't great. But in practice for something as swiftly changing as AI-related endpoints this seems right, and preferable to adding some extra configuration option.

@paulfitz paulfitz merged commit d7dda4d into gristlabs:main Oct 30, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Azure OpenAI Services Endpoints
2 participants