docs(llm_local): document the mock API key - #87
Merged
felipepenha merged 2 commits intoSep 20, 2026
Merged
felipepenha merged 2 commits into
felipepenha merged 2 commits into
Conversation
The README does mention sk-mock-key, in the chat completion curl example and in a Notes bullet near the bottom. What it lacks is the key anywhere a reader looks before their first request: there is no authentication section, and the base URL appears without it. Point a client at http://localhost:8000/v1, get a 401, and nothing explains why until a curl example further down. This adds an Authentication subsection at the top of Testing the Mock API, saying which routes need the header and what a missing header, a wrong key and a non-Bearer scheme each return. No other prose changed. Closes GenAI-Security-Project#83.
felipepenha
requested changes
Sep 20, 2026
Felipe's review on GenAI-Security-Project#87: the response documented here is the one GenAI-Security-Project#86 changes, so the table now reads `401 Missing Authorization header` with no credential in it. Also drops an em-dash from the Authentication paragraph.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #83. Adds an Authentication subsection to the
llm_localREADME.Correction to my own issue first: the README does mention
sk-mock-key, in the chat completion curl example and in a Notes bullet near the bottom. I said it never does, which was wrong.The problem is that it isn't anywhere readers look before their first request. There is no auth section, and the base URL appears without the key. Point a client at
http://localhost:8000/v1, get a 401, and nothing in the doc explains why until the curl example further down.Changes
README.md: new "Authentication" subsection at the top of "Testing the Mock API":Authorization: Bearer sk-mock-key(/v1/*) and which don't (/health)Bearerscheme each returnhttp://localhost:8000/v1with that keyNo other prose changed. The models endpoint is documented in #86, so this PR doesn't describe a route that hasn't landed.