llm-viewer
v0.1.0
Published
Local Anthropic-compatible LLM proxy and request inspector
Downloads
28
Maintainers
Readme
LLM Viewer
LLM Viewer is a local proxy and request inspector for Anthropic-compatible APIs. It forwards streaming and non-streaming requests and records their responses for inspection in a web UI.
OpenAI-compatible endpoints are not supported yet.
Install
Node.js 20 or later is required.
Run with npm:
npx llm-viewerOr install globally:
npm install --global llm-viewer
llm-viewerTo run from source:
git clone [email protected]:tyler66737/llm-viewer.git
cd llm-viewer
npm install
npm run build
npm startOpen http://127.0.0.1:8787 after startup.
Configure
Open Settings in the web UI to configure:
- Anthropic-compatible base URL
- Optional full Messages URL
- Optional server-side API key
- Local record directory
The default upstream is:
https://api.anthropic.com/v1/messagesFor DeepSeek, set the base URL to:
https://api.deepseek.com/anthropicIf no server-side API key is configured, the proxy forwards the client's x-api-key header.
Use
Point the client's Anthropic base URL to:
http://127.0.0.1:8787/anthropicExample request:
curl http://127.0.0.1:8787/anthropic/v1/messages \
-H 'content-type: application/json' \
-H 'anthropic-version: 2023-06-01' \
-H 'x-api-key: YOUR_API_KEY' \
-d '{
"model": "claude-sonnet-4-5",
"max_tokens": 256,
"stream": true,
"messages": [{"role": "user", "content": "Hello"}]
}'CLI Options
llm-viewer --host 127.0.0.1 --port 8787
llm-viewer --helpThe server listens on 127.0.0.1:8787 by default. Binding to 0.0.0.0 exposes the UI and APIs to the local network.
Local Data
~/.llm-viewer/
├── settings.json
└── data/
├── index.json
└── records/