You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following APIs are intended to be the long-term integration surface for the 0.1.x line:
6
+
7
+
-`guard_model_request()`
8
+
-`review_model_response()`
9
+
-`protect_model_call()`
10
+
-`protect_with_adapter()`
11
+
-`ToolPermissionFirewall`
12
+
-`RetrievalSanitizer`
13
+
14
+
These contracts are also exposed in `CORE_INTERFACES` so applications can log or assert the expected interface version.
15
+
16
+
## What Changed in 0.1.4
17
+
18
+
- Added richer multimodal/message-part handling for mixed text, image, and file content
19
+
- Added provider adapters for OpenAI, Anthropic, Gemini, and OpenRouter
20
+
- Added presets and route-level policy overrides
21
+
- Added custom prompt detector hooks for domain tuning
22
+
- Expanded rollout guidance, benchmarks, and regression notes
23
+
24
+
## Migration Notes
25
+
26
+
- If you previously passed message content as arrays of parts, 0.1.4 now preserves those parts in `content_parts` while still producing the text view in `content`.
27
+
- If you were wrapping providers manually, prefer `protect_with_adapter()` plus the adapter factories in `blackwall_llm_shield.providers`.
28
+
- If you want conservative rollout, switch to `preset="shadow_first"` before enabling hard blocking on every route.
Copy file name to clipboardExpand all lines: README.md
+61Lines changed: 61 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@ Python security toolkit for AI applications and LLM-enabled services. Blackwall
14
14
- Emits structured telemetry for prompt risk, masking volume, and output review outcomes
15
15
- Includes first-class provider adapters for OpenAI, Anthropic, Gemini, and OpenRouter
16
16
- Inspects outputs for leakage, unsafe code, grounding drift, and tone violations
17
+
- Handles mixed text, image, and file message parts more gracefully in text-first multimodal flows
18
+
- Adds operator-friendly telemetry summaries and stronger presets for RAG and agent-tool workflows
17
19
- Ships drop-in FastAPI/Flask middleware and LangChain/LlamaIndex callback helpers
18
20
- Enforces tool permissions and approval gates
19
21
- Sanitizes retrieval documents for RAG pipelines
@@ -67,6 +69,10 @@ Use `shadow_mode` with `shadow_policy_packs` or `compare_policy_packs` to measur
67
69
68
70
Use `create_openai_adapter()`, `create_anthropic_adapter()`, `create_gemini_adapter()`, or `create_openrouter_adapter()` with `protect_with_adapter()` when you want Blackwall to wrap the provider call end to end.
69
71
72
+
### Observability and control-plane support
73
+
74
+
Use `summarize_operational_telemetry()` with emitted telemetry events when you want route-level summaries, blocked-event counts, and rollout visibility for operators.
75
+
70
76
### Output grounding and tone review
71
77
72
78
`OutputFirewall` can compare a response to retrieval documents and flag unsupported claims or unprofessional tone before the answer leaves your service.
@@ -101,6 +107,17 @@ Helps keep hostile or manipulative text in retrieved documents from becoming mod
101
107
102
108
Pair it with `protect_model_call()` by passing sanitized documents into `firewall_options={"retrieval_documents": docs}` and gate any tool or admin action with `ToolPermissionFirewall`.
103
109
110
+
### Contract Stability
111
+
112
+
The 0.1.x line treats `guard_model_request()`, `protect_with_adapter()`, `review_model_response()`, `ToolPermissionFirewall`, and `RetrievalSanitizer` as the long-term integration contracts. The exported `CORE_INTERFACES` map can be logged or asserted by applications that want to pin expected behavior.
113
+
114
+
Recommended presets:
115
+
116
+
-`shadow_first` for low-friction rollout
117
+
-`strict` for high-sensitivity routes
118
+
-`rag_safe` for retrieval-heavy flows
119
+
-`agent_tools` for tool-calling and approval-gated agent actions
Produces signed events you can summarize into operations dashboards or audit pipelines.
@@ -177,12 +232,18 @@ Produces signed events you can summarize into operations dashboards or audit pip
177
232
-`make version-packages` explains the automated versioning flow for Python
178
233
- merges to `main` trigger release automation that prepares version/release PRs and publishes to PyPI after merge
179
234
235
+
## Migration and Benchmarks
236
+
237
+
- See [MIGRATING.md](/Users/vishnu/Documents/blackwall-llm-shield/blackwall-llm-shield-python/MIGRATING.md) for compatibility notes and stable contract guidance
238
+
- See [BENCHMARKS.md](/Users/vishnu/Documents/blackwall-llm-shield/blackwall-llm-shield-python/BENCHMARKS.md) for baseline latency numbers and regression coverage
239
+
180
240
## Rollout Notes
181
241
182
242
- Start with `preset="shadow_first"` or `shadow_mode=True` and inspect `report["telemetry"]` plus `on_telemetry` events before enabling hard blocking.
183
243
- Use `RetrievalSanitizer` and `ToolPermissionFirewall` in front of RAG, search, admin actions, and tool-calling flows.
184
244
- Add regression prompts for instruction overrides, prompt leaks, token leaks, and Australian PII samples so upgrades stay safe.
185
245
- Expect some latency increase from grounding checks, output review, and custom detectors; benchmark with your real prompt and response sizes before enforcing globally.
246
+
- For agent workflows, keep approval-gated tools and route-specific presets separate from end-user chat routes so operators can see distinct risk patterns.
0 commit comments