> For the complete documentation index, see [llms.txt](https://docs.perception.cx/perception/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.perception.cx/perception/enma-ai/models.md).

# Models

## Endpoints

Any OpenAI-compatible endpoint works. Add as many as you want in Settings:

* **Local**: LM Studio, Ollama, llama.cpp server. Free and private.
* **Cloud**: OpenRouter, or any gateway that speaks the OpenAI chat API.

Keys are stored locally and never leave your machine except to call your endpoint.

## Picking models

* **Fetch models**: one click asks the endpoint what it serves and autocompletes the model fields. No more mistyped model ids.
* Per-agent settings: model, temperature (or model default), reasoning effort (off to xhigh), max output tokens, context window.
* Reasoning renders as collapsible thinking blocks, whether it comes from the reasoning channel or inline `<think>` tags.
* Response length is unlimited by default, so large files write in one shot.

## Resilience

Enma assumes real-world networks and imperfect gateways:

* Dropped or stalled requests auto-reconnect with a visible indicator.
* Replies that already streamed are never thrown away by a late connection hiccup.
* Malformed tool arguments from flaky models are repaired or retried instead of failing the turn.
* Unsupported parameters (a reasoning level or pinned temperature a model rejects) degrade gracefully to the model's default instead of erroring.
* Per-agent fallback chains take over when a model terminally fails. See [Agents](broken://pages/0a8d16770d6294a24ea328ff0c1bb7305f24849c).

## Prompt caching

Anthropic and OpenRouter prompt caching is supported, plus an opt-in cache warmer that keeps the provider cache hot between messages.
