with open("gateway.py", "r") as f: code = f.read() # So `llama-swap` is run WITHOUT `env -u`. It inherits `API_KEY`! # `llama-swap` therefore expects an API Key for authentication if the environment variable `API_KEY` is present. # My latest commit sets `llama_auth_headers()` to: # ```python # def llama_auth_headers() -> dict[str, str]: # internal_key = LLAMA_API_KEY or API_KEY # if internal_key: # return {"Authorization": f"Bearer {internal_key}"} # return {} # ``` # It IS sending `Authorization: Bearer `! # Why does `llama-swap` reject it? # Let's write a python script to hit `llama-swap` directly in the container to figure it out!