gb_models is the static list of the models gligabao knows (see Graph export). gb_inferences is its dynamic counterpart: one row per invocation of a model, written as the call happens (so what was spent is kept even if the operation fails later). It is how each inference is tracked, and how inferences with different settings are compared.
Every model call of the system is an inference: each LLM call (
Complete), each embedding request (one inference per request, even for a batch), each web search and each Jev classification. Nothing else writes cost.
Thinking level
The thinking level is chosen per stage; the support forlow, medium and high is complete, only the default is off:
none(no thinking) for every LLM stage ofremember(andremember_image), see Remember, and forquery, see Query: thinking costs output tokens, so it is off unless a request (or an eval) turns it on.
gb_artifacts.inference_id), which holds the model and the level (and the tokens and cost) of the call that wrote it.
Admin UI
With the admin UI enabled, the inferences view shows, for each database, the totals of all inferences (inferences, input and output tokens, cost), their breakdown by type, stage, model and thinking level, and the list of the inferences, newest first (100 per page). Clicking a row of a breakdown filters the list by it (click again, or Clear filter, to remove it); the totals and breakdowns are never filtered. The JSON behind it isGET /v1/gb/admin/api/inferences?db=<name>[&type=][&stage=][&model_id=][&reasoning=][&limit=][&offset=] (limit defaults to 100, at most 500): totals, by_type, by_stage, by_model, by_reasoning (each key, label, inferences, input_tokens, output_tokens, cost_usd), and inferences (with total, limit, offset) for the filters given. From Go: relational.InferenceGroups and relational.ListInferences.
Example
relational.RecordInference, relational.GetInference and relational.InferenceStats (sums by type); memory_core.WithRecording records every call of an LLM, and puts the run’s ID in ai.Response.InferenceID.
This table replaces gb_llm_calls (tokens and cost per call, without the model’s ID, the stage or the thinking level).
Which stage of a remember call made a run
The run log of aremember call (gb_remember_runs) lists, for each stage of the pipeline, the IDs of the inferences the stage made (<stage>_inference_ids).