fleet-memory/hindsight-api/hindsight_api/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
..
__init__.py feat: improve mcp tools based on endpoint (#318) 2026-02-08 09:28:59 +01:00
http.py Add Supabase tenant extension as built-in (#267) 2026-02-09 10:16:47 +01:00
mcp.py Fix MCP operations not tracked for usage metering (#334) 2026-02-10 09:38:15 +01:00