Skip to content
Open
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
29 changes: 3 additions & 26 deletions docs/devel_doc/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
"info"
],
"summary": "Info Endpoint Handler",
"description": "Handle request to the /info endpoint.\n\nProcess GET requests to the /info endpoint, returning the\nservice name, version and OGX version.\n\n### Parameters:\n- request: The incoming HTTP request (used by middleware).\n- auth: Authentication tuple from the auth dependency (used by middleware).\n\n### Raises:\n- HTTPException: with status 401 for unauthorized access.\n- HTTPException: with status 403 if permission is denied.\n- HTTPException: with status 503 and a detail object containing `response`\n and `cause` when unable to connect to OGX.\n\n### Returns:\n- InfoResponse: An object containing the service's name and version.",
"description": "Handle request to the /info endpoint.\n\nProcess GET requests to the /info endpoint, returning the\nservice name and version. The answer does not depend on OGX.\n\n### Parameters:\n- request: The incoming HTTP request (used by middleware).\n- auth: Authentication tuple from the auth dependency (used by middleware).\n\n### Raises:\n- HTTPException: with status 401 for unauthorized access.\n- HTTPException: with status 403 if permission is denied.\n- HTTPException: with status 503 and a detail object containing `response`\n and `cause` when the Kubernetes authentication backend is unreachable.\n\n### Returns:\n- InfoResponse: An object containing the service's name and version.",
"operationId": "info_endpoint_handler_v1_info_get",
"responses": {
"200": {
Expand All @@ -184,7 +184,6 @@
},
"example": {
"name": "Lightspeed Stack",
"ogx_version": "1.0.0",
"service_version": "1.0.0"
}
}
Expand Down Expand Up @@ -294,14 +293,6 @@
"$ref": "#/components/schemas/ServiceUnavailableResponse"
},
"examples": {
"OGX": {
"value": {
"detail": {
"cause": "Connection error while trying to reach backend service.",
"response": "Unable to connect to OGX"
}
}
},
"kubernetes api": {
"value": {
"detail": {
Expand Down Expand Up @@ -15369,32 +15360,18 @@
"0.2.0",
"1.0.0"
]
},
"ogx_version": {
"type": "string",
"title": "Ogx Version",
"description": "OGX version",
"examples": [
"0.2.1",
"0.2.2",
"0.2.18",
"0.2.21",
"0.2.22"
]
}
},
"type": "object",
"required": [
"name",
"service_version",
"ogx_version"
"service_version"
],
"title": "InfoResponse",
"description": "Model representing a response to an info request.\n\nAttributes:\n name: Service name.\n service_version: Service version.\n ogx_version: OGX version.",
"description": "Model representing a response to an info request.\n\nAttributes:\n name: Service name.\n service_version: Service version.",
"examples": [
{
"name": "Lightspeed Stack",
"ogx_version": "1.0.0",
"service_version": "1.0.0"
}
]
Expand Down
20 changes: 3 additions & 17 deletions docs/devel_doc/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ Lightspeed Core Stack (LCS) service API specification.
| Method | Path | Description |
|--------|-------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
| GET | `/` | Returns the static HTML index page |
| GET | `/v1/info` | Returns the service name, version and OGX version |
| GET | `/v1/info` | Returns the service name and version |
| GET | `/v1/models` | List of available models |
| GET | `/v1/tools` | Consolidated list of available tools from all configured MCP servers |
| GET | `/v1/mcp-auth/client-options` | List of MCP servers configured to accept client-provided authorization tokens, along with the header names where clients should provide these tokens |
Expand Down Expand Up @@ -625,7 +625,7 @@ Examples
Handle request to the /info endpoint.

Process GET requests to the /info endpoint, returning the
service name, version and OGX version.
service name and version. The answer does not depend on OGX.

### Parameters:
- request: The incoming HTTP request (used by middleware).
Expand All @@ -635,7 +635,7 @@ service name, version and OGX version.
- HTTPException: with status 401 for unauthorized access.
- HTTPException: with status 403 if permission is denied.
- HTTPException: with status 503 and a detail object containing `response`
and `cause` when unable to connect to OGX.
and `cause` when the Kubernetes authentication backend is unreachable.

### Returns:
- InfoResponse: An object containing the service's name and version.
Expand Down Expand Up @@ -761,18 +761,6 @@ Examples
}
```

```json
{
"detail": {
"cause": "Connection error while trying to reach backend service.",
"response": "Unable to connect to OGX"
}
}
```




```json
{
"detail": {
Expand Down Expand Up @@ -6600,14 +6588,12 @@ Model representing a response to an info request.
Attributes:
name: Service name.
service_version: Service version.
ogx_version: OGX version.


| Field | Type | Description |
|-------|------|-------------|
| name | string | Service name |
| service_version | string | Service version |
| ogx_version | string | OGX version |


## InputToolMCP
Expand Down
2 changes: 1 addition & 1 deletion docs/migrations/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ release that includes breaking or notable configuration changes.
| Version | Description |
|---------|-------------|
| [v0.7.0](v0.7.0.md) | RAG configuration restructured; `ogx` naming; `/v1/vector-stores` and `/v1/conversations` deprecated |
| [v0.8.0](v0.8.0.md) | `inference.context_windows` deprecated in favour of per-model `metadata.context_window` |
| [v0.8.0](v0.8.0.md) | `inference.context_windows` deprecated in favour of per-model `metadata.context_window`; `ogx_version` removed from `/v1/info` |
16 changes: 16 additions & 0 deletions docs/migrations/v0.8.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Table of Contents

* [Context windows for conversation compaction](#context-windows-for-conversation-compaction)
* [`/v1/info` API](#v1info-api)

---

Expand Down Expand Up @@ -72,3 +73,18 @@ at `threshold_ratio` of the window found for it instead of never. Set
128,000 tokens. See the
[conversation compaction guide](../user_doc/conversation_compaction.md#context-window)
for the full resolution order.

---

## `/v1/info` API

`GET /v1/info` now describes the Lightspeed Core Stack service only and no
longer contacts OGX. The `ogx_version` field is removed with no replacement:

| v0.7.x | v0.8.0 |
|---|---|
| `name`, `service_version`, `ogx_version` | `name`, `service_version` |
| 503 `Unable to connect to OGX` while OGX is unreachable | 200 with the service name and version |

Update clients that read `ogx_version`, and do not use `/v1/info` to detect
whether OGX is available: `GET /readiness` reports that.
1 change: 0 additions & 1 deletion docs/models/responses.puml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ class "ForbiddenResponse" as src.models.api.responses.error.forbidden.ForbiddenR
class "InfoResponse" as src.models.api.responses.successful.probes.InfoResponse {
model_config : dict
name : str
ogx_version : str
service_version : str
}
class "InternalServerErrorResponse" as src.models.api.responses.error.internal.InternalServerErrorResponse {
Expand Down
7 changes: 3 additions & 4 deletions docs/models/responses.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 2 additions & 16 deletions docs/models/successful_responses.json
Original file line number Diff line number Diff line change
Expand Up @@ -2236,11 +2236,10 @@
"type": "object"
},
"InfoResponse": {
"description": "Model representing a response to an info request.\n\nAttributes:\n name: Service name.\n service_version: Service version.\n ogx_version: OGX version.",
"description": "Model representing a response to an info request.\n\nAttributes:\n name: Service name.\n service_version: Service version.",
"examples": [
{
"name": "Lightspeed Stack",
"ogx_version": "1.0.0",
"service_version": "1.0.0"
}
],
Expand All @@ -2262,24 +2261,11 @@
],
"title": "Service Version",
"type": "string"
},
"ogx_version": {
"description": "OGX version",
"examples": [
"0.2.1",
"0.2.2",
"0.2.18",
"0.2.21",
"0.2.22"
],
"title": "Ogx Version",
"type": "string"
}
},
"required": [
"name",
"service_version",
"ogx_version"
"service_version"
],
"title": "InfoResponse",
"type": "object"
Expand Down
2 changes: 0 additions & 2 deletions docs/models/successful_responses.md
Original file line number Diff line number Diff line change
Expand Up @@ -873,14 +873,12 @@ Model representing a response to an info request.
Attributes:
name: Service name.
service_version: Service version.
ogx_version: OGX version.


| Field | Type | Description |
|-------|------|-------------|
| name | string | Service name |
| service_version | string | Service version |
| ogx_version | string | OGX version |


## JsonPathOperator
Expand Down
2 changes: 1 addition & 1 deletion docs/testing/e2e_scenarios.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@

* Check if the OpenAPI endpoint works as expected
* Check if info endpoint is working
* Check if info endpoint reports error when OGX connection is not working
* Check if info endpoint works when OGX connection is not working
* Check if shields endpoint is working (lists LCORE-configured shields)
* Check if tools endpoint is working
* Check if tools endpoint reports error when OGX is unreachable
Expand Down
2 changes: 1 addition & 1 deletion docs/testing/integration_vs_e2e.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ These tests check something true. They sit in the wrong layer, or they assert so
| `test_health_liveness` in `tests/integration/endpoints/test_health_integration.py` | Same shape: unused config fixture, assertion is `response.alive is True`. Liveness does not consult OGX. The other tests in that file, which map stubbed provider health into the readiness payload, are real integration tests. |
| `tests/integration/test_version.py` | Compares `version.__version__` with `pdm show --version`. No config, database, or handler. The repo runs tests with `uv`, not `pdm`. |
| `tests/integration/container_lifecycle/test_container_lifecycle.py` | Builds an image, polls `http://localhost:8321/v1/health`, and `exec`s into the container. That is a deployed stack, collected by `make test-integration`, and one function does build, start, probe, mounts, and cleanup. The behave suite never runs it. |
| `tests/unit/app/endpoints/test_info.py` and `tests/integration/endpoints/test_info_integration.py` | Both call `info_endpoint_handler` with a mocked OGX version. The integration test earns its place: it reads `name` (`"foo bar baz"`) from `tests/configuration/lightspeed-stack.yaml` and uses the real noop auth fixture. The unit happy path only asserts `response.name is not None`. |
| `tests/unit/app/endpoints/test_info.py` and `tests/integration/endpoints/test_info_integration.py` | Both call `info_endpoint_handler` and check it works without OGX. The integration test earns its place: it reads `name` (`"foo bar baz"`) from `tests/configuration/lightspeed-stack.yaml` and uses the real noop auth fixture. The unit happy path asserts the exact response body. |
| `@flaky` scenarios in `tests/e2e/features/query.feature` (also `streaming_query.feature`, `mcp.feature`, parts of `responses.feature`) | The reply must contain `"ask"`, `"checkout"`, or `"image"`. The contract is status 200 and token counters. The extra word depends on the model. |

`tests/e2e/features/conversation-compaction.feature` also matches response fragments, and that use holds. The scenario plants names (`north-quarry`, `blue-lagoon`) and later asks for them. The fragment is a value the test wrote. Stable end-to-end assertions are status, schema, `context_status`, metrics, and planted facts.
Expand Down
Loading
Loading