Pylance MCP tool name exceeds Amazon Bedrock 64-character limit
Type: <b>Bug</b>
NOTE: ChatGPT helped analyze my issue and prepare this issue text since I'm not sure what's happening!
I am using VS Code Chat with a custom OpenAI-compatible endpoint backed by LiteLLM.
The endpoint exposes Claude models which are routed through Amazon Bedrock.
With Pylance enabled, any request to one of these Claude models fails before model execution because a Pylance MCP tool name exceeds Bedrock's 64-character tool-name limit.
## Steps to Reproduce
1. Enable the Pylance extension.
2. Configure a custom OpenAI-compatible language model endpoint in VS Code Chat.
3. Use a Claude model routed through Amazon Bedrock.
4. Leave tool calling enabled.
5. Send any chat/agent request.
## Actual Result
The request fails with:
```text
Request Failed: 400
litellm.BadRequestError: BedrockException -
1 validation error detected:
Value 'activate_fallback_mcp_pylance_mcp_s_pylanceInstalledTopLevelModules_1'
at 'toolConfig.tools.85.member.toolSpec.name'
failed to satisfy constraint:
Member must have length less than or equal to 64
```
The generated tool name is:
```text
activate_fallback_mcp_pylance_mcp_s_pylanceInstalledTopLevelModules_1
```
The underlying Pylance tool appears to be:
```text
pylanceInstalledTopLevelModules
```
but after the additional VS Code/MCP naming is applied, the resulting name exceeds the Amazon Bedrock 64-character limit.
I reproduced this with:
- Claude Sonnet 4.6
- Claude Sonnet 5
A GPT model through the same LiteLLM endpoint works normally.
## Workaround
If I disable the Pylance extension, the same Claude models work successfully through the same endpoint with the same credentials and model configuration.
So the endpoint and model routing appear to be working, and the failure is specifically triggered by the Pylance MCP tool registration.
## Expected Result
Pylance MCP tools should be usable with providers that impose a 64-character tool-name limit, such as Amazon Bedrock.
Possible solutions could include shortening generated MCP tool names, using shorter aliases, or providing a setting to disable Pylance MCP/AI tools while retaining the normal Pylance language-server functionality.
Extension version: 2026.3.1
VS Code version: Code 1.132.0 (Universal) (df53daabb18cd157bdb08c7f01c34df936cf12f4, 2026-08-04T15:30:20Z)
OS version: Darwin arm64 25.6.0
Modes:
<details>
<summary>System Added Logs</summary>
```
{
"editor.fontSize" : 14,
"redhat.telemetry.enabled" : true,
"insertDateString.format" : "DDD, MMM DD, YYYY",
"editor.fontFamily" : "Maple Mono Normal NF, Hack Nerd Font,JuliaMono, Menlo, Monaco, 'Courier New', monospace",
"files.autoSave" : "afterDelay",
"fortran.formatting.findentArgs" : [
],
"gitlens.views.compare.location" : "gitlens",
"gitlens.views.repositories.location" : "gitlens",
"git.autofetch" : true,
"fortran-ls.enableCodeActions" : true,
"terminal.integrated.commandsToSkipShell" : [
"language-julia.interrupt"
],
"fortran.linter.com" : "\/Users\/mathomp4\/installed\/Core\/gcc-gfortran\/9.2.0-usingclang-Catalina\/bin\/gfortran",
"remote.SSH.enableRemoteCommand" : true,
"git.enableSmartCommit": true,
"fortran.fortls.symbolTypes" : false,
"fortran.fortls.path" : "/Users/mathomp4/.homebrew/brew/bin/fortls",
"rewrap.wrappingColumn" : 132,
"git.confirmSync" : false,
"fortran-ls.variableHover": true,
"remote.SSH.serverInstallPath" : {
"discover-mil": "/gpfsm/dnb34/mathomp4/vscode-server",
"discover": "/gpfsm/dnb34/mathomp4/vscode-server"
},
"gitlens.views.search.location" : "gitlens",
"gitlens.codeLens.enabled" : false,
"julia.executablePath" : "/Users/mathomp4/.homebrew/brew/bin/julia",
"editor.accessibilitySupport" : "off",
"gitlens.views.lineHistory.location" : "gitlens",
"github.copilot.enable" : {
"*": true,
"plaintext": true,
"markdown": true,
"scminput": false,
"python": true,
"yaml": true
},
"editor.inlineSuggest.enabled" : true,
"remote.SSH.remotePlatform" : {
"alderaan": "macOS",
"discover": "linux",
"discover-mil": "linux"
},
"workbench.preferredLightColorTheme" : "GitHub Light",
"github.codespaces.defaultExtensions" : [
"GitHub.codespaces",
"GitHub.vscode-pull-request-github"
],
"git.postCommitCommand" : "sync",
"remote.SSH.showLoginTerminal" : true,
"gitlens.views.fileHistory.location" : "gitlens",
"fortran-ls.lowercaseIntrinsics" : true,
"fortran.formatting.path" : "\/Users\/mathomp4\/.homebrew\/brew\/bin\/findent",
"terminal.integrated.fontSize" : 14,
"github.copilot.advanced" : {
},
"terminal.external.osxExec" : "iTerm.app",
"julia.enableTelemetry" : false,
"fortran.linter.compilerPath" : "/Users/mathomp4/.homebrew/brew/bin/gfortran-13",
"editor.guides.bracketPairs" : false,
"security.workspace.trust.untrustedFiles" : "open",
"fortran-ls.notifyInit" : true,
"editor.renderWhitespace" : "none",
"fortran-ls.executablePath": "\/Users\/mathomp4\/.homebrew\/brew\/bin\/fortls",
"workbench.startupEditor" : "newUntitledFile",
"rewrap.autoWrap.enabled": false,
"terminal.integrated.env.osx": {
"FIG_NEW_SESSION": "1"
},
"remote.SSH.lockfilesInTmp": true,
"[markdown]": {
"editor.quickSuggestions": {
"comments": "off",
"strings": "off",
"other": "off"
},
"editor.suggestOnTriggerCharacters": false,
"editor.defaultFormatter": "darkriszty.markdown-table-prettify"
},
"[python]": {
"editor.formatOnType": true
},
"idl.dontAskForIdlDir": true,
"editor.cursorSurroundingLines": 999999,
"markdown-mermaid.languages": [
"mermaid"
],
"markdown-preview-github-styles.colorTheme": "light",
"workbench.colorCustomizations": {
"editor.lineHighlightBackground": "#1073cf2d",
"editor.lineHighlightBorder": "#9fced11f"
},
"editor.wordWrap": "off",
"diffEditor.wordWrap": "off",
"editor.guides.indentation": false,
"blockman.n04ColorComboPreset": "Classic Dark 1 (Super gradients)",
"yaml.customTags": [
"!And",
"!And sequence",
"!If",
"!If sequence",
"!Not",
"!Not sequence",
"!Equals",
"!Equals sequence",
"!Or",
"!Or sequence",
"!FindInMap",
"!FindInMap sequence",
"!Base64",
"!Join",
"!Join sequence",
"!Cidr",
"!Ref",
"!Sub",
"!Sub sequence",
"!GetAtt",
"!GetAZs",
"!ImportValue",
"!ImportValue sequence",
"!Select",
"!Select sequence",
"!Split",
"!Split sequence"
],
"markdown-mermaid.darkModeTheme": "default",
"circleci.notifications.areActive": "no",
"circleci.hostUrl": "",
"json.schemas": [
{
"fileMatch": [
"/.zenodo.json"
],
"url": "https://zenodo.org/schemas/deposits/records/legacyrecord.json"
}
],
"editor.autoClosingQuotes": "never",
"application.shellEnvironmentResolutionTimeout": 30,
"editor.fontLigatures": true,
"amazonQ.telemetry": false,
"gitlens.advanced.messages": {
"suppressIntegrationRequestTimedOutWarning": true
},
"github.copilot.editor.enableAutoCompletions": true,
"python.analysis.inlayHints.variableTypes": true,
"python.languageServer": "Pylance",
"python.analysis.inlayHints.functionReturnTypes": true,
"python.analysis.typeCheckingMode": "basic",
"python.analysis.nodeExecutable": "/Users/mathomp4/.homebrew/brew/bin/node",
"python.analysis.fixAll": [
],
"editor.wordWrapColumn": 4096,
"remote.SSH.enableDynamicForwarding": false,
"github.gitProtocol": "ssh",
"github.copilot.selectedCompletionModel": "",
"continue.telemetryEnabled": false,
"yaml.schemas": {
"file:///Users/mathomp4/.vscode/extensions/continue.continue-1.2.11-darwin-arm64/config-yaml-schema.json": [
".continue/**/*.yaml"
],
"file:///Users/mathomp4/.vscode/extensions/continue.continue-1.2.14-darwin-arm64/config-yaml-schema.json": [
".continue/**/*.yaml"
]
},
"gitlens.launchpad.ignoredOrganizations": [
"microsoft"
],
"gitlens.ai.model": "gitkraken",
"gitlens.ai.gitkraken.model": "gemini:gemini-2.0-flash",
"continue.enableTabAutocomplete": true,
"github.copilot.nextEditSuggestions.enabled": true,
"highlight.regexes": {
"((?:<!-- *)?(?:#|// @|//|./\\*+|<!--|--|\\* @|{!|{{!--|{{!) *TODO(?:\\s*\\([^)]+\\))?:?)((?!\\w)(?: *-->| *\\*/| *!}| *--}}| *}}|(?= *(?:[^:]//|/\\*+|<!--|@|--|{!|{{!--|{{!))|(?: +[^\\n@]*?)(?= *(?:[^:]//|/\\*+|<!--|@|--(?!>)|{!|{{!--|{{!))|(?: +[^@\\n]+)?))": { "filterFileRegex": ".*(?<!CHANGELOG.md)$",
"decorations": [
{
"overviewRulerColor": "#ffcc00",
"backgroundColor": "#ffcc00",
"color": "#1f1f1f",
"fontWeight": "bold"
},
{
"backgroundColor": "#ffcc00",
"color": "#1f1f1f"
}
]
},
"((?:<!-- *)?(?:#|// @|//|./\\*+|<!--|--|\\* @|{!|{{!--|{{!) *(?:FIXME|FIX|BUG|UGLY|DEBUG|HACK)(?:\\s*\\([^)]+\\))?:?)((?!\\w)(?: *-->| *\\*/| *!}| *--}}| *}}|(?= *(?:[^:]//|/\\*+|<!--|@|--|{!|{{!--|{{!))|(?: +[^\\n@]*?)(?= *(?:[^:]//|/\\*+|<!--|@|--(?!>)|{!|{{!--|{{!))|(?: +[^@\\n]+)?))": {
"filterFileRegex": ".*(?<!CHANGELOG.md)$",
"decorations": [
{
"overviewRulerColor": "#cc0000",
"backgroundColor": "#cc0000",
"color": "#1f1f1f",
"fontWeight": "bold"
},
{
"backgroundColor": "#cc0000",
"color": "#1f1f1f"
}
]
},
"((?:<!-- *)?(?:#|// @|//|./\\*+|<!--|--|\\* @|{!|{{!--|{{!) *(?:REVIEW|OPTIMIZE|TSC)(?:\\s*\\([^)]+\\))?:?)((?!\\w)(?: *-->| *\\*/| *!}| *--}}| *}}|(?= *(?:[^:]//|/\\*+|<!--|@|--|{!|{{!--|{{!))|(?: +[^\\n@]*?)(?= *(?:[^:]//|/\\*+|<!--|@|--(?!>)|{!|{{!--|{{!))|(?: +[^@\\n]+)?))": {
"filterFileRegex": ".*(?<!CHANGELOG.md)$",
"decorations": [
{
"overviewRulerColor": "#00ccff",
"backgroundColor": "#00ccff",
"color": "#1f1f1f",
"fontWeight": "bold"
},
{
"backgroundColor": "#00ccff",
"color": "#1f1f1f"
}
]
},
"((?:<!-- *)?(?:#|// @|//|./\\*+|<!--|--|\\* @|{!|{{!--|{{!) *(?:IDEA)(?:\\s*\\([^)]+\\))?:?)((?!\\w)(?: *-->| *\\*/| *!}| *--}}| *}}|(?= *(?:[^:]//|/\\*+|<!--|@|--|{!|{{!--|{{!))|(?: +[^\\n@]*?)(?= *(?:[^:]//|/\\*+|<!--|@|--(?!>)|{!|{{!--|{{!))|(?: +[^@\\n]+)?))": {
"filterFileRegex": ".*(?<!CHANGELOG.md)$",
"decorations": [
{
"overviewRulerColor": "#cc00cc",
"backgroundColor": "#cc00cc",
"color": "#1f1f1f",
"fontWeight": "bold"
},
{
"backgroundColor": "#cc00cc",
"color": "#1f1f1f"
}
]
}
},
"rewrap.autoWrap.notification": "text",
"aws.cloudformation.telemetry.enabled": false,
"terminal.integrated.fontWeight": "normal",
"terminal.integrated.fontLigatures.enabled": true,
"chat.viewSessions.orientation": "stacked",
"git.openRepositoryInParentFolders": "always",
"docker.extension.enableComposeLanguageServer": false,
"githubPullRequests.pullBranch": "never",
"julia.symbolCacheDownload": true,
"python.analysis.aiCodeActions": {
"generateDocstring": false,
"implementAbstractClasses": false,
"generateSymbol": false,
"convertFormatString": false,
"convertLambdaToNamedFunction": false
},
}
```
</details><details>
<summary>System Info</summary>
|Item|Value|
|---|---|
|CPUs|Apple M2 Pro (12 x 2400)|
|GPU Status|2d_canvas: enabled<br>GPU0: VENDOR= 0x106b [Google Inc. (Apple)], DEVICE=0x0000 [ANGLE (Apple, ANGLE Metal Renderer: Apple M2 Pro, Version 26.6.1 (Build 25G76))], DRIVER_VENDOR=Apple, DRIVER_VERSION=26.6.1 *ACTIVE*<br>Machine model name: Mac<br>Machine model version: 14.10<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: enabled_on<br>trees_in_viz: disabled_off<br>video_decode: enabled<br>video_encode: enabled<br>webgl: enabled<br>webgpu: enabled<br>webnn: disabled_off|
|Load (avg)|3, 3, 5|
|Memory (System)|32.00GB (0.43GB free)|
|Process Argv|--crash-reporter-id 520079fc-57a7-4db7-895b-cbd97032525e|
|Screen Reader|no|
|VM|0%|
</details><details>
<summary>A/B Experiments</summary>
```
vsliv368cf:30146710
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
envsactivate1:31551504
478i5457:31544283
cloudbuttont:31379625
3efgi100_wstrepl:31403338
ddidt:31399633
ec5jj548:31422691
lysithea-0014-2in1-kld2:31558770
cp_cls_t_966_ss:31526232
8hhj4413:31478653
ge8j1254_inline_auto_hint_haiku:31490510
cp_cls_t_1081:31454832
conptydll_true:31498968
e9c30283:31461165
test_control1:31471004
46204921:31447328
capico_a_098a3278:31555650
idci7584:31464702
e3e4d672:31494082
ei9d7968:31496641
nes-extended-on:31455476
chat:31457767
8hig5102:31480529
89g7j272:31518289
7e187181:31503455
i2gc6536:31499202
52612955:31516516
ghj88844:31499326
ddid_c:31478207
hmra_i5g22:31518061
ie3bb177:31557831
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
j0d79568:31499440
jb_cp_cls_t_632:31543129
56dj4588:31512888
32d76977:31512328
ha629193:31508444
cdk-lw-on:31524445
f9bf7985:31543584
jh5f2457_c:31540921
g4a0e106:31529594
jbcp_cls_pctr_t:31531130
61138546:31518536
cp_intellij_t_nes:31548657
d7b18187:31526828
nes-curr-leftover-1500:31538366
ahp-both-windows:31556933
h561g132:31533256
sessions_5:31532894
ihg5j128:31534457
f412h606:31551416
9gg7f176:31542112
max-result-200:31551155
sandbox-ui-on-2:31543161
enable_editor_pane_layout:31554332
allow-none:31555437
6i51c363:31551401
c7c27ce7:31554789
nes-gb3-nf-5k:31554345
8hc4g144:31558143
1532g621_copy:31554320
treatment-23-1:31555779
unuse_dynamic_mcp:31555281
switchtoauto:31559321
vrbsty_tr:31561058
session-mark-done:31558131
```
</details>
<!-- generated by issue reporter -->
0 条评论