fix: shorten OpenCode temporary MCP tool names and keep them stable per conversation
Use gbd-/gbc- prefixes with a 6-char conversation hash instead of 20-char per-request hashes, lease per-conversation slots so parallel requests never share a name, and expose gateway custom tools as <server hash>_<name> within the 64-char provider limit.
This commit is contained in:
@@ -1079,7 +1079,7 @@ describe('KnowledgeMcpGateway', () => {
|
||||
expect(listed.tools).toEqual([
|
||||
expect.objectContaining({
|
||||
name: expect.stringMatching(
|
||||
/^mcp_[a-f0-9]{8}_[a-f0-9]{8}_echo_private$/u
|
||||
/^[a-f0-9]{4}_echo_private$/u
|
||||
),
|
||||
description: expect.stringContaining('Private MCP')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user