Apus supports Ollama Web Search as a bundled web_search provider, returning titles, URLs, and snippets from Ollama's web-search API.

Local/self-hosted Ollama needs no API key by default; it requires a reachable Ollama host plus ollama signin. Direct hosted search (no local Ollama) needs baseUrl: "https://ollama.com" and a real OLLAMA_API_KEY.

Setup

If you already use Ollama for models, Ollama Web Search reuses the same configured host.

Local Ollama

Start Ollama

Make sure Ollama is installed and running.

Sign in

```bash
ollama signin
```

Choose Ollama Web Search

```bash
apus configure --section web
```

Select **Ollama Web Search** as the provider.

Hosted Ollama

  1. Create an Ollama API key and set OLLAMA_API_KEY in the Gateway environment.
  2. Set models.providers.ollama.baseUrl to https://ollama.com; see Config. This is the shared Ollama model-provider host, so it also sends your Ollama model traffic to https://ollama.com instead of a local daemon. To move web search alone, set plugins.entries.ollama.config.webSearch.baseUrl to https://ollama.com and leave models.providers.ollama.baseUrl pointing at your local host.
  3. Run apus configure --section web and select Ollama Web Search.

Hosted search does not require a local Ollama daemon or ollama signin.

Apus never auto-selects Ollama Web Search over a higher-priority credentialed provider; you must choose it explicitly with tools.web.search.provider: "ollama".

Config

{
  tools: {
    web: {
      search: {
        provider: "ollama",
      },
    },
  },
}

Optional host override, scoped to web search only:

{
  plugins: {
    entries: {
      ollama: {
        config: {
          webSearch: {
            baseUrl: "http://ollama-host:11434",
          },
        },
      },
    },
  },
}

Or reuse the host already configured for the Ollama model provider:

{
  models: {
    providers: {
      ollama: {
        baseUrl: "http://ollama-host:11434",
      },
    },
  },
}

models.providers.ollama.baseUrl is the canonical key; the web-search provider also accepts baseURL there for compatibility with OpenAI SDK-style config examples. If nothing is set, Apus defaults to http://127.0.0.1:11434.

Direct hosted Ollama Web Search (no local Ollama):

{
  models: {
    providers: {
      ollama: {
        baseUrl: "https://ollama.com",
        apiKey: { source: "env", provider: "default", id: "OLLAMA_API_KEY" },
      },
    },
  },
  tools: {
    web: {
      search: {
        provider: "ollama",
      },
    },
  },
}

models.providers.ollama.apiKey takes either a literal key string or a SecretRef object. A bare "OLLAMA_API_KEY" string would be sent as the key itself, not read from the environment.

Auth and request routing

Related