AI setup
This page only appears when Enable AI features is on in Settings. With it off, FoxQuill has no AI features at all, and nothing here applies.
What FoxQuill needs#
Any server that speaks the OpenAI chat completions API. FoxQuill sends plain requests over HTTP; there is no account with anyone and no SDK.
Fill in three things in Settings under AI:
- Base URL, ending in
/v1. - Model, the name the server uses. Fetch models lists what it offers.
- API key, only if the server wants one. Local servers usually do not.
Test connection tells you whether it worked, and how long it took.
Running a model on your own machine#
Ollama#
Install Ollama, then pull a model:
ollama pull qwen3:8b
Base URL: http://localhost:11434/v1. No key.
If FoxQuill runs in Docker and Ollama runs on the same machine, localhost inside the container is the container, not your machine. Use the machine’s address on the network, and start Ollama with OLLAMA_HOST=0.0.0.0 so it accepts connections from outside itself.
LM Studio#
Load a model, open the Developer tab, and start the server.
Base URL: http://localhost:1234/v1. No key.
llama.cpp and llama-swap#
llama-server speaks the same API.
llama-server -m model.gguf --host 0.0.0.0 --port 8080
Base URL: http://localhost:8080/v1.
llama-swap sits in front of several models and loads whichever one is asked for. Point FoxQuill at llama-swap’s port and use its model names.
Using a service instead#
Any provider with an OpenAI-compatible endpoint works the same way: their base URL, your key, their model name. Understand that your text then leaves your machine and reaches their servers.
The context budget#
A model can only hold so much at once. Context window in Settings is how much yours holds; 32768 tokens is the default and is enough for the way FoxQuill builds context.
FoxQuill never sends the whole book. It builds a short brief and keeps twelve percent of the window free as a margin. In order:
- The book’s description and style guide.
- Cards that matter here.
- Summaries of earlier scenes.
- The end of the previous scene.
- The scene you are in.
Recent prose gets at least 35 percent of the budget and at most 60 percent, so one long scene cannot crowd everything else out.
What is sent#
Only what you have marked as visible.
- A scene is sent unless you have hidden it with the eye icon on the scene.
- A card is sent always, only when it is mentioned, or never. Set this on the card.
- A card field you added is not sent unless you switch it on.
- The book’s description and style guide are always sent.
Your notes are never sent. Your statistics are never sent.
Reasoning models#
FoxQuill always asks the server to turn thinking off. A reasoning model left to think will spend its whole output budget on hidden reasoning and answer with nothing. Servers that do not know the setting ignore it.