add version endpoint

This commit is contained in:
Xi Yan 2025-01-08 14:15:07 -08:00
parent 11332c39b1
commit b28e4002c9
2 changed files with 19 additions and 1 deletions

View file

@ -29,6 +29,11 @@ class HealthInfo(BaseModel):
# TODO: add a provider level status
@json_schema_type
class VersionInfo(BaseModel):
version: str
@runtime_checkable
class Inspect(Protocol):
@webmethod(route="/providers/list", method="GET")
@ -39,3 +44,6 @@ class Inspect(Protocol):
@webmethod(route="/health", method="GET")
async def health(self) -> HealthInfo: ...
@webmethod(route="/version", method="GET")
async def version(self) -> VersionInfo: ...