mix llm_db.pull (LLM DB v2025.12.4)

View Source

Pulls latest model metadata from all configured remote sources and caches locally.

This task iterates through all sources configured in Config.sources!() and calls their optional pull/1 callback (if implemented). Sources without a pull/1 callback are skipped. Fetched data is saved to cache directories (typically priv/llm_db/upstream/ or priv/llm_db/remote/).

To build the final snapshot and generate the ValidProviders module from fetched data, run mix llm_db.build.

Usage

mix llm_db.pull
mix llm_db.pull --source openai
mix llm_db.pull --source anthropic

Switches

  • --source - Pull from a specific source only (openai, anthropic, google, xai, models_dev)

Configuration

Configure sources in your application config:

config :llm_db,
  sources: [
    {LLMDB.Sources.ModelsDev, %{}},
    {LLMDB.Sources.Local, %{dir: "priv/llm_db"}}
  ]

Only sources that implement the optional pull/1 callback will be pulled. Typically only remote sources like ModelsDev implement this callback.

Examples

# Pull from all configured remote sources
mix llm_db.pull

# Pull from OpenAI only
mix llm_db.pull --source openai

Output

The task prints a summary of pull results:

Pulling from configured sources...

 LLMDB.Sources.ModelsDev: Updated (709.2 KB)
 LLMDB.Sources.OpenRouter: Not modified
- LLMDB.Sources.Local: No pull callback (skipped)

Summary: 1 updated, 1 unchanged, 1 skipped, 0 failed

Run 'mix llm_db.build' to generate snapshot.json and valid_providers.ex