Skip to main content

Crate synaptic_callbacks

Crate synaptic_callbacks 

Source

Structs§

CompositeCallback
CostTrackingCallback
Callback handler that tracks token usage and estimated cost across model calls.
MetricsCallback
Callback that collects latency, token, and error metrics.
MetricsSnapshot
Snapshot of collected metrics.
ModelPricing
Per-model cost rates (USD per 1M tokens).
ModelUsage
Per-model usage breakdown.
RecordingCallback
A callback handler that records all received events for later inspection, useful for testing.
StdOutCallbackHandler
A callback handler that prints events to stdout.
ToolMetrics
Metrics for a specific tool.
TracingCallback
UsageSnapshot
Accumulated usage stats for cost tracking.

Functions§

default_pricing
Build a default pricing table for common models (approximate, Feb 2026).