Skip to content

llm_local: the mock requires Authorization: Bearer sk-mock-key and the README does not say so #83

Description

@wehnsdaefflae

The second note split out of #59.

sandboxes/llm_local's mock rejects a request without Authorization: Bearer sk-mock-key, even though the backend is local and nothing is being paid for. Read out of app/mocks/openai.py.

The value is not hard to find once you know to look, but nothing in the sandbox's README says a key is needed at all — and since the whole point of a local mock is that it needs no credential, the natural first attempt omits the header and gets a 401. For a teaching sandbox aimed at people learning to red-team these systems, that is a wrong first impression of why the request failed.

Enforcing it is a reasonable choice: it keeps the sandbox honest about the auth path a real provider has. The fix is one line in sandboxes/llm_local/README.md naming the key, beside the base URL a user is already copying.

Happy to send that PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions