-
Notifications
You must be signed in to change notification settings - Fork 0
Fix chat responses failing due to null deserialization and tool call errors #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: ExtCan <60326708+ExtCan@users.noreply.github.com>
Co-authored-by: ExtCan <60326708+ExtCan@users.noreply.github.com>
|
@copilot Still no response recieved |
…ption Co-authored-by: ExtCan <60326708+ExtCan@users.noreply.github.com>
Found the issue - the code was throwing a NullReferenceException when deserializing the API response. Added null check before accessing response properties in commit 288d4d5. The original fix only addressed tool call fallbacks, but the actual bug was earlier: if JSON deserialization failed or returned null, the code would crash when trying to access Also added debug logging to help diagnose if there are still issues. Please try again and check the log file ( |
|
@copilot Your logging system sucks. Also, it still doesn't work. [02:24:11] === MSAgent AI Log Started === |
|
@copilot Revert to comit before the websearching merge |
I need clarification - the web search functionality (EnableWebSearch, EnableUrlReading, tool calls) was already in the codebase before my changes. Do you want me to:
Please clarify which commit hash you want me to revert to, or if you want me to disable the web search/tool call features while keeping my other fixes. |
Chat feature returns null when Ollama API responses fail to deserialize or when AI tool calls (web search, URL reading) fail or return empty responses, leaving users with "No response received".
Changes
NullReferenceExceptionthat was causing chat failuresChatAsync(): Replacedelse ifwithifon line 448 to enable fallback to original response content when tool execution failsTechnical Detail
Critical Fix: Null Deserialization Check
Tool Call Fallback Fix
The chat feature now properly handles both deserialization failures and tool call errors, ensuring users receive responses whenever valid content is available from the Ollama API.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.