Skip to content

Folio AI Models and Hardened Mode

Sergii Kravtsov edited this page Dec 5, 2026 · 2 revisions

Folio AI Models and Hardened Mode

Folio AI runs on Cursor, Claude (an Anthropic API key), MiniMax and any OpenAI-compatible endpoint: OpenRouter, Ollama, vLLM, LM Studio, the OpenAI API and others. Models that bring no safety harness of their own run in a hardened mode, and Agent mode asks for your approval before it deletes. This page needs Folio 0.4.8 or later. For keys and who pays, see Set Up Folio AI; for Claude, see Folio AI on Claude.

What can be connected

Provider You connect Billing Runs
Cursor A Cursor API key Your Cursor plan Native
Claude An Anthropic API key Anthropic, by API usage Native
MiniMax A MiniMax API key; on by default (FOLIO_MINIMAX_ENABLED=0 switches it off) MiniMax Hardened
OpenAI-compatible A base URL, an optional key and a list of models Whoever runs the endpoint Hardened

Folio adds no markup and does not resell AI. The model picker groups models by provider.

Connect an OpenAI-compatible endpoint

Any server that answers POST {base URL}/chat/completions works.

  1. Open the Folio AI settings: Settings, section Folio AI for a personal connection, the space menu for a space, or the Shared key tab of Assistant analytics for the instance.
  2. Choose OpenAI-compatible.
  3. Enter the base URL (for example https://openrouter.ai/api/v1 or http://localhost:11434/v1), a key if the server needs one (Ollama does not), and the model ids. Load models reads them from the server (GET {base URL}/models); up to 20 models can be listed, and the first is the default.
  4. Save. Folio sends one short test request with the first model.

An operator can also set a fallback in the server environment: OPENAI_COMPAT_BASE_URL, OPENAI_COMPAT_MODELS (comma separated) and OPENAI_COMPAT_API_KEY (optional). The order of keys is the usual one: personal, space, instance, environment.

Where an address may point.

  • Instance administrators may use any http or https address, including localhost and your private network: a model on your own machine works.
  • Space administrators and personal connections may use only public https addresses. Redirects are refused.
  • Cloud metadata addresses are refused for everyone, when the connection is saved and again before every request.
  • A run that goes through a space's connection can see only that space: the space administrator chose the address, and not every member trusts it. Personal and instance connections are not confined.
  • The panel shows "model · via host" next to a reply, so you can see where a question went. The full address is shown only to the person or administrator who owns the connection.

Your pages go to that address. The messages, the page text the assistant reads and the tool results are sent there. On a public site, visitors' questions run on a shared connection of the space, the instance or the environment when Cursor does not resolve; a personal connection is never used there.

Hardened mode

Claude and Cursor come with protections of their own. MiniMax and OpenAI-compatible models may not, so Folio adds a layer around the agent loop. It lowers the risk of prompt injection and does not remove it: give such a model only what you would give an untrusted reader.

How Folio AI keeps models without their own safety harness in check

  • Data, not instructions. Every tool result reaches the model wrapped as marked data, and the prompt says that pages, comments and tables are not commands.
  • Injection flagging. Text that looks like an injected instruction gets a warning line. Administrators see counters of how often it happened. Nothing is blocked or silently dropped.
  • A loop guard. The same call three times in a row, the same error three times in a row, or two calls taking turns get a hint first; if it repeats, the run loses its tools.
  • Secret masking. The run's key, server secrets and token-shaped strings in tool results are replaced before the model sees them.
  • Fewer turns. Agent mode gets 25 turns instead of 40.

Approval before deleting

In hardened mode, Agent mode stops before a delete tool runs (deleting table rows, columns or views, for example). The panel shows the tool and its arguments; Allow runs it, Deny tells the model that you declined. No answer within 10 minutes, a stopped run or a finished run counts as a refusal. Several deletes in one turn are asked one by one. Only the person who started the run can answer.

See also

Set Up Folio AI · Folio AI on Claude · Limitations · Features

Clone this wiki locally