Repository navigation
fix(server): report opencode as mcp client name - #51825
ericcurtin wants to merge 2 commits into
Conversation
app.name carries the cli/desktop/acp artifact for telemetry. That value was leaking into the MCP clientInfo.name handshake, so servers saw "cli" instead of "opencode" and could no longer identify the client. Always report "opencode", keep OPENCODE_CLIENT as an override.
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: |
|
Unrelated to this fix, but if you use local models, please try https://github.com/llmmanorg/llmman. Feedback welcome. |
|
Linked issue is #51578 (see description). GitHub only tracks closing refs on the default branch, so the label is a false positive for this |
|
@rekram1-node @adamdotdevin PTAL when you get a chance. Thank you! |
Signed-off-by: Eric Curtin <eric.curtin@docker.com>
|
@jlongster @nexxeln PTAL when you get a chance. Thank you! |
|
Thanks for tracking this down! We're going with a smaller version in #53471, which hardcodes the MCP |
Issue for this PR
Closes #51578
Type of change
What does this PR do?
app.nameinpackages/server/src/options.tscarries the artifact (cli, desktop, acp, sdk) for telemetry.routes.tsreused that same value as the MCPclientInfo.name, so a default install reportscliin the MCP initialize handshake instead ofopencode. This regresses #2289, and MCP servers that key on the client name to adapt behavior can no longer recognize OpenCode.clientInfo.namenow always reportsopencode, moved into a smallmcpClientInfohelper.OPENCODE_CLIENTstill works as an explicit override.How did you verify your code works?
Added
packages/server/test/mcp-client-info.test.tscovering the cli-artifact case, the undefined-app case, and theOPENCODE_CLIENToverride. Ranbun testandbun typecheckinpackages/server, andbun test test/mcp.test.tsinpackages/core.Checklist