Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1718,11 +1718,18 @@
"properties": {
"provider_id": {
"type": "string",
"title": "Provider Id"
"title": "Provider Id",
"description": "The ID of the provider"
},
"status": {
"type": "string",
"title": "Status"
"title": "Status",
"description": "The health status",
"examples": [
"ok",
"unhealthy",
"not_implemented"
]
},
"message": {
"anyOf": [
Expand All @@ -1733,7 +1740,12 @@
"type": "null"
}
],
"title": "Message"
"title": "Message",
"description": "Optional message about the health status",
"examples": [
"All systems operational",
"Llama Stack is unavailable"
]
}
},
"type": "object",
Expand Down Expand Up @@ -1980,7 +1992,7 @@
"providers"
],
"title": "ReadinessResponse",
"description": "Model representing response to a readiness request.\n\nAttributes:\n ready: If service is ready.\n reason: The reason for the readiness.\n providers: List of unhealthy providers in case of readiness failure.\n\nExample:\n ```python\n readiness_response = ReadinessResponse(\n ready=False,\n reason=\"Service is not ready\",\n providers=[\n ProviderHealthStatus(\n provider_id=\"ollama\",\n status=\"Error\",\n message=\"Server is unavailable\"\n )\n ]\n )\n ```",
"description": "Model representing response to a readiness request.\n\nAttributes:\n ready: If service is ready.\n reason: The reason for the readiness.\n providers: List of unhealthy providers in case of readiness failure.\n\nExample:\n ```python\n readiness_response = ReadinessResponse(\n ready=False,\n reason=\"Service is not ready\",\n providers=[\n ProviderHealthStatus(\n provider_id=\"ollama\",\n status=\"unhealthy\",\n message=\"Server is unavailable\"\n )\n ]\n )\n ```",
"examples": [
{
"providers": [],
Expand Down
8 changes: 4 additions & 4 deletions docs/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -907,9 +907,9 @@ Attributes:

| Field | Type | Description |
|-------|------|-------------|
| provider_id | string | |
| status | string | |
| message | | |
| provider_id | string | The ID of the provider |
| status | string | The health status |
| message | | Optional message about the health status |


## QueryRequest
Expand Down Expand Up @@ -978,7 +978,7 @@ Example:
providers=[
ProviderHealthStatus(
provider_id="ollama",
status="Error",
status="unhealthy",
message="Server is unavailable"
)
]
Expand Down
8 changes: 4 additions & 4 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -897,9 +897,9 @@ Attributes:

| Field | Type | Description |
|-------|------|-------------|
| provider_id | string | |
| status | string | |
| message | | |
| provider_id | string | The ID of the provider |
| status | string | The health status |
| message | | Optional message about the health status |


## QueryRequest
Expand Down Expand Up @@ -968,7 +968,7 @@ Example:
providers=[
ProviderHealthStatus(
provider_id="ollama",
status="Error",
status="unhealthy",
message="Server is unavailable"
)
]
Expand Down
17 changes: 13 additions & 4 deletions src/models/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,18 @@ class ProviderHealthStatus(BaseModel):
message: Optional message about the health status.
"""

provider_id: str
status: str
message: Optional[str] = None
provider_id: str = Field(
description="The ID of the provider",
)
status: str = Field(
description="The health status",
examples=["ok", "unhealthy", "not_implemented"],
)
message: Optional[str] = Field(
None,
description="Optional message about the health status",
examples=["All systems operational", "Llama Stack is unavailable"],
)


class ReadinessResponse(BaseModel):
Expand All @@ -148,7 +157,7 @@ class ReadinessResponse(BaseModel):
providers=[
ProviderHealthStatus(
provider_id="ollama",
status="Error",
status="unhealthy",
message="Server is unavailable"
)
]
Expand Down