Search Documentation

Find and navigate to documentation pages and their content

Using Codistry with Ollama

Connect Ollama for fully offline, privacy-first AI assistance.

What is Ollama?

Ollama is a lightweight CLI tool for running open-source LLMs locally. It exposes an OpenAI-compatible API, so Codistry can talk to it directly.

Complete Privacy

All processing stays on your machine. Nothing leaves your network.

Simple CLI

One command to pull and run any supported model.

Offline Ready

No internet required after initial model download.

Hardware Optimized

Automatic GPU acceleration on Apple Silicon, NVIDIA, and AMD.

Prerequisites

  • Ollama installed (macOS, Linux, or Windows)
  • Codistry VS Code extension installed
  • At minimum 8 GB RAM (16 GB+ recommended for 7B+ models)

Step 1: Install Ollama

# macOS / Linux
curl -fsSL https://ollama.ai/install.sh | sh

# Or download from https://ollama.ai for Windows / macOS .dmg

Step 2: Pull a Model

# Recommended for coding
ollama pull llama3

# Other popular options
ollama pull codellama
ollama pull mistral
ollama pull deepseek-coder

Recommended Models

ModelSizeBest for
llama3~4.7 GBGeneral-purpose, great balance
codellama~3.8 GBCode generation & explanation
deepseek-coder~3.8 GBStrong coding performance
mistral~4.1 GBFast, efficient generalist
llama3:70b~39 GBHighest quality (needs 64 GB+ RAM)

Step 3: Configure Codistry

Easiest path: one-click import

Codistry can auto-detect models you've already pulled with Ollama. Open the Codistry sidebar, go to the Models tab, and use the Ollama one-click import to add a detected model without typing anything. If you prefer to add it manually, follow the steps below.

  1. Open the Codistry sidebar in VS Code
  2. Click the Settings gear icon
  3. Navigate to Models
  4. Add an OpenAI-Compatible Model:
    • Display Name: Name of choice
    • Model Name: llama3 (must match the name from ollama list)
    • Base URL: http://localhost:11434/v1
    • Max Tokens:Your model's context length
  5. Click Add Model, then Save Settings

Step 4: Test the Connection

  1. Make sure Ollama is running (ollama serve or it starts automatically)
  2. Open the Codistry chat panel
  3. Select your Ollama model from the dropdown
  4. Send a test message

Troubleshooting

Model Name Must Match

The model name in Codistry must exactly match the name in Ollama. Run ollama list to see installed models and use the exact name.

Problem: "Connection refused" error

Solution: Run `ollama serve` to start the server, or check if it's already running on port 11434.

Problem: Slow responses

Solution: Try a smaller model (3B-7B) or ensure GPU acceleration is enabled.

Problem: Streaming issues

Solution: Turn off "Enable Streaming" for the provider under Models → API Configuration in Codistry's settings.

Next Steps