Elffuss BraidHub

kikocis/continue public

docs: add comprehensive Ollama troubleshooting guide (#7209)

* docs: add comprehensive Ollama troubleshooting guide

- Add solutions for local connection issues
- Document remote Ollama configuration steps
- Include WSL-specific networking fixes
- Add Docker container connectivity solutions
- Cover parse error troubleshooting

Addresses common Ollama integration problems users face when setting up Continue with local, remote, WSL, and containerized Ollama instances.

* docs: add local assistant secrets management section to FAQs

- Added comprehensive documentation for managing local secrets and environment variables
- Included multiple methods for configuring .env files (workspace, global, process)
- Added examples showing how to use secrets in config.yaml
- Explained difference between local secrets and Hub-managed secrets
- Added troubleshooting tips for common secret configuration issues
- Added link to Ollama guide for better discoverability
- Added link to offline usage guide for users without internet access

* docs: add model addons usage documentation for local assistants

- Document how to use hub model addons in local assistant configs
- Show examples of using 'uses:' syntax with provider/model-name format
- Explain how to combine hub addons with local model configurations
- Include override example for customizing addon settings locally
- Add requirements section noting login and internet connection needed

* fix: resolve broken image links in documentation

- Fixed broken link to plan mode selector image (use plan-mode-selector.png)
- Fixed broken link to assistant extension selector image
- Removed broken link to non-existent /features/plan/how-to-customize page
Changeset22fa89712352ad1e13c8e4e7c3771fc0d1e56a1bffff6598358857bafed39d81
AuthorBrian Douglas <bdougie@users.noreply.github.com> · 2025-08-18 16:45 -04:00
CommitterGitHub <noreply@github.com> · 2025-08-18 13:45 -07:00
Parentsc2ba591c772f

Browse the files at this changeset

4 files changed

modified docs/faqs.mdx +228 −0
@@ -146,6 +146,234 @@
146146
147147 For more details about this requirement, see the [LanceDB issue #2195](https://github.com/lancedb/lance/issues/2195).
148148
149+## Ollama Issues
150+
151+For a comprehensive guide on setting up and troubleshooting Ollama, see the [Ollama Guide](/guides/ollama-guide).
152+
153+### Unable to connect to local Ollama instance
154+
155+If you're getting "Unable to connect to local Ollama instance" errors:
156+
157+1. **Verify Ollama is running**: Check http://localhost:11434 in your browser - you should see "Ollama is running"
158+2. **Start Ollama properly**: Use `ollama serve` (not just `ollama run model-name`)
159+3. **Check your config**: Ensure your `config.yaml` has the correct setup:
160+
161+```yaml
162+models:
163+ - name: llama3
164+ provider: ollama
165+ model: llama3:latest
166+```
167+
168+### Connection failed to remote Ollama (EHOSTUNREACH/ECONNREFUSED)
169+
170+When connecting to Ollama on another machine:
171+
172+1. **Configure Ollama to listen on all interfaces**:
173+ - Set environment variable: `OLLAMA_HOST=0.0.0.0:11434`
174+ - For systemd: Edit `/etc/systemd/system/ollama.service` and add under `[Service]`:
175+ ```
176+ Environment="OLLAMA_HOST=0.0.0.0:11434"
177+ Environment="OLLAMA_ORIGINS=*"
178+ ```
179+ - Restart Ollama: `sudo systemctl restart ollama`
180+
181+2. **Update your Continue config**:
182+```yaml
183+models:
184+ - name: llama3
185+ provider: ollama
186+ apiBase: http://192.168.1.136:11434 # Use your server's IP
187+ model: llama3:latest
188+```
189+
190+3. **Check firewall settings**: Ensure port 11434 is open on the server
191+
192+### Ollama not working in WSL
193+
194+For WSL users having connection issues:
195+
196+#### Windows 11 22H2+ (Recommended)
197+Create or edit `%UserProfile%\.wslconfig`:
198+```ini
199+[wsl2]
200+networkingMode=mirrored
201+```
202+Then restart WSL: `wsl --shutdown`
203+
204+#### Older Windows/WSL versions
205+In PowerShell (as Administrator):
206+```powershell
207+# Add firewall rules
208+New-NetFireWallRule -DisplayName 'WSL Ollama' -Direction Inbound -LocalPort 11434 -Action Allow -Protocol TCP
209+New-NetFireWallRule -DisplayName 'WSL Ollama' -Direction Outbound -LocalPort 11434 -Action Allow -Protocol TCP
210+
211+# Get WSL IP (run 'ip addr' in WSL to find eth0 IP)
212+# Then add port proxy (replace <WSL_IP> with your actual IP)
213+netsh interface portproxy add v4tov4 listenport=11434 listenaddress=0.0.0.0 connectport=11434 connectaddress=<WSL_IP>
214+```
215+
216+### Docker container can't connect to host Ollama
217+
218+When running Continue or other tools in Docker that need to connect to Ollama on the host:
219+
220+**Windows/Mac**: Use `host.docker.internal`:
221+```yaml
222+models:
223+ - name: llama3
224+ provider: ollama
225+ apiBase: http://host.docker.internal:11434
226+ model: llama3:latest
227+```
228+
229+**Linux**: Use the Docker bridge IP (usually `172.17.0.1`):
230+```yaml
231+models:
232+ - name: llama3
233+ provider: ollama
234+ apiBase: http://172.17.0.1:11434
235+ model: llama3:latest
236+```
237+
238+**Docker run command**: Add host mapping:
239+```bash
240+docker run -d --add-host=host.docker.internal:host-gateway ...
241+```
242+
243+### Parse errors with remote Ollama
244+
245+If you're getting parse errors with remote Ollama:
246+
247+1. **Verify the model is installed on the remote**:
248+ ```bash
249+ OLLAMA_HOST=192.168.1.136:11434 ollama list
250+ ```
251+
252+2. **Install missing models**:
253+ ```bash
254+ OLLAMA_HOST=192.168.1.136:11434 ollama pull llama3
255+ ```
256+
257+3. **Check URL format**: Ensure you're using `http://` not `https://` for local network addresses
258+
259+## Local Assistant
260+
261+### Managing Local Secrets and Environment Variables
262+
263+For running Continue completely offline without internet access, see the [Running Continue Without Internet guide](/guides/running-continue-without-internet).
264+
265+Continue supports multiple methods for managing secrets locally, searched in this order:
266+
267+1. **Workspace `.env` files**: Place a `.env` file in your workspace root directory
268+2. **Workspace Continue folder**: Place a `.env` file in `<workspace-root>/.continue/.env`
269+3. **Global `.env` file**: Place a `.env` file in `~/.continue/.env` for user-wide secrets
270+4. **Process environment variables**: Use standard system environment variables
271+
272+#### Creating `.env` files
273+
274+Create a `.env` file in one of these locations:
275+- **Per-workspace**: `<workspace-root>/.env` or `<workspace-root>/.continue/.env`
276+- **Global**: `~/.continue/.env`
277+
278+Example `.env` file:
279+```
280+OPENAI_API_KEY=sk-...
281+ANTHROPIC_API_KEY=sk-ant-...
282+CUSTOM_API_URL=https://api.example.com
283+```
284+
285+#### Using secrets in config.yaml
286+
287+Reference your local secrets using the `secrets` namespace:
288+```yaml
289+models:
290+ - provider: openai
291+ apiKey: ${{ secrets.OPENAI_API_KEY }}
292+```
293+
294+#### Hub-managed secrets
295+
296+For centralized team secret management, use `${{ inputs.SECRET_NAME }}` syntax in your config.yaml and manage them at [https://hub.continue.dev/settings/secrets](https://hub.continue.dev/settings/secrets):
297+```yaml
298+models:
299+ - provider: openai
300+ apiKey: ${{ inputs.OPENAI_API_KEY }}
301+```
302+
303+#### Important notes
304+
305+- **Never commit `.env` files** to version control - add them to `.gitignore`
306+- The `.env` file uses standard dotenv format (KEY=value, no quotes needed)
307+- Secrets are loaded when Continue starts, so restart your IDE after changes
308+- Local `.env` files take precedence over Hub secrets when both exist
309+
310+#### Troubleshooting secrets
311+
312+If your API keys aren't being recognized:
313+1. Check the `.env` file is in the correct location
314+2. Ensure there are no quotes around values in the `.env` file
315+3. Restart your IDE after adding/changing secrets
316+4. Verify the variable name matches exactly (case-sensitive)
317+5. Check that your `.env` file has proper line endings (LF, not CRLF on Windows)
318+
319+### Using Model Addons Locally
320+
321+You can leverage model addons from the Continue Hub in your local assistant configurations using the `uses:` syntax. This allows you to reference pre-configured model blocks without duplicating configuration.
322+
323+#### Requirements
324+
325+- You must be logged in to Continue
326+- Internet connection is required (model addons are fetched from the hub)
327+
328+#### Usage
329+
330+In your local `config.yaml`, reference model addons using the format `provider/model-name`:
331+
332+```yaml
333+name: My Local Assistant
334+version: 0.0.1
335+schema: v1
336+models:
337+ - uses: ollama/llama3.1-8b
338+ - uses: anthropic/claude-3.5-sonnet
339+ - uses: openai/gpt-4
340+```
341+
342+#### With local configuration
343+
344+You can combine hub model addons with local models:
345+
346+```yaml
347+name: My Local Assistant
348+version: 0.0.1
349+schema: v1
350+models:
351+ # Hub model addon
352+ - uses: anthropic/claude-3.5-sonnet
353+
354+ # Local model configuration
355+ - name: Local Ollama
356+ provider: ollama
357+ model: codellama:latest
358+ apiBase: http://localhost:11434
359+```
360+
361+#### Override addon settings
362+
363+You can override specific settings from the model addon:
364+
365+```yaml
366+models:
367+ - uses: ollama/llama3.1-8b
368+ override:
369+ apiBase: http://192.168.1.100:11434 # Use remote Ollama server
370+ roles:
371+ - chat
372+ - autocomplete
373+```
374+
375+This feature allows you to maintain consistent model configurations across teams while still allowing local customization when needed.
376+
149377 ## How do I reset the state of the extension?
150378
151379 Continue stores its data in the `~/.continue` directory (`%USERPROFILE%\.continue` on Windows).
modified docs/features/plan/how-it-works.mdx +1 −2
@@ -85,8 +85,7 @@
8585 - Encourages thorough analysis before suggesting changes
8686
8787 <Info>
88- The system message can be customized per model. See [How to
89- Customize](/features/plan/how-to-customize) for details or see it [directly in
88+ The system message can be customized per model. See it [directly in
9089 the
9190 code](https://github.com/continuedev/continue/blob/main/core/llm/defaultSystemMessages.ts).
9291 </Info>
modified docs/features/plan/quick-start.mdx +1 −1
@@ -11,7 +11,7 @@
1111
1212 You can switch to `Plan` in the mode selector below the chat input box.
1313
14-![How to select plan mode](/images/mode-select-plan.png)
14+![How to select plan mode](/images/plan-mode-selector.png)
1515
1616 <Info>
1717 If Plan is disabled with a `Not Supported` message, the selected model or
modified docs/hub/assistants/use-an-assistant.mdx +1 −1
@@ -16,4 +16,4 @@
1616 - Select the assistant from the **assistant dropdown** in the Continue extension.
1717 - Begin using it for chat, code generation, or other configured capabilities.
1818
19-[Extension Assistant Selector](/images/assistant-extension-select-319492a06d6249e5389747687341dfdb.png)
19+![Extension Assistant Selector](/images/hub/assistants/images/assistant-extension-select.png)