AgentSessionManager.Models (AgentSessionManager v0.8.0)

Copy Markdown View Source

Central registry of model identifiers, default models, and pricing data.

All model name strings and per-token rates are defined here so that updating a model version or price is a single-file change. Adapters and cost calculators reference this module rather than hardcoding model strings.

Application Configuration

Defaults can be overridden via application config:

config :agent_session_manager, AgentSessionManager.Models,
  claude_default_model: "claude-sonnet-4-5-20250929",
  pricing_table: %{...}

See the Model Configuration guide for details.

Summary

Functions

Returns the default model for the given provider.

Returns the compiled default pricing table (not affected by app config).

Returns a list of all known model name keys from the default pricing table.

Returns the active pricing table, merging any application config overrides.

Functions

default_model(arg1)

@spec default_model(atom()) :: String.t() | nil

Returns the default model for the given provider.

Examples

iex> AgentSessionManager.Models.default_model(:claude)
"claude-haiku-4-5-20251001"

iex> AgentSessionManager.Models.default_model(:codex)
nil

default_pricing_table()

@spec default_pricing_table() :: map()

Returns the compiled default pricing table (not affected by app config).

model_names()

@spec model_names() :: [String.t()]

Returns a list of all known model name keys from the default pricing table.

pricing_table()

@spec pricing_table() :: map()

Returns the active pricing table, merging any application config overrides.