Agentic.LLM.Catalog (agentic v0.2.2)

Copy Markdown

Unified model catalog backed by a GenServer.

Holds all known models from three sources (priority order):

  1. User overrides from ~/.worth/config.exs
  2. Dynamic discovery from provider.fetch_catalog/1
  3. Provider's static default_models/0

Persisted to ~/.worth/catalog.json (schema-versioned). Loaded at boot for warm-path latency, refreshed async in background.

Summary

Functions

Return all models in the catalog.

Returns a specification to start this module under a supervisor.

Find models matching filters.

Return models for a specific provider.

Return catalog metadata (counts, last refresh, etc).

Look up a single model by provider and model id.

Trigger an async refresh of all enabled providers.

Trigger an async refresh of a single provider.

Functions

all()

Return all models in the catalog.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

find(opts)

Find models matching filters.

Options:

  • :provider — filter by provider atom
  • :tier — filter by tier_hint (:primary, :lightweight)
  • :has — capability tag or list of tags (all must be present)
  • :source — filter by source (:static, :discovered, :user_config)

for_provider(provider_id)

Return models for a specific provider.

info()

Return catalog metadata (counts, last refresh, etc).

lookup(provider_id, model_id)

Look up a single model by provider and model id.

refresh()

Trigger an async refresh of all enabled providers.

refresh_provider(provider_id)

Trigger an async refresh of a single provider.

start_link(opts \\ [])