Skip to content
Pages of the documentation

Models

The language model the agent thinks with, one per role if you like, a fallback, and the models for memory search and pictures.

Any language model, hosted or local, that supports tool calls.

Models in the settings: each profile, its type and the roles it servesModels in the settings: each profile, its type and the roles it serves

Choose a provider

nestor init writes one profile, models.main. To change provider, replace it with a block below, then nestor check. The key goes in .env as MODEL_API_KEY; local servers need none.

The default, and the tested provider.

MODEL_API_KEY=sk-or-...
models:
  main:
    type: language
    provider: openai-compatible
    base_url: https://openrouter.ai/api/v1
    api_key: ${MODEL_API_KEY}
    model: anthropic/claude-haiku-5.5

A local model is slower, and the voice feels it first. From Docker, use http://host.docker.internal:<port>/v1; on Linux, make the server listen on all interfaces (OLLAMA_HOST=0.0.0.0, --host 0.0.0.0 for llama.cpp).

Types

Each model has a type (language, embedding, transcription, speech, speaker, image) and a provider. See Voice and Speakers.

Roles

Role What it does When unset
agent.spoken answers aloud: the first words must come fast agent.written
agent.written answers in writing agent.spoken
agent.titles titles each chat of the admin; a small model does agent.written
watches.model sorts incoming mail for the watches agent.written
memory.consolidation summarizes each conversation once it is over agent.written
agent.transcription hears voice messages the only transcription model
agent.speech answers a voice message with one the only speech model
agent.images draws pictures the only image model

A fast model for the voice, a stronger one in writing:

models:
  quick:
    type: language
    provider: openai-compatible
    base_url: https://openrouter.ai/api/v1
    api_key: ${MODEL_API_KEY}
    model: anthropic/claude-haiku-5.5
  deep:
    type: language
    provider: openai-compatible
    base_url: https://openrouter.ai/api/v1
    api_key: ${MODEL_API_KEY}
    model: anthropic/claude-sonnet-5.5

agent:
  spoken: quick
  written: deep

Settings

Key Models What it does
extra_body all language models merged into every request (routing, reasoning, generationConfig)
read_timeout_s all language models in seconds: 30 for openai-compatible, 60 for anthropic and gemini
fallback all language models the model that answers when this one fails (Fallback)
vision openai-compatible true for a model that reads images: it then sees the photos sent
cache_control openai-compatible the provider’s prompt cache, on by default for OpenRouter and Anthropic

anthropic and gemini see images and read PDFs by themselves.

Fallback

When a model fails before answering, its fallback answers, in every role, and the journal says so. A fallback may have its own, and gets no pictures or documents it cannot take.

models:
  claude:
    type: language
    provider: anthropic
    api_key: ${ANTHROPIC_API_KEY}
    model: claude-sonnet-5-5
    fallback: gemini
  gemini:
    type: language
    provider: gemini
    api_key: ${GEMINI_API_KEY}
    model: gemini-flash-latest

A model that fails mid-answer is not replaced.

Search by meaning

An embedding model finds memories by meaning (“what does Léa eat?” finds “Léa is vegetarian”):

models:
  vectors:
    type: embedding
    provider: openai-compatible
    base_url: https://openrouter.ai/api/v1
    api_key: ${MODEL_API_KEY}
    model: openai/text-embedding-3-small
    dimensions: 1536

memory:
  embedder: vectors
Key What it does
dimensions the vector size
send_dimensions true asks a model that can shorten its vectors for that size
query_prefix, document_prefix for a model that expects a prefix (query: )

Any OpenAI-compatible /embeddings endpoint works (Memory).

Pictures

Nestor sends the pictures it draws in the admin’s chat and messaging apps. One asked for aloud stays in the admin’s journal.

models:
  painter:
    type: image
    provider: openai-compatible
    base_url: https://openrouter.ai/api/v1
    api_key: ${MODEL_API_KEY}
    model: google/gemini-2.5-flash-image
    endpoint: chat

endpoint: images (default) uses /images/generations; chat uses Chat Completions, as on OpenRouter. size sets the size when the model takes one (1024x1024).