Skip to content

Conversation

@tisnik
Copy link
Contributor

@tisnik tisnik commented Dec 9, 2025

Description

Updated OpenAPI spec

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement

Tools used to create PR

Identify any AI code assistants used in this PR (for transparency and review context)

  • Assisted-by: N/A
  • Generated by: N/A

Related Tickets & Documents

  • Related Issue #
  • Closes #

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

Summary by CodeRabbit

  • Documentation
    • Updated API endpoint documentation with versioned naming conventions
    • Expanded error handling documentation with detailed HTTP status codes and descriptions
    • Added readiness and liveness probe documentation
    • Improved API documentation structure and organization

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 9, 2025

Walkthrough

Updates to OpenAPI specification documentation files introducing versioned endpoint naming conventions (V1/V2), replacing Agent API references with Responses API, expanding HTTP status mappings with granular error codes (401, 403, 404, 422, 429, 500, 503), and introducing new public schema entities for tooling and conversation endpoints.

Changes

Cohort / File(s) Summary
OpenAPI Documentation Updates
docs/openapi.md, docs/output.md
Renamed endpoint headings to include versioning (e.g., "Query Endpoint Handler V1"); replaced Agent API references with Responses API; expanded error/response descriptions with detailed HTTP status mappings; introduced new schema entities (ToolCallSummary, ToolResultSummary, ReadinessResponse, ConversationsListResponse, ConversationUpdateRequest/Response, ConversationDeleteResponse, APIKeyTokenConfiguration); updated response component names and parameter labeling; added readiness/liveness probe sections with example payloads; adjusted model field definitions and cross-references across streaming, query, conversations, and health check endpoints.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Key areas requiring attention:
    • Verify consistency of V1/V2 versioning across all endpoint headings
    • Confirm all Agent API → Responses API reference replacements are complete and accurate
    • Validate HTTP status mappings (401, 403, 404, 422, 429, 500, 503) align with actual endpoint behavior for query, streaming, conversations, and health endpoints
    • Cross-check new schema entity names and field definitions are correctly applied throughout both files
    • Ensure readiness/liveness probe examples and response structures are accurate

Possibly related PRs

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Updated OpenAPI spec' is vague and generic, failing to convey what specific changes were made to the OpenAPI specification. Use a more descriptive title that highlights the primary changes, such as 'Refactor OpenAPI docs with V1/V2 versioning and Responses API integration' or 'Add HTTP status codes and error handling details to OpenAPI spec'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
docs/openapi.md (1)

4098-4102: Simplify wording: "inaccessible" instead of "not accessible".

Line 4101 in the ModelContextProtocolServer description uses wordier phrasing "are not accessible to lightspeed-core agents" where a more concise alternative exists.

Consider this minor stylistic improvement for clarity:

-configured in the llama-stack run.yaml are not accessible to lightspeed-core agents.
+configured in the llama-stack run.yaml are inaccessible to lightspeed-core agents.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2dcd9e9 and 4efe19a.

📒 Files selected for processing (2)
  • docs/openapi.md (18 hunks)
  • docs/output.md (16 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-02T11:09:23.107Z
Learnt from: radofuchs
Repo: lightspeed-core/lightspeed-stack PR: 485
File: tests/e2e/features/authorized_noop.feature:11-11
Timestamp: 2025-09-02T11:09:23.107Z
Learning: The authorized endpoint in the lightspeed-stack project does not use the /v1 API prefix and should be accessed directly as "authorized" rather than "/v1/authorized".

Applied to files:

  • docs/openapi.md
  • docs/output.md
🪛 LanguageTool
docs/openapi.md

[grammar] ~1028-~1028: Use a hyphen to join words.
Context: ...ler_base that provides the Responses API specific retrieve_response and get_topic...

(QB_NEW_EN_HYPHEN)


[style] ~4101-~4101: Consider using “inaccessible” to avoid wordiness.
Context: ...figured in the llama-stack run.yaml are not accessible to lightspeed-core agents. Useful reso...

(NOT_ABLE_PREMIUM)

docs/output.md

[grammar] ~1028-~1028: Use a hyphen to join words.
Context: ...ler_base that provides the Responses API specific retrieve_response and get_topic...

(QB_NEW_EN_HYPHEN)


[style] ~4101-~4101: Consider using “inaccessible” to avoid wordiness.
Context: ...figured in the llama-stack run.yaml are not accessible to lightspeed-core agents. Useful reso...

(NOT_ABLE_PREMIUM)

🪛 markdownlint-cli2 (0.18.1)
docs/openapi.md

2467-2467: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


3187-3187: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)

docs/output.md

2467-2467: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


3187-3187: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: build-pr
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
  • GitHub Check: E2E: library mode / azure
  • GitHub Check: E2E: server mode / azure
  • GitHub Check: E2E: library mode / ci
  • GitHub Check: E2E: server mode / ci
🔇 Additional comments (5)
docs/openapi.md (4)

3408-3417: Verify new schema entities are defined in the codebase and properly documented.

The PR introduces new public schema models in the documentation (APIKeyTokenConfiguration at lines 3408–3417, ToolCallSummary and ToolResultSummary at lines 4527–4554). Ensure:

  1. These models are defined in the actual codebase
  2. The documentation accurately reflects the code definitions
  3. These entities are cross-referenced in all relevant endpoint descriptions and response models

1025-1025: Ensure "Responses API" terminology is used consistently throughout.

The PR transitions from "Agent API" to "Responses API" references in several endpoint descriptions. Lines 1025, 1325, 2079, and 2254 show examples of this terminology shift. Verify all Agent API references have been replaced.

Scan for any remaining "Agent API" references:

#!/bin/bash
# Description: Verify complete terminology migration from Agent API to Responses API

# Search for any lingering Agent API references
agent_refs=$(rg -c "Agent API" docs/openapi.md)
echo "Remaining 'Agent API' references: $agent_refs"

# Count Responses API references as comparison
responses_refs=$(rg -c "Responses API" docs/openapi.md)
echo "Total 'Responses API' references: $responses_refs"

# Show context for any Agent API references found
if [ "$agent_refs" -gt 0 ]; then
  rg -n -C 2 "Agent API" docs/openapi.md
fi

Also applies to: 1325-1325, 2079-2079, 2254-2254


1023-1032: Verify endpoint versioning is consistent across all V1 and V2 endpoints.

The PR introduces "V1" versioning labels in endpoint headings (e.g., "Query Endpoint Handler V1" at line 1023, "Streaming Query Endpoint Handler V1" at line 1323, "Conversations List Endpoint Handler V1" at line 1970). Ensure this naming convention is applied consistently across all versioned endpoints and matches the actual URL paths.


3233-3243: Endpoint path is correctly documented.

The /authorized endpoint documentation is accurate—it should be accessed without the /v1 prefix, consistent with the actual implementation in the codebase (as evidenced by the authorized_noop.feature test file).

docs/output.md (1)

1-100: Clarify purpose of duplicate documentation files.

Both docs/openapi.md and docs/output.md appear to contain nearly identical OpenAPI specification documentation. If these are true duplicates, consolidate them to a single source of truth to reduce maintenance burden and consistency risks.

Comment on lines +1023 to +1028
> **Query Endpoint Handler V1**
Handle request to the /query endpoint using Agent API.
Handle request to the /query endpoint using Responses API.

This is a wrapper around query_endpoint_handler_base that provides
the Agent API specific retrieve_response and get_topic_summary functions.
the Responses API specific retrieve_response and get_topic_summary functions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix grammar issue: hyphenate compound adjectives.

Line 1028 contains a grammar issue flagged by LanguageTool. The phrase "Responses API specific retrieve_response and get_topic_summary functions" should use hyphens to join compound adjectives/nouns for clarity.

Apply this fix:

-the Responses API specific retrieve_response and get_topic_summary functions.
+the Responses API–specific retrieve_response and get_topic_summary functions.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
> **Query Endpoint Handler V1**
Handle request to the /query endpoint using Agent API.
Handle request to the /query endpoint using Responses API.
This is a wrapper around query_endpoint_handler_base that provides
the Agent API specific retrieve_response and get_topic_summary functions.
the Responses API specific retrieve_response and get_topic_summary functions.
> **Query Endpoint Handler V1**
Handle request to the /query endpoint using Responses API.
This is a wrapper around query_endpoint_handler_base that provides
the Responses API–specific retrieve_response and get_topic_summary functions.
🧰 Tools
🪛 LanguageTool

[grammar] ~1028-~1028: Use a hyphen to join words.
Context: ...ler_base that provides the Responses API specific retrieve_response and get_topic...

(QB_NEW_EN_HYPHEN)

🤖 Prompt for AI Agents
In docs/openapi.md around lines 1023 to 1028, the phrase "Responses API specific
retrieve_response and get_topic_summary functions" should be hyphenated to form
compound adjectives; change it to "Responses-API-specific retrieve_response and
get_topic_summary functions" (or "Responses API–specific ..." if using an
en-dash per style) so the compound modifier is clear and grammatically correct.

| Status Code | Description | Component |
|-------------|-------------|-----------|
| 200 | Successful response | [ConversationUpdateResponse](#conversationupdateresponse) |
| 400 | Invalid request format | [BadRequestResponse](#badrequestresponse)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix markdown table pipe formatting.

Static analysis identified two markdown table formatting violations where trailing pipes are missing. Lines 2467 and 3187 each have a table header or row missing the trailing pipe character, violating the leading_and_trailing pipe style requirement.

Ensure all markdown tables follow the leading_and_trailing pipe style:

Line 2467:
-| Name | Type | Required | Description |
+| Name | Type | Required | Description |
 |------|------|----------|-------------|

Line 3187:
-| Status Code | Description | Component |
+| Status Code | Description | Component |
 |-------------|-------------|-----------|

Note: Verify these lines explicitly as the pipe formatting may not render correctly in this diff view.

Also applies to: 3187-3187

🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

2467-2467: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)

🤖 Prompt for AI Agents
In docs/openapi.md around lines 2467 and 3187, two markdown table rows/headers
are missing the trailing pipe; update each affected line to include the closing
pipe character so the table follows the leading_and_trailing pipe style (i.e.,
ensure every table row and header ends with a "|" character), then re-run a
markdown linter to confirm no further table pipe violations remain.

@tisnik tisnik merged commit a1acee8 into lightspeed-core:main Dec 9, 2025
19 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant