Skip to content
CookDex docs

AI providers

AI is optional. Tag and categorize uses rules made from the names you already have, then asks an AI provider about the recipes the rules couldn’t place. Without a provider, use Rules only; everything else in CookDex works the same. Only the recipe text that tagging needs is sent to the provider.

In Settings → AI helper, pick an AI provider:

Provider What you enter Notes
OpenAI or compatible OpenAI API key, OpenAI model The default. gpt-4o-mini is cheap and good enough for tagging. For a gateway such as LiteLLM, also set the OpenAI-compatible address, one of the section’s more settings; see below.
Anthropic Anthropic API key, Anthropic model From console.anthropic.com.
Ollama (Local) Ollama address, Ollama model Runs on your own hardware, for example http://host.docker.internal:11434.
Off (rules only) Nothing Tagging uses rules only.

API keys are stored encrypted. Load models lists the models your key or server can use, and the test button next to it (Test OpenAI, Test Anthropic or Test Ollama) sends one tiny request to check that it works.

A single run can use a different provider: AI provider under More options in Tag and categorize overrides the one in Settings.

Gateways such as LiteLLM, OpenRouter, vLLM and LM Studio answer OpenAI’s API at their own address. To use one:

  1. In Settings → AI helper, set AI provider to OpenAI or compatible.
  2. Click 2 more settings in that section and set OpenAI-compatible address to the gateway’s base address, the one that ends in /v1, such as http://litellm:4000/v1. Leave it empty to use OpenAI itself.
  3. Enter the gateway’s key as the OpenAI API key. A key is required; if your gateway doesn’t check keys, as LM Studio usually doesn’t, enter any placeholder.
  4. Click Load models. With a gateway address, it lists every model the gateway offers. Pick one as the OpenAI model.
  5. Click Test OpenAI. It sends a one-word request to the gateway and says which address answered.

Test OpenAI, Load models and tagging jobs all use that address. A gateway on your own network is fine, since gateways usually run there.

You can also set the address on the container as OPENAI_BASE_URL, for example in .env. Jobs started from the web UI use it as well.

Ollama runs models on your own hardware, so nothing leaves your network. Small local models are slow on a CPU, so the defaults under the section’s more settings keep requests small: Recipes per request (1), Context window (2048), Longest answer (tokens) (512), CPU threads (4) and Wait per request (seconds) (300). Raise CPU threads if the host has cores to spare.

While the AI works on a batch, the run’s log says so every 30 seconds (Progress message every (seconds); 0 turns it off).

Link ingredients reads ingredient lines in CookDex. For recipes it isn’t sure about, it can fall back to Mealie’s own OpenAI parser, which uses the OpenAI settings in Mealie, not the ones in CookDex.