Feature: Mult-kernel support for any installed and registered Jupyter kernel#4
Open
mattshu0410 wants to merge 1 commit intogoodfire-ai:mainfrom
Open
Feature: Mult-kernel support for any installed and registered Jupyter kernel#4mattshu0410 wants to merge 1 commit intogoodfire-ai:mainfrom
mattshu0410 wants to merge 1 commit intogoodfire-ai:mainfrom
Conversation
… kernel. kernel_name param carried through MCP tool, HTTP handler and server. Replace hardcoded notebook metadata with dynamic lookup of kernel spec and language info. kernel_name (spec identifier) and kernel_display_name (label for the session) are now separate in API responses. Still defaults to Python so backwards compatible.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overall purpose is to allow the tool to handle any Jupyter kernel not just Python. Lots of good visualisation and high-throughput sequencing packages are written in R under the BioConductor project. Working autonomously with them would be a good unlock.
get_notebook_metadata_for_kernelreplaces the previous approach of hardcoding Python 3.11 metadata in new sessions. It queries the Jupyter's KernelSpecManager. If the language model fails to infer the correct kernel name, the function returns the registered kernels, allowing the language model to pick the right one on the next turn.kernel_nameparameter for HTTP handler and server, MCP tool parameterskernel_nameandkernel_display_name(label for the session) are now separate in API responses.Still defaults to Python so backwards compatible. Default MCP tool request launches Python notebook.
Tested on IRkernel, Julia and Python.
Of course, open to any suggestions for improvement.