Skip to main content

Module session_model_usage

Module session_model_usage 

Source
Expand description

SeaORM entity for the session_model_usage table (LIB-03).

Per-(session_id, user_id, model) token + cost aggregate, populated by accumulate_usage (LIB-05) when an LLM call fires inside a tracked session scope. Normalizing this out of session_records lets mixed-model sessions (e.g. embedding calls + completion calls on different models) attribute cost correctly via GET /api/v1/sessions/cost-by-model.

Mirrors Python’s SessionModelUsage SQLAlchemy model at cognee/modules/session_lifecycle/models.py:89-126.

Structs§

ActiveModel
Generated by sea-orm-macros
ColumnIter
An iterator over the variants of Column
Entity
Generated by sea-orm-macros
Model
PrimaryKeyIter
An iterator over the variants of PrimaryKey
RelationIter
An iterator over the variants of Relation

Enums§

Column
Generated by sea-orm-macros
PrimaryKey
Generated by sea-orm-macros
Relation