vscode-copilot-release icon indicating copy to clipboard operation
vscode-copilot-release copied to clipboard

Failed to compute args for tool: "cpptools-lmtool-configuration"

Open sean-mcmanus opened this issue 1 year ago • 7 comments

Type: Bug

I type "#cpp" and it gives "Failed to compute args for tool: "cpptools-lmtool-configuration". It only repros with certain workspace folders (I don't know what triggers it).

Extension version: 0.21.2024092402 VS Code version: Code - Insiders 1.94.0-insider (f35c3823e3b7ea4c52f7fee4659bcce39b42ce9e, 2024-09-24T05:04:12.797Z) OS version: Windows_NT x64 10.0.22631 Modes: Remote OS version: Linux x64 5.15.153.1-microsoft-standard-WSL2 Remote OS version: Linux x64 5.15.153.1-microsoft-standard-WSL2

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (12 x 3192)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 63.85GB (34.33GB free)
Process Argv --crash-reporter-id baf1f71c-33c3-4cfd-b192-986653a51161
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu-22.04
OS Linux x64 5.15.153.1-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (12 x 0)
Memory (System) 31.27GB (26.96GB free)
VM 0%
Item Value
Remote WSL: Ubuntu-22.04
OS Linux x64 5.15.153.1-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (12 x 0)
Memory (System) 31.27GB (26.96GB free)
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
vsaa593cf:30376535
py29gd2263:31024238
c4g48928:30535728
vscrp:30624060
962ge761:30841072
pythongtdpath:30726887
welcomedialog:30812478
pythonnoceb:30776497
asynctok:30898717
dsvsc014:30777825
dsvsc015:30821418
pythonmypyd1:30859725
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30870582
dsvsc016:30879898
dsvsc017:30880771
dsvsc018:30880772
cppperfnew:30980852
pythonait:30973460
g316j359:31013175
a69g1124:31018687
dvdeprecation:31040973
dwnewjupytercf:31046870
newcmakeconfigv2:31071590
nb_pri_only:31057983
nativerepl1:31134653
refactort:31084545
pythonrstrctxt:31093868
flighttreat:31119334
wkspc-onlycs-t:31132770
nativeloc1:31118317
wkspc-ranged-t:31125599
cf971741:31144450
e80f6927:31120813
fje88620:31121564
12bdf347:31141542
iacca2:31144504
notype1:31143044
b50ed353:31138333
showchatpanel:31139797
f8igb616:31140137

sean-mcmanus avatar Sep 24 '24 22:09 sean-mcmanus

My repro is with the 1.22.4 pre-release of the C/C++ extension -- but our extension never gets any of the callback -- it fails beforehand.

I'm not sure yet how to get more repro or diagnostic info.

sean-mcmanus avatar Sep 24 '24 22:09 sean-mcmanus

The GitHub Copilot Chat logging window says "[error] Request Failed: 400 {"error":{"message":"prompt token limit exceeded","param":"","code":"","type":""}}" before the previously mentioned failure, so it seems like that's the root cause.

sean-mcmanus avatar Sep 24 '24 22:09 sean-mcmanus

@benmcmorran The bug still repros with the latest C/C++ and GitHub Copilot extension:

image

sean-mcmanus avatar Sep 27 '24 00:09 sean-mcmanus

The GitHub Copilot Chat logging window says "[error] Request Failed: 400 {"error":{"message":"prompt token limit exceeded","param":"","code":"","type":""}}" before the previously mentioned failure, so it seems like that's the root cause.

Is this in an existing chat conversation with a lot of history? It's possible we're not counting tokens correctly for the tool call

roblourens avatar Sep 27 '24 19:09 roblourens

@roblourens Yes, it's an existing chat conversation with a lot of history.

sean-mcmanus avatar Sep 27 '24 20:09 sean-mcmanus

I got the same prompt token limit exceeded error while using nvim after a lengthy chat session. The error went away after the chat history was cleared and a new chat session started.

thomastthai avatar Oct 03 '24 16:10 thomastthai

I just hit this error in our TypeScript repo, so it's unrelated to the #cpp mentioned in the original issue (although that might be a different repro). UPDATE: I just realized that I did have #cpp in the text since it was part of the changelog I was asking it to review.

2024-10-03 13:04:05.722 [error] Request Failed: 400 {"error":{"message":"prompt token count of 19378 exceeds the limit of 12288","param":"","code":"","type":""}}

2024-10-03 13:04:05.724 [error] Error: Failed to compute args for tool: "cpptools-lmtool-configuration"

image

It worked when I asked it to try again.

sean-mcmanus avatar Oct 03 '24 20:10 sean-mcmanus

Have you seen this again? I think it should be gone now

roblourens avatar Oct 24 '24 21:10 roblourens

We saw this once in #websearch and haven't seen it since. I'll mark this as verified.

TylerLeonhardt avatar Oct 28 '24 18:10 TylerLeonhardt