sourcebot icon indicating copy to clipboard operation
sourcebot copied to clipboard

[FR] Detailed error reporting and retry/fallback mechanism for AskAI and MCP server

Open viniaraujo68 opened this issue 7 months ago • 6 comments

Currently, when a request to the inference endpoint fails within the AskAI feature, the system returns a generic error stating that the operation failed. This lack of context makes debugging and troubleshooting difficult.

I would like to propose the following enhancements:

1- Detailed Error Reporting: Instead of masking the error, the system should surface the specific error details and status codes returned by the inference endpoint.

2- Retry and Fallback Mechanism: Introduce a configurable retry and/or fallback strategy for failed inference requests to improve resilience.

3- Scope Extension: Apply this same retry/fallback mechanism to the MCP server, as it currently suffers from the same generic failure behavior.

Implementing these changes will significantly improve the observability of the system and provide a more robust experience for both the AskAI feature and the MCP server.

viniaraujo68 avatar Apr 29 '26 14:04 viniaraujo68

Hey, was recently reviewing your comments and I had doubt that should the retry/fallback be configured per model separately or should be global across all models.

Shiv-61 avatar Sep 12 '26 04:09 Shiv-61

I think per model would be better, more specific

viniaraujo68 avatar Sep 14 '26 13:09 viniaraujo68

I have kept separate per-model falback list , retries as 3 attempts and at last I am blocking/MCP only when the Streaming chat route also attempt model fallback.

Does that work? Let me know if any changes.

Shiv-61 avatar Sep 17 '26 02:09 Shiv-61

Yeah it does work, thanks!

viniaraujo68 avatar Sep 17 '26 11:09 viniaraujo68

I have raised the PR : https://github.com/sourcebot-dev/sourcebot/pull/1664 Please review it and let me know if changes.

Shiv-61 avatar Sep 17 '26 15:09 Shiv-61