You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In version 25.02, we introduced the ai.backend.common.api_handlers module to standardize HTTP API handler functions. However, the module has several issues that need to be addressed:
The name of a generic type variable T does not follow Python naming conventions
The _parse_and_execute_handler() function only accepts ai.backend.common.APIResponse objects
The module does not support aiohttp.web.StreamResponse as a return type for API handlers, despite aiohttp.web.Response being a subclass of StreamResponse
The type checking implementation for API handler responses is incorrect
API handler signatures are validated at runtime when handling requests, rather than during static analysis or server initialization
Even when the request is valid, an 'Invalid parameter' error may be raised if the API handler is incorrectly defined.
The text was updated successfully, but these errors were encountered:
Motivation
In version 25.02, we introduced the
ai.backend.common.api_handlers
module to standardize HTTP API handler functions. However, the module has several issues that need to be addressed:T
does not follow Python naming conventions_parse_and_execute_handler()
function only acceptsai.backend.common.APIResponse
objectsaiohttp.web.StreamResponse
as a return type for API handlers, despiteaiohttp.web.Response
being a subclass ofStreamResponse
The text was updated successfully, but these errors were encountered: