Local AI models
Requestarium's AI features can run on a model on your own computer instead of a cloud model. Use LM Studio, Ollama, or any other server that speaks the OpenAI chat API (/v1/chat/completions and /v1/models). Your requests, responses and prompts then stay on your machine, and you pay nothing per call.
This page covers setup, the Cloud / Local / Hybrid switch, where AI shows up in the app, the CLI options, which models work well, and what to do when something goes wrong.
What you need
- A model server running on this computer: LM Studio, Ollama, llama.cpp
llama-server, vLLM or similar. For safety the app only talks tolocalhost,127.0.0.1or::1; a model on another machine is refused. - A chat (instruct) model loaded in it. See Recommended models.
- In Requestarium Desktop nothing else is needed: the app calls the model itself.
In the web app (app.requestarium.com), browsers don't let a web page call your local ports freely, so the web app reaches the model through one of these, in this order:
- Requestarium Desktop, if it is running;
- the Requestarium agent from the CLI (
requestarium agent); - the Requestarium browser extension;
- as a last resort, the page calls the model server directly. That works only if the server allows the page's origin (for Ollama,
OLLAMA_ORIGINS).
Set up LM Studio
- Install LM Studio, download a model (for example Qwen2.5-7B-Instruct) and load it.
- Open the Developer tab and start the server. LM Studio listens on port
1234by default, so the address ishttp://localhost:1234/v1. If you changed the port, use yours, for examplehttp://localhost:1235/v1. - In the model's load settings, set Context Length to 8192 or more (see Context length).
- Check that it answers: open
http://localhost:1234/v1/modelsin a browser. You should see your model in the list.
Set up Ollama
- Install Ollama and pull a model:
ollama pull qwen2.5:7b-instruct. - Ollama listens on
http://localhost:11434/v1. - Ollama's default context is small. Raise it, for example with
OLLAMA_CONTEXT_LENGTH=8192 ollama serve, or withnum_ctxin a Modelfile. - Through Requestarium Desktop, the agent or the extension, Ollama needs no
OLLAMA_ORIGINS. Set it only if you want the web page to call Ollama directly.
Connect the web app through the agent
Skip this in Requestarium Desktop.
- Install the CLI:
npm install -g @requestarium/cli(version 0.7.0 or later). - Start the agent:
requestarium agent. To start it at every login, runrequestarium agent install. - Open app.requestarium.com. The first time the web app reaches the agent, it shows a 4-digit code, and the agent's terminal asks you to approve the site. Answer
ythere, or runrequestarium agent approve CODEin another terminal with the same code. requestarium agent statusshows that the agent runs;requestarium agent siteslists approved sites, andrequestarium agent revokeremoves one.
The same agent also sends your normal requests to localhost and private networks. See the Desktop Agent page.
Pick the model in Requestarium
Open Settings → Profile → Local AI:
| Field | What to put there |
|---|---|
| Runtime | LM Studio, Ollama, or Other (OpenAI-compatible). Choosing one fills in its default address. |
| Address | The server's base URL, ending in /v1, for example http://127.0.0.1:1234/v1. You can change it for any runtime. |
| Model | The model id. Press Test connection to load the list from the server and pick from it. |
Test connection says how many models it found, or what went wrong. The setting is saved in this browser (or in the desktop app) and is shared by every AI feature below: the Local switch in the Tests and Flows AI panels edits the same setting. Nothing in it is sent to the Requestarium server.
Cloud, Local and Hybrid
AI panels have a switch that says which model does the work:
- Cloud: the model your Requestarium server is set up with.
- Local: the model from Settings → Profile → Local AI, on your computer.
- Hybrid (Flows and Tests only): in Flows, your local model asks the clarifying questions and the cloud model builds the draft. For test suites, Hybrid works like Cloud.
The switch is one setting, so picking Local in one panel picks it in the others too.
Where AI shows up
Collections: the AI assistant
Open a request and press the AI assistant button on the right rail. Pick Cloud or Local at the top of the panel, then:
- Explain issue: why the last send failed or returned an error, with concrete steps.
- Generate docs: documentation for the request, in Markdown.
- Ask a question: type in the box at the bottom of the panel, for example about auth, a curl command or the next debugging step.
With Local, the panel says which model it runs on. Before the prompt leaves the app, headers such as Authorization and Cookie, query parameters that look like tokens or keys, and body lines with passwords, tokens or secrets are replaced with [redacted]. Nothing goes to the Requestarium server.
Tests: AI check assertions
An AI check is an assertion written in plain language, for example "the reply is polite and names the order number". Your local model reads the response and decides pass or fail, with a one-sentence reason.
- Open a request's Tests tab and add an assertion.
- Set its source to AI check and write the criterion.
- Optionally put a JSON path, such as
$.choices[0].message.content, to judge only that part of the response. Empty means the whole body.
AI checks are judged on Send and in collection runs and suites, not in the live preview while you type. They always use your model (Local AI in the app, --ai-url in the CLI), never the Requestarium server's. Without a local model they fail and say how to set one up. Responses longer than 12,000 characters are cut before they go to the model.
Tests: Draft with AI
In Tests, open a suite and the AI tab next to Edit. Describe what you want, for example "save the token from the login request and use it everywhere" or "add checks from the last responses", and the AI drafts the changes for you to review. Pick Local to use your model. Tokens, passwords, keys and secret-looking fields are removed before anything is sent. See Tests.
Flows: Build with AI
Where Flows is turned on, Build with AI drafts a flow from a description. With Local the model runs on your computer, and the server only writes the prompt and checks the answer. Hybrid uses your local model for the questions and the cloud model for the draft.
AI checks in the CLI and CI
requestarium run, run-collection and run-suite judge AI check assertions with a model you name:
requestarium run-collection "Orders API" --env Staging \
--ai-url http://localhost:1234/v1 \
--ai-model qwen2.5-7b-instruct| Option | Environment variable | Meaning |
|---|---|---|
--ai-url URL | REQUESTARIUM_AI_URL | Base URL of an OpenAI-compatible server: LM Studio http://localhost:1234/v1, Ollama http://localhost:11434/v1, or a hosted provider. |
--ai-model NAME | REQUESTARIUM_AI_MODEL | The model id. Required with --ai-url. |
--ai-key KEY | REQUESTARIUM_AI_KEY | API key, only for a hosted provider that needs one. |
Unlike the app, the CLI may use a model on another machine, for example a GPU server in your CI network or a hosted provider with your own key. The MCP server (requestarium mcp) reads the same environment variables. Without them, AI checks fail with a message that says what to set. See the CLI reference.
Recommended models
Requestarium asks the model for a JSON answer, so pick an instruct model that follows instructions and writes valid JSON reliably.
| Model | Size | Notes |
|---|---|---|
| Qwen2.5-7B-Instruct | about 5 GB at 4-bit | The best default. Reliable JSON, good with API responses. On Apple silicon use the MLX 4-bit build in LM Studio. |
| Qwen2.5-14B-Instruct | about 9 GB at 4-bit | Better answers for docs and the assistant, if you have 16 GB of RAM or more. |
| Llama-3.1-8B-Instruct | about 5 GB at 4-bit | A good alternative. |
| Qwen2.5-3B-Instruct, Llama-3.2-3B-Instruct | about 2 GB | Fast on small laptops. Fine for simple AI checks, weaker at docs and suites. |
Reasoning models that think out loud (<think>…</think>) work for AI checks, since the thinking is ignored, but they are much slower. Base (non-instruct) models don't work.
Context length
The context length is how much text the model can read at once. Requestarium's prompts include the request, the response and instructions, so set it to 8K to 16K tokens (8192–16384):
- AI checks and the Collections assistant fit in 8K.
- Draft with AI for large suites and Build with AI for Flows send more; use 16K.
LM Studio sets this per model in the load settings; Ollama with OLLAMA_CONTEXT_LENGTH or num_ctx. A larger context needs more memory and is slower, so don't go higher than you need.
Limits
- The app talks only to models on this computer (
localhost,127.0.0.1,::1). The CLI can use any address. - One AI call may take up to 5 minutes before Requestarium gives up. Small models on a laptop CPU can be slow; the first call after loading a model is the slowest.
- Local answers are only as good as the model. A 7B model is fine for checks and short docs, but is weaker than a cloud model at large suites and flows.
- The Local AI setting is saved per browser and per desktop app, not in your account. Set it up again on another computer.
Troubleshooting
"Could not reach the local model from this page." The web app found no way to localhost. Start the agent (requestarium agent) or Requestarium Desktop, or install the browser extension and reload the page. Check that the model server runs: open its /v1/models address in a browser.
"Local models must run on this computer (localhost or 127.0.0.1)." The address points to another machine. In the app use a loopback address. For a remote model use the CLI's --ai-url.
"Nothing answered at this address, or it lists no models." The server isn't running, the port is wrong, or no model is loaded. In LM Studio, start the server in the Developer tab and check the port. Make sure the address ends in /v1.
"The local model server refused the request (403)." Ollama refused the page's origin. Use Requestarium Desktop, the agent or an up-to-date browser extension, or set OLLAMA_ORIGINS.
"The local model answered 400: 'response_format.type' must be 'json_schema' or 'text'." Newer LM Studio versions reject the JSON answer mode the app asks for. A fix that asks LM Studio in a way it accepts is on its way in the next web app and desktop release. Until then, use Ollama for Local in the app. The CLI's AI checks are not affected.
"The local model answered 400" with a message about context or tokens. The prompt is longer than the model's context. Raise the context length (see Context length), or judge only part of the response with a JSON path in the AI check.
It times out, or takes minutes. Use a smaller model or a 4-bit build, make sure the model runs on the GPU (in LM Studio, raise GPU offload), and close other heavy apps. Lower the context length if you raised it far above 16K.
"The model did not answer with a verdict" (AI check). The model wrote something other than the JSON verdict. Use an instruct model such as Qwen2.5-7B-Instruct, and keep the criterion short and specific.
"Pick a local model first." Open Settings → Profile → Local AI, press Test connection and pick a model.
Calling the model server as an API from a collection stops after 30 seconds. That is the request's own timeout, not the AI one. Raise Request timeout in the request's settings (or on its folder or collection), or pass --timeout to requestarium run; through the agent, a request may run up to 10 minutes.