# Mimir v0.1.0 - Table of Contents

> Embeddable routing oracle, pricing, and decision vocabulary for LLM workloads

## Pages

- [Mimir](readme.md)
- [Changelog](changelog.md)
- [LICENSE](license.md)

## Modules

- [Mimir](Mimir.md): Mimir is an embeddable routing oracle, pricing source, and decision
vocabulary for LLM workloads. Consult it in-process: hand it a workload
descriptor and an operational snapshot, and it hands back a placement (or a
reasoned no-candidate answer) plus an auditable decision record. A gateway
service built on top of Mimir is one possible embedder — not a requirement.
- [Mimir.Catalog](Mimir.Catalog.md): The routable universe: config-sourced entries (`:mimir, :catalog`) joining a
model with the routing metadata the oracle filters on — lane, runtime,
capabilities, latency, priority. Config-first by design; richer sourcing can
replace the source without touching the oracle.
- [Mimir.Catalog.Entry](Mimir.Catalog.Entry.md): One routable catalog entry.
- [Mimir.DecisionRecord](Mimir.DecisionRecord.md): Pure builder for a routing-decision audit record. Returns a binary-keyed
map suitable for appending as a turn event. No Repo, no clock beyond
accepting the snapshot's `snapshot_at`.
- [Mimir.Descriptor](Mimir.Descriptor.md): The workload descriptor — the public contract a workflow step presents to a
routing oracle. Pure validation: no persistence, no process state.
- [Mimir.Health](Mimir.Health.md): Failure-streak table for router lanes.
- [Mimir.Oracle](Mimir.Oracle.md): The pure routing decision: filter-then-rank over catalog entries. Every input
entry receives a verdict (`:chosen | :ranked | {:excluded, reason}`) — the
verdict table IS the decision record's body. No Repo, no process state, no
side effects; the operational world arrives as a `Snapshot` argument.
- [Mimir.Oracle.Placement](Mimir.Oracle.Placement.md): A chosen entry, why it was chosen, and every candidate's verdict.
- [Mimir.Oracle.Policy](Mimir.Oracle.Policy.md): Routing constraints layered on top of the catalog itself.
- [Mimir.Pricing](Mimir.Pricing.md): Token usage -> integer microdollar cost.
- [Mimir.Redact](Mimir.Redact.md): Helpers for masking secrets and gating payload capture.
- [Mimir.RouteLog](Mimir.RouteLog.md): The typed record of one routing decision — who asked (`caller`), which
workflow step (`correlation`), how it ended (`outcome`), and the decision
record. `to_meta/2` translates it into request-log meta vocabulary; how (and
whether) that meta is persisted belongs to the embedder.
- [Mimir.RouterClient](Mimir.RouterClient.md): Behaviour for routing oracle clients. This package ships one implementation
- [Mimir.RouterClient.HTTP](Mimir.RouterClient.HTTP.md): `RouterClient` implementation that calls `POST /v1/route` over HTTP via Req.
Normalizes the JSON response to atom-keyed maps so the shape is identical to
an in-process implementation.
- [Mimir.Snapshot](Mimir.Snapshot.md): A point-in-time view of the operational state the oracle ranks against.
Assembled from explicit inputs — the embedder wires its own health, pricing,
and budget sources; the oracle only ever sees this struct. Staleness affects
optimality, never safety: enforcement happens where budgets are enforced,
not here.
- [Mimir.TurnEvents](Mimir.TurnEvents.md): Per-request ordered `gen_ai.*` event buffer.
- [Mimir.TurnEvents.GenAI](Mimir.TurnEvents.GenAI.md): Dependency-free builders for binary-keyed `gen_ai.*` attribute maps
(OpenTelemetry GenAI semantic conventions).

## Mix Tasks

- [mix mimir.pricing.refresh](Mix.Tasks.Mimir.Pricing.Refresh.md): Refresh the vendored token-pricing DB used by `Mimir.Pricing`.
- [mix mimir.smoke](Mix.Tasks.Mimir.Smoke.md): Drives the public `mimir` API surface end-to-end as one repeatable command —
no network, no external services. The HTTP client stage runs a real `Req`
request against an in-process plug, so JSON encoding, response atomization,
and error mapping execute production code at the transport seam. The health
and turn-event stages run the real GenServers, ETS tables, and telemetry
handlers.

