check_ollama
Verify the LLM backend is running and the configured embedding or chat model is installed before calling semantic search or symbol explanation tools.
Instructions
Check whether the LLM backend is running and the configured embedding/chat model is installed.
Read-only: yes. No side effects. Call before smart_search, semantic_search, or explain_symbol (when on-demand fallback is expected — pre-computed analysis returns instantly without the LLM backend).
Args: project_root: Project root. Auto-detected if omitted. Used to locate the project's LLM configuration. project: Project name or project_id — call list_projects to get them. Use it to ask about a project that is not the project of the current directory. It is an alternative to project_root, which takes a root path. Give one of the two, not both.
Returns:
dict: {ollama_enabled (bool), status (str — "ok"|"disabled"|
"not_configured"|"model_missing"|"embedding_unavailable"|"error"),
ollama_running (bool), ollama_url (str), configured_model (str),
num_ctx (int), installed_models (list[str]),
chat_api (dict — {configured (bool), model (str)}: whether an
external chat API replaces Ollama, and the model it names; a
configured one adds endpoint, format, and compliance_warning for an
external host),
configured_embed_model (str), embedding_installed (bool),
embedding_backend (str — "ollama", or "local" for a
sentence-transformers or ft:// model, which needs no Ollama:
it counts as installed, and with chat on an external API a
stopped Ollama still gives "ok"),
message (str, when status is not "ok"), model_details (list[dict]),
suggest_cloud (bool), vec_available (bool),
vec_error (str, optional), debug_log (str, optional — only when
debug logging is enabled)}
The chat model is looked for on the Ollama server of the chat
calls: ``ollama_url``, or the Ollama server that ``chat_api_base``
names. An OpenAI-compatible ``chat_api_base`` runs the model
itself, and no Ollama server is asked for it. ``"model_missing"``:
``message`` names a command for each missing model, which sets
``OLLAMA_HOST`` to the server that must hold the model.
``"error"`` also means that the Ollama server of ``chat_api_base``
gives no model list. When the server of ``ollama_url`` does not
answer, the chat model is not looked for.
ollama_url, num_ctx, installed_models, model_details,
configured_embed_model, and embedding_installed are present only
when Ollama runs; configured_model also needs chat on Ollama.
``"disabled"`` gives only status, ollama_enabled,
ollama_running, configured_model, num_ctx, and message;
embedding_backend is present on every other status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | Project name or project_id — call list_projects to get them. Use it to ask about a project that is not the project of the current directory. It is an alternative to project_root, which takes a root path. Give one of the two, not both. | |
| project_root | No | Project root. Auto-detected if omitted. Used to locate LLM config. Falls back to auto-detection when omitted. This field also accepts a project name or a project_id, but project is the clear field for those. |