Skip to content

Conversation

@jtpio
Copy link
Contributor

@jtpio jtpio commented Dec 2, 2025

Description

As mentioned in https://mozilla-ai.github.io/any-llm/gateway/quickstart/, the X-AnyLLM-Key header must be provided to specify the master key when using the any-llm gateway:

  -H "X-AnyLLM-Key: Bearer ${GATEWAY_MASTER_KEY}" \

However it may be impractical to provide with existing generic OpenAI providers.

So it would make sense to also support reading the key from the Authorization header.

PR Type

🆕 New Feature

Relevant issues

Checklist

  • I have added unit tests that prove my fix/feature works
  • New and existing tests pass locally
  • Documentation was updated where necessary
  • I have read and followed the contribution guidelines```

@codecov
Copy link

codecov bot commented Dec 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 43 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jtpio jtpio marked this pull request as ready for review December 3, 2025 12:18
@jtpio
Copy link
Contributor Author

jtpio commented Dec 3, 2025

The last commit should have addressed the lint issues.

Marking as ready so folks could take a first look already.

@daavoo daavoo self-requested a review December 3, 2025 12:22
Copy link
Contributor

@daavoo daavoo left a comment

Choose a reason for hiding this comment

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

Thanks @jtpio ! Changes make sense to me.
I have tested manually and it works.

Will add a test actually using the OpenAI client to do a completions request in a followup

@daavoo daavoo merged commit 82e3a85 into mozilla-ai:main Dec 4, 2025
9 of 11 checks passed
@jtpio jtpio deleted the authorization-header branch December 4, 2025 13:16
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.

2 participants