Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions sandboxes/llm_local/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,27 @@ Run `make help` to see all commands:

## Testing the Mock API

### Authentication

Every `/v1/*` route needs this header:

```
Authorization: Bearer sk-mock-key
```

`/health` does not. The key is public by design: `make up` prints it, the clients hardcode it, and
it is listed below under Notes.

Point an OpenAI-compatible client at `http://localhost:8000/v1` with `sk-mock-key` as its API key.

What a request without a good header gets back:

| Header sent | Response |
|---|---|
| none | `401 Missing Authorization header` |
| `Basic sk-mock-key` | `401 Invalid authentication scheme` |
| `Bearer something-else` | `401 Invalid API key` |

### Health Check
```bash
curl http://localhost:8000/health
Expand Down