llama-gemma / patch_auth_test46.py
Leon4gr45's picture
Upload folder using huggingface_hub
fd54c60 verified
Raw History Blame Contribute Delete
729 Bytes
# Ah!
# If I use `env -u API_KEY ...`, then `llama-swap` is run WITHOUT `API_KEY`.
# BUT wait!
# If `llama-swap` is run without `API_KEY`, it shouldn't require authentication.
# AND if we pass `Authorization: Bearer sk-gemini` (as we hardcoded), `llama-swap` STILL REJECTS IT!
# Wait!
# Does `llama-swap` reject requests if they PROVIDE an authorization header but NO API KEY is configured?
# YES. In `llama-swap` or `llama-server`, providing an Authorization header when none is expected might cause a 401.
# Oh!
# If `llama-swap` doesn't have an API key, we should NOT send an Authorization header to it!
# BUT earlier, when I sent `{}` (no Authorization header), it ALSO failed with 401 Invalid API Key!
# Let me verify that!