fleet-memory/hindsight-api/hindsight_api
DK09876 888b50de12
Fix MCP operations not tracked for usage metering (#334)
MCP middleware was discarding tenant_id and api_key_id after authentication.
The authenticate_mcp() call mutated a RequestContext with these fields, but
tools later created a fresh RequestContext without them. This caused
UsageMeteringValidator to see tenant_id="unknown" and skip billing entirely.

Propagate tenant_id and api_key_id via ContextVars (same pattern as bank_id
and api_key) so the RequestContext passed to the memory engine has the full
auth context needed for usage tracking.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 09:38:15 +01:00
..
admin feat: new 'worker' service (#176) 2026-01-20 10:17:56 +01:00
alembic feat: support markdown in reflect and mental models (#307) 2026-02-06 10:49:13 +01:00
api Fix MCP operations not tracked for usage metering (#334) 2026-02-10 09:38:15 +01:00
engine doc: prepare doc for 0.4.10 (#325) 2026-02-09 11:42:37 +01:00
extensions doc: prepare doc for 0.4.10 (#325) 2026-02-09 11:42:37 +01:00
worker Fix: load operation validator extension in worker process (#280) 2026-02-02 14:45:40 -05:00
__init__.py Release v0.4.10 2026-02-09 11:44:20 +01:00
banner.py fix: do not log db user/password (#312) 2026-02-09 10:15:03 +01:00
config.py doc: update claude-code usage terms (#315) 2026-02-06 16:53:12 +01:00
daemon.py feat: improve openclaw and hindisght-embed params (#279) 2026-02-03 09:39:04 +01:00
main.py feat: improve openclaw and hindisght-embed params (#279) 2026-02-03 09:39:04 +01:00
mcp_local.py feat(mcp): add timestamp to retain (#190) 2026-01-23 16:00:43 +01:00
mcp_tools.py Fix MCP operations not tracked for usage metering (#334) 2026-02-10 09:38:15 +01:00
metrics.py chore: remove dead code (#245) 2026-01-30 09:16:32 +01:00
migrations.py fix(helm): improve appVersion usage (#326) 2026-02-09 11:35:08 +01:00
models.py chore: drop unused access_count column (#178) 2026-01-20 10:36:02 +01:00
pg0.py feat: support vertex as llm provider (#233) 2026-01-29 16:13:57 -05:00
server.py Fix: Load extensions in server.py for multi-worker deployments (#155) 2026-01-13 17:55:33 +01:00
utils.py fix(helm): improve appVersion usage (#326) 2026-02-09 11:35:08 +01:00