Copilot chat participant with tool calls: how to debug error 400 responses? #2691
Unanswered
shouples
asked this question in
Extension Development QnA
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
While working on integrating tool calls to our extension's chat participant, I was trying to figure out how to get

LanguageModelToolResult
s back into the conversation flow*, and I kept seeing this:And looking at our extension's logging, all I would see is:
I didn't see any extra information in the dev tools, and it seemed to come from the

for await (const fragment of response.stream)
after calling the.sendRequest()
method with a specific arrangement of messages. Looking at theGitHub Copilot Chat
output channel also didn't help much either:Is there a recommended way for extension developers to get details out of error 400 responses?
Note
*I ended up handling this by passing the
LanguageModelToolResult
'sLanguageModelTextPart
items through to aLanguageModelToolResultPart
, which was then wrapped in aUser
message. I then managed to get past the error 400 responses by adding anAssistant
message wrapping theLanguageModelToolCallPart
, so it ended up looking like:Beta Was this translation helpful? Give feedback.
All reactions