Add separate OpenCode + Nemotron Workbench MCP app - #487
Draft
samhornstein wants to merge 10 commits into
Draft
samhornstein wants to merge 10 commits into
samhornstein wants to merge 10 commits into
Conversation
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.
Adds
src/opencode-nemotron-mcp: a separate code-server app with the OpenCode agent, local NVIDIA Nemotron models, Workbench MCP tools, and generated workspace context. Defaults to a smaller model for T4 GPUs, with a larger model available for A100/H100 GPUs. Model inference stays on the VM; MCP tools use the authenticated user's Workbench and cloud APIs.Built on #473. Until that PR lands, the diff against
masteralso includes its originalsrc/opencode-nemotrontemplate. Those files match3a31f42exactly. This app has its own directory, template ID, and display name.This PR:
nemotron-3-nano:4b— 2.8 GB of weights, targeting T4 16 GB or V100 16 GB.nemotron-3.5-lightning:30bas the second model — 25 GB of weights, targeting A100 40 GB, A100 80 GB, or either Workbench H100 80 GB option. Keeps the menu to these two choices; custom tags remain available through the CLI.wb-mcp-serverandllm-contextfeatures. Runs services and context generation asabc, the authenticated Workbench user. OpenCode explicitly loads/config/.claude/CLAUDE.md, including from nested project directories, with instructions mapping the shared guides' tool names to OpenCode'swb_names.opencode-model: an interactive menu oropencode-model <tag>. Downloads only the selected model, checks tool support, and loads it before saving/config/.opencode-modeland updating the agent config. Download or loading failures preserve the previous saved selection. Restarts reuse cached weights.OLLAMA_CONTEXT_LENGTH=65536and advertises the same context limit to OpenCode. Limits Ollama to one concurrent request and one loaded model to bound GPU memory use.Two implementation choices:
OLLAMA_MODEL=promptto start services without downloading a model. The wrapper then opens the picker when a user launches OpenCode in a terminal. Devcontainer lifecycle hooks have no interactive terminal, so they never wait for input. Automation can select a tag explicitly. The persistent override takes precedence overOLLAMA_MODEL; the tag remains a compose setting because Workbench's VM parser substitutes only a fixed set of template options./opt/wb-mcp-server/wb-mcp-serveras the agent user, using the existingwbcredentials. The shared feature's HTTP daemon remains available for the other included clients. No changes to the shared MCP or context features are required.Testing
wb_statusdispatch with a fakewbCLI. This is included in the 15 tests.git diff 3a31f42 -- src/opencode-nemotronis empty.68ae8d5.Not tested: a full Workbench container deployment, authenticated MCP calls against a real workspace, or model performance and GPU memory use at 64K context. GPU recommendations are memory estimates. P4 8 GB is documented as experimental for Nano 4B and needs separate validation, including the Ollama driver requirement.
Not registered in the
test-pr.yamlcontainer-build matrix:devcontainer upwould download and load a model on a runner without a GPU. The dedicated workflow covers the scripts and MCP transport.BENCH-9850