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
Pipeline:
- Fix early-exit logic that prevented Stage 2 from ever running.
When Stage 2 is enabled, ALL messages now flow to the embedding
classifier (except definitive self_harm from Stage 1).
Previously, score=0.0 from heuristics triggered early-exit before
Stage 2 had a chance — defeating its entire purpose.
- Fix Stage 3 warning only shown when 3 is in enabled_stages.
Users with [1] or [1,2] no longer see the misleading warning.
Config:
- Wire up HUMANE_PROXY_ENABLED_STAGES env var (was documented but
not implemented). Accepts comma-separated ints e.g. '1,2'.
Tests:
- Add TestEmbeddingClassifierReal: 7 tests using the actual
all-MiniLM-L6-v2 model (guarded by importorskip, skipped in CI).
- Add TestStage2EarlyExitFix: 5 regression tests for the pipeline fix.
- Add 2 Stage 3 warning gating tests.
- Update test_early_exit_clear_safe for new behaviour.
- Total: 186 → 200 tests passing.
Docs:
- README: clarify Stage 2 behaviour (all messages flow through when
enabled), add LLM_API_KEY/LLM_API_URL note (only needed for proxy
server), add Glama MCP badges.
- CHANGELOG: full v0.2.3 entry.
Meta:
- Add glama.json for Glama MCP directory listing.
- Bump version to 0.2.3 (pyproject.toml, __init__.py, server.json,
interceptor FastAPI app).
Copy file name to clipboardExpand all lines: CHANGELOG.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,30 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6
6
7
7
---
8
8
9
+
## [0.2.3] — 2026-04-01
10
+
11
+
### Fixed
12
+
13
+
-**Stage 2 never ran:** The pipeline's early-exit logic was too aggressive — when Stage 1 scored a message as safe (score 0.0), it would early-exit before the embedding classifier had a chance to evaluate it. This defeated Stage 2's entire purpose: catching *semantically* dangerous messages that keyword matching misses. Now, when Stage 2 is enabled, all messages that Stage 1 does not flag as `self_harm` proceed to the embedding classifier.
14
+
-**Stage 3 warning shown incorrectly:** Users with `enabled_stages: [1]` or `[1, 2]` saw a Stage 3 "DISABLED" warning even though they never configured Stage 3. The warning now only appears when `3` is in `enabled_stages` but no API key / provider is available.
15
+
-**`HUMANE_PROXY_ENABLED_STAGES` env var not wired up:** Documented in README but not implemented in the config loader. Now accepts comma-separated ints (e.g. `"1,2"`).
16
+
-**FastAPI app version** pinned to `0.2.0` — updated to `0.2.3`.
17
+
18
+
### Added
19
+
20
+
-**`glama.json`** metadata for Glama MCP directory listing.
21
+
-**Real embedding model tests:** New `TestEmbeddingClassifierReal` test class that exercises the full `all-MiniLM-L6-v2` classify flow (guarded by `pytest.importorskip`, auto-skipped in CI).
22
+
-**Pipeline early-exit regression tests:**`TestStage2EarlyExitFix` class verifying that Stage 2 is always invoked when enabled, even for messages heuristics considers safe.
23
+
-**Stage 3 warning tests:** Tests that verify the warning is only shown when Stage 3 is in `enabled_stages`.
24
+
-**Glama badges** in README for MCP server card and quality score.
25
+
26
+
### Changed
27
+
28
+
- README updated to clarify Stage 2 behaviour: when enabled, all messages flow through the embedding classifier. Stage 1 heuristics becomes an early-exit optimisation for clear self-harm only, not a safety determiner.
29
+
- README updated to clarify `LLM_API_KEY` / `LLM_API_URL` are only needed for the reverse proxy server, not for the library API or MCP server.
# Start the proxy (set LLM_API_KEY and LLM_API_URL in .env first)
44
+
# Start the reverse proxy server
45
+
# (requires LLM_API_KEY and LLM_API_URL in .env — these point to your upstream LLM)
43
46
humane-proxy start
44
47
```
45
48
49
+
> **Note:**`LLM_API_KEY` and `LLM_API_URL` are only needed for the reverse proxy server (`humane-proxy start`). They tell HumaneProxy where to forward safe messages. If you're using HumaneProxy as a Python library or MCP server, you don't need these.
50
+
46
51
### As a Python library
47
52
48
53
```python
@@ -63,19 +68,21 @@ result = await proxy.check_async("How do I make a bomb")
63
68
64
69
## 3-Stage Cascade Pipeline
65
70
66
-
HumaneProxy classifies every message through up to **3 stages**, each progressively more capable but also more expensive. Stages exit early when confident.
71
+
HumaneProxy classifies every message through up to **3 stages**, each progressively more capable but also more expensive.
The model lazy-loads on first use. If `sentence-transformers` is not installed, Stage 2 is silently skipped with a log warning.
126
133
134
+
> **How Stage 2 works with Stage 1:** When you enable `[1, 2]`, **every message** that Stage 1 does not flag as definitive `self_harm` proceeds to the embedding classifier. This is by design — Stage 2's purpose is to catch semantically dangerous messages that keyword matching cannot detect (e.g. *"Nobody would notice if I disappeared"*). Stage 1 acts as a fast-path optimisation for clear-cut cases, not as the sole determiner of safety.
135
+
127
136
### Stage 3 — Reasoning LLM
128
137
129
138
Set your API key and optionally configure the provider:
0 commit comments