Repository navigation
feat: Added Ollama as a BYOK model provider - #387
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds Ollama as a BYOK (Bring Your Own Key) model provider in the GitHub Copilot for Eclipse plugin, introducing provider-level endpoint configuration (instead of API keys) and wiring it through the preference UI, service layer, and LSP protocol.
Changes:
- Adds Ollama as a
ByokModelProviderand introduces provider-level config DTOs + LSP RPCs for saving/listing/deleting provider configs. - Updates the BYOK preferences UI to configure/manage an Ollama endpoint URL and to treat Ollama models as auto-registered on discovery.
- Adds unit tests and updates SWTBot BYOK test plan coverage for the new Ollama provider flow.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
Provider-specific branching is starting to spreadNot a blocker for this PR — the feature works as designed — but I think this is worth capturing before the next provider lands.
That was the right instinct, but the helper only replaced scattered string comparisons with scattered
All of them are re-deriving answers to the same four orthogonal questions:
The part I'd actually change now
return !isAzure(providerDisplayName) && !isOllama(providerDisplayName);The next provider that doesn't take a top-level key — and there's demand for one in #93's comments ("OpenAI protocol compatible local LLM server") — silently gets the wrong answer until someone remembers to edit this line. A positive definition would fail loudly instead of quietly. Longer-term shapePush the capabilities onto the enum so each provider declares itself once: public enum ByokModelProvider {
AZURE("Azure", Credential.PER_MODEL, /* remoteDiscovery */ false, /* autoRegister */ false),
OPENAI("OpenAI", Credential.API_KEY, true, false),
…
OLLAMA("Ollama", Credential.ENDPOINT_URL, true, true);
public boolean requiresApiKey() { … }
public boolean requiresEndpointUrl() { … }
public boolean supportsRemoteDiscovery() { … }
public boolean autoRegistersDiscoveredModels() { … }
}Adding a provider then means one enum line instead of auditing 13 call sites. I recognise this isn't free: the helpers take |
* Added Language server API to support Ollama. * Added Ollama URL configuration dialog. * Add support for Ollama provider configuration and management * Add tests for Ollama provider configuration and model management * Address comments. * Address comments.

fix #93
Test:
Manage Modelspreferences page (http://localhost:11434 by default):