| 60 | class BaseAPIHandler: |
| 61 | """Base class for asynchronous API handlers.""" |
| 62 | def __init__(self, name): |
| 63 | self.name = name |
| 64 | self.models = [] # List of supported models { "name": "model-id", "parameters": "optional", ... } |
| 65 | API_HANDLERS[name] = self |
| 66 | logger.info("Registered API handler: '%s'", name) |
| 67 | # Optional: Create a shared httpx client if needed across handlers (managing lifecycle is key) |
| 68 | # self.http_client = httpx.AsyncClient(timeout=90.0) # Example |
| 69 | |
| 70 | def get_models(self): |
| 71 | """Return the list of models supported by this handler.""" |