Arcanum.ModelProfile.Registry (arcanum v0.1.0)

Copy Markdown View Source

Fetches and caches model capabilities from models.dev.

Stores data in ETS for fast concurrent reads. Refreshes hourly. Falls back gracefully — if fetch fails, the Resolver uses provider defaults.

All provider kinds use models.dev IDs directly. Local-only providers (ollama, vllm) are not in models.dev and rely on Resolver defaults.

Summary

Functions

Returns all cached provider IDs.

Returns a specification to start this module under a supervisor.

Looks up a model profile from the registry cache.

Functions

cached_providers()

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

Returns all cached provider IDs.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

lookup(provider_kind, model)

@spec lookup(String.t(), String.t()) :: Arcanum.ModelProfile.t() | nil

Looks up a model profile from the registry cache.

Returns nil if the model is not cached (caller should fall back).

start_link(opts \\ [])