This guide explains how to set up and use Ollama with Remix IDE for local AI-powered code completion and assistance. Note the restrictions listed below.
- What is Ollama?
- Installation
- CORS Configuration
- Model Download and Management
- Recommended Models
- Using Ollama in Remix IDE
- Troubleshooting
- Advanced Configuration
Ollama is a local AI model runner that allows you to run large language models on your own machine. With Remix IDE's Ollama integration, you get:
- Privacy: All processing happens locally on your machine
- No API rate throttling: No usage fees or rate limits
- Offline capability: Works without internet connection
- Code-optimized models: Specialized models for coding tasks
- Fill-in-Middle (FIM) support: Advanced code completion capabilities
The following is a list of models compatible with the Remix IDE (both desktop and web). The models have been tested to provide acceptable results on mid-tier consumer GPUs. As operating Ollama independently, the user should understand the model performance criteria and their hardware specifications.
- codestral:latest
- qwen3-coder:latest
- gpt-oss:latest
- deepseek-coder-v2:latest Great for code completion
The current integration does not allow agentic workflows. We strongly recommend running Ollama with hardware acceleration (e.g. GPUs) for best experience. The following features are not enabled when using Ollama, please fallback to remote providers.
- Contract generation
- Workspace Edits
macOS:
curl -fsSL https://ollama.ai/install.sh | shWindows: Download the installer from ollama.ai
Linux:
curl -fsSL https://ollama.ai/install.sh | shAfter installation, start the Ollama service:
ollama serveThe service will run on http://localhost:11434 by default.
To allow Remix IDE to communicate with Ollama, you need to configure CORS settings. See Ollama Cors Settings.
Use the ollama pull command to download models:
# Download a specific model
ollama pull qwen2.5-coder:14b
# Download the latest version
ollama pull codestral:latest
# List installed models
ollama list
# Remove a model
ollama rm model-name
# Show model information
ollama show codestral:latest <--template>
# Update a model
ollama pull codestral:latestModels are stored locally in:
- macOS:
~/.ollama/models - Linux:
~/.ollama/models - Windows:
%USERPROFILE%\.ollama\models
These models support advanced code completion with context awareness, code explanation, debugging help, and general questions:
ollama pull codestral:latest # ~22GB, state-of-the-art code modelollama pull qwen3-coder:latestollama pull gpt-oss:latestollama pull codegemma:7b # ~5GB, Google's code model
ollama pull codegemma:2b # ~2GB, lightweight option| Model Size | RAM Required | Speed | Quality | Use Case |
|---|---|---|---|---|
| 2B-3B | 4GB+ | Fast | Good | Quick completions, low-end hardware |
| 7B-8B | 8GB+ | Medium | High | Recommended for most users |
| 13B-15B | 16GB+ | Slower | Higher | Development workstations |
| 30B+ | 32GB+ | Slow | Highest | High-end workstations only |
Ensure Ollama is running and accessible:
curl http://localhost:11434/api/tags- Open Remix IDE
- Navigate to the AI Assistant panel
- Click the provider selector (shows current provider like "MistralAI")
- Select "Ollama" from the dropdown
- Wait for the connection to establish
- After selecting Ollama, a model dropdown will appear
- Select your preferred model from the list
- The selection will be saved for future sessions
- Code Completion: Type code and get intelligent completions
- Code Explanation: Ask questions about your code
- Error Help: Get assistance with debugging
- Code Generation: Generate code from natural language descriptions
-
Check if Ollama is running:
curl http://localhost:11434/api/tags
-
Verify CORS configuration:
curl -H "Origin: https://remix.ethereum.org" http://localhost:11434/api/tags -
Check if models are installed:
ollama list
Download at least one model:
ollama pull codestral:latest-
Start Ollama service:
ollama serve
-
Check if running on correct port:
netstat -an | grep 11434
- Close other applications to free up RAM
- Use smaller models (7B instead of 13B+)
- Ensure sufficient disk space
- Verify
OLLAMA_ORIGINSis set correctly - Restart Ollama after changing CORS settings
- Clear browser cache and reload Remix IDE
- Minimum: 8GB RAM, integrated GPU
- Recommended: 16GB RAM, dedicated GPU with 8GB+ VRAM
- Optimal: 32GB RAM, RTX 4090 or similar
- Ollama Documentation: https://ollama.ai/docs
- Remix IDE Documentation: https://remix-ide.readthedocs.io
- Community Support: Remix IDE Discord/GitHub Issues
- Model Hub: https://ollama.ai/library
Note: This integration provides local AI capabilities for enhanced privacy and performance. Model quality and speed depend on your hardware specifications and chosen models.