]> git.99rst.org Git - sgasser-llm-shield.git/commitdiff
Update tested integration docs (#117)
authorStefan Gasser <redacted>
Wed, 24 Jun 2026 06:34:12 +0000 (08:34 +0200)
committerGitHub <redacted>
Wed, 24 Jun 2026 06:34:12 +0000 (08:34 +0200)
docs/api-reference/anthropic.mdx
docs/api-reference/mask.mdx
docs/api-reference/status.mdx
docs/use-cases/apps.mdx

index 5f5f2e15d9500a309df6b235c7f69714aa2ab80b..6afd02c0a1a55373b373f420bbdf6f2aef27afbc 100644 (file)
@@ -21,7 +21,7 @@ curl http://localhost:3000/anthropic/v1/messages \
   -H "anthropic-version: 2023-06-01" \
   -H "Content-Type: application/json" \
   -d '{
-    "model": "claude-sonnet-4-20250514",
+    "model": "claude-sonnet-4-6",
     "max_tokens": 1024,
     "messages": [
       {"role": "user", "content": "Hello"}
@@ -33,7 +33,7 @@ curl http://localhost:3000/anthropic/v1/messages \
 
 | Parameter | Type | Required | Description |
 |-----------|------|----------|-------------|
-| `model` | string | Yes | Model ID (e.g., `claude-sonnet-4-20250514`) |
+| `model` | string | Yes | Model ID (e.g., `claude-sonnet-4-6`) |
 | `messages` | array | Yes | Conversation messages |
 | `max_tokens` | number | Yes | Maximum tokens to generate |
 | `stream` | boolean | No | Enable streaming |
@@ -49,7 +49,7 @@ All [Anthropic Messages API](https://platform.claude.com/docs/en/api/messages) p
   "id": "msg_abc123",
   "type": "message",
   "role": "assistant",
-  "model": "claude-sonnet-4-20250514",
+  "model": "claude-sonnet-4-6",
   "content": [
     {
       "type": "text",
@@ -76,7 +76,7 @@ from anthropic import Anthropic
 client = Anthropic(base_url="http://localhost:3000/anthropic")
 
 with client.messages.stream(
-    model="claude-sonnet-4-20250514",
+    model="claude-sonnet-4-6",
     max_tokens=1024,
     messages=[{"role": "user", "content": "Write a haiku"}]
 ) as stream:
@@ -92,7 +92,7 @@ const client = new Anthropic({
 });
 
 const stream = client.messages.stream({
-  model: 'claude-sonnet-4-20250514',
+  model: 'claude-sonnet-4-6',
   max_tokens: 1024,
   messages: [{ role: 'user', content: 'Write a haiku' }]
 });
@@ -122,9 +122,9 @@ PasteGuard adds headers to indicate PII and secrets handling:
 
 ## Content Types
 
-PasteGuard scans all text content in Anthropic requests:
+PasteGuard scans configured text roles in Anthropic requests. By default it scans:
 
 - **User messages** — String content or text blocks
-- **Assistant messages** — Including thinking blocks
-- **System prompts** — String or content block array
 - **Tool results** — Text content in tool responses
+
+Assistant messages and system prompts are available as scan roles, but are skipped by default. Add them to `pii_detection.scan_roles` or `secrets_detection.scan_roles` if you want PasteGuard to inspect them.
index 6bb71f6430b93fe7bd9ddfebb3563978b2172910..33a5e9b63136e3d19d8d0e09ac0b438f557cbfa9 100644 (file)
@@ -86,7 +86,7 @@ curl -X POST http://localhost:3000/api/mask \
 curl -X POST http://localhost:3000/api/mask \
   -H "Content-Type: application/json" \
   -d '{
-    "text": "-----BEGIN RSA PRIVATE KEY-----\nMIIE...",
+    "text": "-----BEGIN RSA PRIVATE KEY-----\nMIIE...\n-----END RSA PRIVATE KEY-----",
     "detect": ["secrets"]
   }'
 ```
@@ -95,7 +95,7 @@ curl -X POST http://localhost:3000/api/mask \
 curl -X POST http://localhost:3000/api/mask \
   -H "Content-Type: application/json" \
   -d '{
-    "text": "Contact john@example.com with key -----BEGIN RSA PRIVATE KEY-----..."
+    "text": "Contact john@example.com with key -----BEGIN RSA PRIVATE KEY-----\nMIIE...\n-----END RSA PRIVATE KEY-----"
   }'
 ```
 
index 72e898e2f746a8923fea9e676229431195342bf7..f34f0e0a04bc48a436fbf32c9628eebb0512e82b 100644 (file)
@@ -66,7 +66,7 @@ curl http://localhost:3000/info
 ```json
 {
   "name": "PasteGuard",
-  "version": "1.0.0",
+  "version": "0.6.0",
   "description": "Privacy proxy for LLMs",
   "mode": "mask",
   "providers": {
index 438a2a02d6c3750a9146184b06f521826af4c74f..ff53d1d2cdfa8352b42121db9ff25559500cb911 100644 (file)
@@ -12,6 +12,7 @@ Point Open WebUI to PasteGuard instead of OpenAI directly:
 
 ```bash
 OPENAI_API_BASE_URL=http://localhost:3000/openai/v1
+OPENAI_API_KEY=your_openai_api_key
 ```
 
 <Note>In Docker Compose, use the service name instead of `localhost` (e.g., `http://pasteguard:3000/openai/v1`).</Note>
@@ -21,7 +22,7 @@ OPENAI_API_BASE_URL=http://localhost:3000/openai/v1
 Add PasteGuard as a custom endpoint in your LibreChat configuration:
 
 ```yaml
-version: 1.2.8
+version: 1.3.13
 cache: true
 endpoints:
   custom:
git clone https://git.99rst.org/PROJECT