Use a local AI model

DevOpsPad can use a model running on your own machine as its AI provider. Any local server that exposes an OpenAI-compatible /chat/completions endpoint works. Set API base URL to the server’s loopback address, such as http://localhost:11434/v1 for Ollama, enter the model name, leave API key empty and save.

With a local model, your prompts and any resource names you choose to include stay on your machine.

Set up Ollama

Ollama serves an OpenAI-compatible API under /v1 on port 11434 by default.

  1. Install Ollama and pull a model that is good at code, for example:

    ollama pull qwen2.5-coder
  2. Make sure the server is running (ollama serve, or the Ollama app).

  3. In DevOpsPad, open Settings.

  4. Set API base URL to http://localhost:11434/v1.

  5. Set Model to the model name, for example qwen2.5-coder.

  6. Leave API key empty and click Save provider.

Other local servers work the same way as long as they implement /chat/completions. Use the base URL and model ID from their documentation.

Why only loopback can use HTTP

DevOpsPad requires HTTPS for AI providers, with one exception: localhost, 127.0.0.1 and ::1. Traffic to those addresses never leaves your machine, so encryption adds nothing. Anything else, including a model server on your LAN or a GPU box over VPN, must use HTTPS so prompts are not readable on the network.

If you need a remote self-hosted model, put it behind a reverse proxy with a TLS certificate and use its https:// URL.

Choosing a model

The assistant asks the model to write read-only queries for the selected engine, put one runnable query in a fenced code block, and not invent tables or results. Smaller models follow this less reliably. Prefer a code-tuned model, and always read a suggestion before running it.

Requests time out after 60 seconds. If a large local model is slow to load, send a short prompt first to warm it up.

Troubleshooting

  • Could not reach the AI provider: the server is not running, or the port is wrong.
  • HTTP 404: the base URL is missing /v1, or the model name does not exist on the server.
  • Empty response: the model returned no text; try a different model.

See Configure an AI provider for the full list of messages.

Frequently asked questions

Does a local model need an API key in DevOpsPad?

Usually not. The API key field is optional, and DevOpsPad only sends an Authorization header when a key is saved.

Can I use a model server on another machine over plain HTTP?

No. Plain HTTP is accepted only for localhost, 127.0.0.1 and ::1. A model server elsewhere on your network must be reached over HTTPS.