Custom AI Models on Remote SSH: Enhancing Your Developer Toolchain

In the fast-evolving world of software development, leveraging AI coding assistants has become a cornerstone of productivity. As developers increasingly work across diverse environments, from local machines to remote servers, the seamless integration and customization of these powerful developer tools are paramount. A recent GitHub Community discussion highlighted common challenges faced by developers trying to tailor their AI coding experience, specifically concerning GitHub Copilot on VS Code Remote SSH and the desire to use custom local models via Ollama.

Developer using an AI coding assistant with a remote server setup.
Developer using an AI coding assistant with a remote server setup.

The Challenge: Copilot's Default Behavior on Remote SSH

The discussion kicked off with user daherk2 reporting a persistent issue: when connected to a remote Linux server via VS Code's Remote SSH extension, GitHub Copilot consistently defaulted to Claude Haiku. This occurred regardless of the model preference set locally, raising questions about how model selections are handled in remote development contexts. This behavior can be frustrating for developers seeking consistent performance and specific model capabilities across their entire developer toolchain.

Connecting local AI models (Ollama) to remote development environments via SSH using the Continue extension.
Connecting local AI models (Ollama) to remote development environments via SSH using the Continue extension.

Integrating Custom Models: The Ollama Dilemma

Beyond the default model issue, daherk2 aimed to integrate a specific local model, GLM-5, running via Ollama on their local machine. The setup involved accessing Ollama (on 192.168.x.x:11434) from the remote server via an SSH RemoteForward tunnel. While Ollama documentation confirmed support for models like glm-5.1:cloud with Copilot CLI, direct integration with the VS Code Copilot extension proved elusive.

Community Solutions: Syncing Settings and Alternative Developer Tools

The community quickly provided clarity and solutions. User leoniofficials offered key insights:

  • Model Selection on Remote SSH: The issue often stems from the remote host utilizing its own configuration. It's crucial to ensure VS Code's settings sync is active and to verify that remote settings aren't overriding local preferences. This is a common consideration when managing any developer tool's configuration across different environments.
  • Custom Model Integration with Official Copilot: The official GitHub Copilot extension is a closed system. It is not designed to allow developers to swap its backend to local models like those provided by Ollama, even with sophisticated SSH tunneling in place.
  • The Recommended Solution: The Continue Extension: For developers keen on leveraging local LLMs, the Continue extension emerges as the answer. Install the Continue extension directly on your remote server. It is specifically built to connect to any Ollama model through your SSH tunnel. This allows you to effectively use your local LLMs as a powerful AI coding assistant, much like Copilot Chat, but with your preferred custom models. The connection point for Ollama via the SSH tunnel would typically be:
    localhost:11434

Enhancing Your Developer Tool Ecosystem

This discussion underscores the dynamic nature of AI-powered developer tools. While proprietary solutions like GitHub Copilot offer robust out-of-the-box functionality, the open-source ecosystem, exemplified by Ollama and the Continue extension, empowers developers with unparalleled customization. By understanding how configuration settings interact across remote environments and embracing flexible alternatives, developers can significantly enhance their productivity and gain greater control over their AI coding assistants. This approach not only solves immediate technical challenges but also fosters a more adaptable and powerful personal developer toolchain.

|

Dashboards, alerts, and review-ready summaries built on your GitHub activity.

 Install GitHub App to Start
Dashboard with engineering activity trends