2026-03-26-request-pattern-fingerprinting
Request Pattern Fingerprinting
Date: 2026-03-26 Phase: 085-request-pattern-fingerprinting Systems: intelligence engine, pattern store, API, SDK-TS, SDK-PY, MCP
What
New intelligence subsystem that fingerprints each request into a bounded pattern space (~500 distinct patterns via bucketing) and tracks per-pattern x model success rates, latency, cost, and quality. Surfaced via GET /v1/intelligence/patterns.
Why
The router needs to learn which models work best for which types of requests. Thompson sampling operates per-model, but pattern fingerprinting adds a request-type dimension — tool-heavy code tasks may succeed with different models than simple chat. This data feeds into smarter routing decisions.
Pattern Dimensions
| Dimension | Buckets |
|---|---|
| has_tools | true/false |
| tool_count | 0, 1-5, 6-15, 16+ |
| message_count | 1, 2-5, 6-20, 21+ |
| estimated_tokens | small (<4K), medium (4K-32K), large (32K-128K), huge (128K+) |
| task_type | code, chat, analysis, creative, reasoning, general, etc. |
| has_system_prompt | true/false |
| has_images | true/false |
Implementation
src/router/intelligence/pattern-fingerprint.ts— Core engine: fingerprinting, hashing, in-memory PatternStore with evictionsrc/api/routes/intelligence-patterns.ts—GET /v1/intelligence/patternswith query filterssrc/api/server.ts— Route mount +patternStoreoption on CreateApiAppOpts- MCP:
br_request_patternstool for agent access - SDK-TS:
client.intelligence.patterns()method - SDK-PY:
client.intelligence.patterns()sync + async
Lockstep Checklist
- [x] API: New route + server mount
- [x] Tests: Bucketing, fingerprinting, hashing, store aggregation, filtering
- [x] Docs: This ship log
- [x] SDK-TS:
patterns()method on Intelligence resource - [x] SDK-PY:
patterns()on both sync and async classes - [x] MCP:
br_request_patternstool + manifest entry + agents.json - [x] CLI: N/A
- [x] GTM: N/A
- [x] Dashboard: N/A