Skip to content

Commit e35c4a1

Browse files
Updated based on code review
1 parent afabc31 commit e35c4a1

File tree

4 files changed

+17
-56
lines changed

4 files changed

+17
-56
lines changed

packages/jupyter-ai-magics/jupyter_ai_magics/partner_providers/copilot.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def _llm_type(self) -> str:
124124
class GitHubCopilotProvider(BaseProvider):
125125
id = "github-copilot"
126126
name = "GitHub Copilot"
127-
models = ["*"]
127+
models = ["default"]
128128
model_id_key = "model"
129129
pypi_package_deps = ["pylspclient"]
130130
help = (
@@ -143,6 +143,22 @@ def __init__(
143143
):
144144
super().__init__(**kwargs)
145145
self._llm = GitHubCopilotLLM(lsp_bin_path=self.lsp_bin_path)
146+
147+
@classmethod
148+
def chat_models(self):
149+
"""
150+
Empty list because Copilot LSP does not support the chat feature
151+
https://github.com/github/copilot-language-server-release/issues/1
152+
"""
153+
return []
154+
155+
@classmethod
156+
def completion_models(self):
157+
"""
158+
Only `default` (GPT-4o as of May 2025) because Copilot LSP does not support different model selection
159+
https://docs.github.com/en/copilot/using-github-copilot/ai-models/changing-the-ai-model-for-copilot-code-completion
160+
"""
161+
return ["default"]
146162

147163
async def generate_inline_completions(self, request: InlineCompletionRequest):
148164
self._llm.ensure_lsp_server_initialized()

packages/jupyter-ai/jupyter_ai/chat_handlers/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from .ask import AskChatHandler
22
from .base import BaseChatHandler, SlashCommandRoutingType
3-
from .copilot import GitHubCopilotChatHandler
43
from .default import DefaultChatHandler
54
from .generate import GenerateChatHandler
65
from .help import HelpChatHandler

packages/jupyter-ai/jupyter_ai/chat_handlers/copilot.py

Lines changed: 0 additions & 53 deletions
This file was deleted.

packages/jupyter-ai/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ ask = "jupyter_ai.chat_handlers.ask:AskChatHandler"
5151
generate = "jupyter_ai.chat_handlers.generate:GenerateChatHandler"
5252
learn = "jupyter_ai.chat_handlers.learn:LearnChatHandler"
5353
help = "jupyter_ai.chat_handlers.help:HelpChatHandler"
54-
github = "jupyter_ai.chat_handlers.copilot:GitHubCopilotChatHandler"
5554

5655
[project.optional-dependencies]
5756
test = [

0 commit comments

Comments
 (0)