LLM Db - a LLM Model Metadata Database as an Elixir Package

LLM DB - LLM Model Metadata Package

This package was extracted out of the ReqLLM project.

LLM DB is a model metadata catalog with fast, capability-aware lookups. Use simple "provider:model" or "model@provider" specs, get validated Provider/Model structs, and select models by capabilities. Ships with a packaged snapshot; no network required by default.

  • Primary interface: model_spec — a string like "openai:gpt-4o-mini" or "gpt-4o-mini@openai" (filename-safe)
  • Fast O(1) reads via :persistent_term
  • Minimal dependencies

Why?

When building ReqLLM, we implemented a model metadata system by pulling from https://models.dev. This worked well initially, but became challenging as we discovered various issues with LLM APIs. We submitted many PR’s upstream to models.dev, but they built their database for their purposes and it became obvious that our needs were diverging.

This package was extracted because it will have automated releases weekly to capture the latest model releases as quickly as possible.

It also standardizes the “model spec” - a unique string that can be used to address a specific model + provider combo. We support various spec formats.

For consumers, this package also supports filtering, local model definitions and a really nice allow/deny system so even when we have 1200 models in our database, but your app only wants to support 5, you can easily configure this.

Hex Release: llm_db | Hex
Github:

This package is part of the Agent Jido ecosystem.

9 Likes

Extracting this is a good call. Seems like it will be quite useful on its own!

This is pure bikeshedding so I apologize in advance, but shouldn’t it be either LlmDb or LLMDB? :slight_smile:

Appreciate it!

This is pure bikeshedding so I apologize in advance, but shouldn’t it be either LlmDb or LLMDB ? :slight_smile:

Guilty - which is your preference? Naming stuff is really hard …

1 Like

Definitely all caps for me. But I think that’s your preference too, since you used LLM DB multiple times in your own post. The version you reach for without thinking is always the right one :slight_smile:

I will also note there’s a reasonably well-known KV store named “LMDB”. Probably not an issue, though.

1 Like

Love the extraction as this makes it easier for other projects to take advantage of the normalization and frequent pre compiled updates.

My wife begs to differ.

2 Likes