Skip to main content

Module detector

Module detector 

Source
Expand description

Content-based provider classification for session JSON and JSONL data.

Given the parsed records from a session file, this module decides which supported assistant wrote it (ExtensionType). Two entry points exist for two call shapes: detect_extension_type commits eagerly on a fully-materialised slice (the Vec<Value> fallback path), while classify_records returns None on indeterminate input so a streaming caller can keep peeking lines until a marker appears.

Functionsยง

classify_records
Streaming-friendly classifier that only commits to a provider when the records carry a distinctive marker.
detect_extension_type
Detects the AI provider format by analyzing distinctive fields in the session data.