Skip to content

RHIDP-15891: add /v1/skills endpoint - #2294

Open
yangcao77 wants to merge 8 commits into
lightspeed-core:mainfrom
yangcao77:list-skills-endpoint
Open

RHIDP-15891: add /v1/skills endpoint#2294
yangcao77 wants to merge 8 commits into
lightspeed-core:mainfrom
yangcao77:list-skills-endpoint

Conversation

@yangcao77

@yangcao77 yangcao77 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description

This PR creates a new endpoint /v1/skills to exposes the metadata (name, description) of all loaded skills as a JSON response.
so consumers like RHDH Intelligent assistant is able to call the REST API to show available skills for user's intention to call.

unit tests also included in this PR

Screenshot 2026-07-30 at 10 59 27 AM

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
  • Benchmarks improvement

Tools used to create PR

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

  • Assisted-by: Claude
  • Generated by: (e.g., tool name and version; N/A if not used)

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

  • New Features

    • Added an authenticated GET /v1/skills endpoint to list configured skills and their names and descriptions.
    • Returns an empty list when no skills are configured.
    • Added OpenAPI schemas, authorization support, and documented error responses.
  • Documentation

    • Added user and developer documentation, API examples, and response model references.
  • Tests

    • Added unit, integration, and end-to-end coverage for configured, empty, and multiple skill collections.

Signed-off-by: Stephanie <yangcao@redhat.com>
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Adds an authenticated GET /v1/skills endpoint that discovers configured SKILL.md metadata and returns skill names and descriptions through new response models.

Changes

Skills endpoint

Layer / File(s) Summary
Metadata and response contract
src/models/common/skills.py, src/models/api/responses/successful/catalog.py, src/utils/pydantic_ai_helpers.py, src/utils/models_dumper.py
Adds SkillMetadata, SkillsResponse, public exports, schema examples, model registration, and metadata extraction from configured skills.
Authorized API wiring
src/app/endpoints/skills.py, src/app/routers.py, src/app/main.py, src/models/config.py
Adds the authorized handler, GET_SKILLS action, /v1 router registration, response mappings, and the skills OpenAPI tag.
Validation and documentation
tests/unit/app/endpoints/test_skills.py, tests/unit/utils/test_pydantic_ai.py, tests/integration/endpoints/test_skills_integration.py, tests/e2e/features/skills.feature, tests/unit/app/test_routers.py, README.md, docs/...
Covers configured, empty, and directory-based skill discovery. Documents the endpoint, models, permissions, and OpenAPI schema.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant skills_endpoint_handler
  participant Configuration
  participant get_skills_metadata
  Client->>skills_endpoint_handler: GET /v1/skills
  skills_endpoint_handler->>Configuration: validate configuration
  skills_endpoint_handler->>get_skills_metadata: load configured skill metadata
  get_skills_metadata-->>skills_endpoint_handler: return names and descriptions
  skills_endpoint_handler-->>Client: SkillsResponse
Loading

Possibly related PRs

Suggested reviewers: tisnik


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Performance And Algorithmic Complexity ❌ Error Per-request discovery rescans configured trees and resources (helpers.py:119-125; endpoint.py:66-68), and /skills returns an unbounded list without pagination or a limit (endpoint.py:37-69). Cache metadata after configuration load and return it from the handler; add pagination or a configured maximum skill count and response size.
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the addition of the /v1/skills endpoint, which is the main change in the pull request.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Security And Secret Handling ✅ Passed The new endpoint uses get_auth_dependency and @authorize(Action.GET_SKILLS), returns only SkillMetadata name/description, adds no secret logging or credentials, and changes no Kubernetes Secret man...
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

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.

Signed-off-by: Stephanie <yangcao@redhat.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/app/endpoints/skills.py`:
- Around line 63-66: Update the skills endpoint handler around
get_skills_metadata so synchronous SkillsCapability discovery and toolset.skills
access never block the FastAPI event loop. Prefer reusing startup-cached
capability data with appropriate configuration invalidation; otherwise offload
get_skills_metadata to a worker thread before constructing SkillsResponse.

In `@src/models/api/responses/successful/catalog.py`:
- Around line 13-15: Replace the untyped skills contract with a shared
SkillMetadata model containing name and description as strings, and use it for
the skills field in src/models/api/responses/successful/catalog.py at lines
13-15. Update the relevant helper return path in
src/utils/pydantic_ai_helpers.py at lines 107-124 to return the same typed
contract, or at minimum list[dict[str, str]], eliminating Any at both sites.

In `@tests/unit/app/endpoints/test_skills.py`:
- Around line 18-43: The existing test_skills_loaded direct-handler coverage
does not validate route registration, serialization, or authorization wiring.
Add a client-level test for the mounted /v1/skills route that verifies an
authorized request succeeds and a denied request is rejected, while retaining
the direct filesystem-based tests for metadata behavior. Ensure the route
remains versioned under /v1 and uses the configured authorization dependency.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 03a85799-5ce2-4f42-bade-0ce9763d1f02

📥 Commits

Reviewing files that changed from the base of the PR and between 690d37b and 056bcf6.

📒 Files selected for processing (9)
  • src/app/endpoints/skills.py
  • src/app/main.py
  • src/app/routers.py
  • src/models/api/responses/successful/__init__.py
  • src/models/api/responses/successful/catalog.py
  • src/models/config.py
  • src/utils/pydantic_ai_helpers.py
  • tests/unit/app/endpoints/test_skills.py
  • tests/unit/utils/test_pydantic_ai.py
📜 Review details
⏰ Context from checks skipped due to timeout. (14)
  • GitHub Check: black
  • GitHub Check: bandit
  • GitHub Check: build-pr
  • GitHub Check: Pylinter
  • GitHub Check: integration_tests (3.12)
  • GitHub Check: integration_tests (3.13)
  • GitHub Check: E2E: server mode / ci / group 1
  • GitHub Check: E2E: server mode / ci / group 3
  • GitHub Check: E2E: library mode / ci / group 2
  • GitHub Check: E2E: library mode / ci / group 1
  • GitHub Check: E2E: server mode / ci / group 2
  • GitHub Check: E2E: library mode / ci / group 3
  • GitHub Check: E2E Tests for Lightspeed Evaluation job
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-0-7-on-pull-request
⚠️ CI failures not shown inline (2)

GitHub Actions: OpenAPI (Spectral) / 0_spectral.txt: RHIDP-15891: add /v1/skills endpoint

Conclusion: failure

View job details

##[group]Run set -euo pipefail
 �[36;1mset -euo pipefail�[0m
 �[36;1muv run python scripts/generate_openapi_schema.py /tmp/openapi-generated.json�[0m
 �[36;1mif ! diff -u docs/devel_doc/openapi.json /tmp/openapi-generated.json; then�[0m
 �[36;1m  echo "::error::docs/devel_doc/openapi.json is out of date. Regenerate with: uv run scripts/generate_openapi_schema.py docs/devel_doc/openapi.json"�[0m

GitHub Actions: OpenAPI (Spectral) / spectral: RHIDP-15891: add /v1/skills endpoint

Conclusion: failure

View job details

##[group]Run set -euo pipefail
 �[36;1mset -euo pipefail�[0m
 �[36;1muv run python scripts/generate_openapi_schema.py /tmp/openapi-generated.json�[0m
 �[36;1mif ! diff -u docs/devel_doc/openapi.json /tmp/openapi-generated.json; then�[0m
 �[36;1m  echo "::error::docs/devel_doc/openapi.json is out of date. Regenerate with: uv run scripts/generate_openapi_schema.py docs/devel_doc/openapi.json"�[0m
🧰 Additional context used
📓 Path-based instructions (6)
**/*

📄 CodeRabbit inference engine (Custom checks)

**/*: Flag meaningful O(n^2)+ algorithms on non-trivial inputs, including handlers and Kubernetes list operations.
Flag N+1 patterns that list items and then query once per item, including Kubernetes API and database access.
Flag expensive work inside loops, including API calls, JSON parsing, and regex compilation.
Flag unbounded growth in caches, watchers, or buffers when eviction or limits are missing.
Flag missing pagination or limits on list operations and API endpoints.
Flag secrets or tokens logged in plaintext or hardcoded in source.
Flag API endpoints missing authentication or authorization.
Flag injection vulnerabilities, including SQL injection, command injection, and path traversal.
Flag sensitive data leaked in API responses, WebSocket messages, or logs.
Flag Kubernetes Secrets and Red Hat secrets missing OwnerReferences.

Files:

  • src/app/endpoints/skills.py
  • tests/unit/utils/test_pydantic_ai.py
  • src/app/routers.py
  • src/app/main.py
  • src/utils/pydantic_ai_helpers.py
  • src/models/api/responses/successful/catalog.py
  • src/models/config.py
  • src/models/api/responses/successful/__init__.py
  • tests/unit/app/endpoints/test_skills.py
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Use absolute imports for internal Python modules.
All modules must begin with descriptive docstrings explaining their purpose.
Use logger = get_logger(__name__) from log.py for module logging.
Use complete type annotations for function parameters and return types.
Use modern union syntax such as str | int; use Optional[Type] for optional values.
Use typing_extensions.Self for model validators.
Functions must use descriptive, action-oriented snake_case names such as get_, validate_, and check_.
Avoid modifying mutable parameters in place; return a new data structure instead.
Use async def for I/O operations and external API calls.
Handle APIConnectionError from Llama Stack.
All classes must have descriptive docstrings and complete type annotations for class attributes; use specific types instead of Any.
Use PascalCase for classes and descriptive standard suffixes such as Configuration, Error/Exception, Resolver, and Interface.
Use ABC and @abstractmethod for abstract interfaces.
Follow Google Python docstring conventions; document all modules, classes, and functions, including Parameters, Returns, Raises, and Attributes sections as applicable.
Never commit secrets or keys; use environment variables for sensitive data.

Files:

  • src/app/endpoints/skills.py
  • tests/unit/utils/test_pydantic_ai.py
  • src/app/routers.py
  • src/app/main.py
  • src/utils/pydantic_ai_helpers.py
  • src/models/api/responses/successful/catalog.py
  • src/models/config.py
  • src/models/api/responses/successful/__init__.py
  • tests/unit/app/endpoints/test_skills.py
src/app/endpoints/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

Use FastAPI HTTPException with appropriate status codes for API endpoints.

Files:

  • src/app/endpoints/skills.py
tests/unit/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

tests/unit/**/*.py: Use pytest for all unit tests; do not use unittest.
Use conftest.py for shared fixtures, pytest-mock for AsyncMock objects, and pytest.mark.asyncio for asynchronous tests.

Files:

  • tests/unit/utils/test_pydantic_ai.py
  • tests/unit/app/endpoints/test_skills.py
src/models/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

src/models/**/*.py: Extend ConfigurationBase for configuration models and BaseModel for data models.
Use @model_validator and @field_validator for Pydantic model validation.

Files:

  • src/models/api/responses/successful/catalog.py
  • src/models/config.py
  • src/models/api/responses/successful/__init__.py
**/__init__.py

📄 CodeRabbit inference engine (AGENTS.md)

Package __init__.py files must contain brief package descriptions.

Files:

  • src/models/api/responses/successful/__init__.py
🧠 Learnings (7)
📚 Learning: 2026-04-06T20:18:07.852Z
Learnt from: major
Repo: lightspeed-core/lightspeed-stack PR: 1463
File: src/app/endpoints/rlsapi_v1.py:266-271
Timestamp: 2026-04-06T20:18:07.852Z
Learning: In the lightspeed-stack codebase, within `src/app/endpoints/` inference/MCP endpoints, treat `tools: Optional[list[Any]]` in MCP tool definitions as an intentional, consistent typing pattern (used across `query`, `responses`, `streaming_query`, `rlsapi_v1`). Do not raise or suggest this as a typing issue during code review; changing it in isolation could break endpoint typing consistency across the codebase.

Applied to files:

  • src/app/endpoints/skills.py
📚 Learning: 2026-06-24T13:45:37.249Z
Learnt from: Jdubrick
Repo: lightspeed-core/lightspeed-stack PR: 1971
File: src/utils/markdown_repair.py:31-36
Timestamp: 2026-06-24T13:45:37.249Z
Learning: In the lightspeed-stack repository, docstrings must use the section header name "Parameters:" (not "Args:") for function arguments, even if the project references Google Python docstring conventions. Ensure docstrings follow the project’s established "Parameters:" header format for any documented function parameters.

Applied to files:

  • src/app/endpoints/skills.py
  • tests/unit/utils/test_pydantic_ai.py
  • src/app/routers.py
  • src/app/main.py
  • src/utils/pydantic_ai_helpers.py
  • src/models/api/responses/successful/catalog.py
  • src/models/config.py
  • src/models/api/responses/successful/__init__.py
  • tests/unit/app/endpoints/test_skills.py
📚 Learning: 2026-07-06T15:26:18.398Z
Learnt from: Jdubrick
Repo: lightspeed-core/lightspeed-stack PR: 2071
File: src/models/config.py:2416-2422
Timestamp: 2026-07-06T15:26:18.398Z
Learning: In this repo’s Python code under src/**, don’t treat differences in string concatenation style as a style inconsistency when Black has effectively forced (or made clearer) use of explicit `+` string concatenation in multi-line logger/string expressions. If adjacent-literal implicit concatenation is avoided/changed specifically to accommodate Black’s formatting in these call sites, accept the `+` usage and don’t recommend converting it solely for consistency with nearby blocks that use implicit concatenation.

Applied to files:

  • src/app/endpoints/skills.py
  • src/app/routers.py
  • src/app/main.py
  • src/utils/pydantic_ai_helpers.py
  • src/models/api/responses/successful/catalog.py
  • src/models/config.py
  • src/models/api/responses/successful/__init__.py
📚 Learning: 2026-07-17T19:25:05.325Z
Learnt from: Jdubrick
Repo: lightspeed-core/lightspeed-stack PR: 2166
File: src/utils/saved_prompts.py:129-157
Timestamp: 2026-07-17T19:25:05.325Z
Learning: For any endpoint that handles saved prompts and calls `src/utils/saved_prompts.py::create_saved_prompt`, treat the endpoint as the validation boundary. Before calling `create_saved_prompt`, validate the incoming saved-prompt name and content, specifically using `validate_saved_prompt_name` and then persist (store) the normalized value it returns. Do not call `create_saved_prompt` with unvalidated/raw name/content.

Applied to files:

  • src/app/endpoints/skills.py
  • src/app/routers.py
  • src/app/main.py
  • src/utils/pydantic_ai_helpers.py
  • src/models/api/responses/successful/catalog.py
  • src/models/config.py
  • src/models/api/responses/successful/__init__.py
📚 Learning: 2026-01-12T10:58:40.230Z
Learnt from: blublinsky
Repo: lightspeed-core/lightspeed-stack PR: 972
File: src/models/config.py:459-513
Timestamp: 2026-01-12T10:58:40.230Z
Learning: In lightspeed-core/lightspeed-stack, for Python files under src/models, when a user claims a fix is done but the issue persists, verify the current code state before accepting the fix. Steps: review the diff, fetch the latest changes, run relevant tests, reproduce the issue, search the codebase for lingering references to the original problem, confirm the fix is applied and not undone by subsequent commits, and validate with local checks to ensure the issue is resolved.

Applied to files:

  • src/models/api/responses/successful/catalog.py
  • src/models/config.py
  • src/models/api/responses/successful/__init__.py
📚 Learning: 2026-02-25T07:46:33.545Z
Learnt from: asimurka
Repo: lightspeed-core/lightspeed-stack PR: 1211
File: src/models/responses.py:8-16
Timestamp: 2026-02-25T07:46:33.545Z
Learning: In the Python codebase, requests.py should use OpenAIResponseInputTool as Tool while responses.py uses OpenAIResponseTool as Tool. This difference is intentional due to differing schemas for input vs output tools in llama-stack-api. Apply this distinction consistently to other models under src/models (e.g., ensure request-related tools use the InputTool variant and response-related tools use the ResponseTool variant). If adding new tools, choose the corresponding InputTool or Tool class based on whether the tool represents input or output, and document the rationale in code comments.

Applied to files:

  • src/models/api/responses/successful/catalog.py
  • src/models/config.py
  • src/models/api/responses/successful/__init__.py
📚 Learning: 2026-07-21T11:10:05.060Z
Learnt from: are-ces
Repo: lightspeed-core/lightspeed-stack PR: 2162
File: src/a2a_client/__init__.py:3-9
Timestamp: 2026-07-21T11:10:05.060Z
Learning: In this repository, it is acceptable for Python package `__init__.py` files to contain functional code (not only docstrings/metadata) and to perform package-level re-exports. Do not flag `__init__.py` solely for containing imports or other logic used to re-export symbols; this is allowed when it’s implemented via imports and `__all__` (or otherwise clearly intended to define the package’s public API).

Applied to files:

  • src/models/api/responses/successful/__init__.py
🔇 Additional comments (5)
src/models/api/responses/successful/__init__.py (1)

10-10: LGTM!

Also applies to: 104-104

src/models/config.py (1)

1276-1276: LGTM!

src/app/routers.py (1)

30-30: LGTM!

Also applies to: 59-59

src/app/main.py (1)

66-66: LGTM!

tests/unit/utils/test_pydantic_ai.py (1)

18-18: LGTM!

Also applies to: 187-205

Comment thread src/app/endpoints/skills.py
Comment thread src/models/api/responses/successful/catalog.py Outdated
Comment on lines +18 to +43
@pytest.mark.asyncio
async def test_skills_loaded(
mocker: MockerFixture,
tmp_path: Path,
) -> None:
"""Test that loaded skills are returned with name and description."""
mock_authorization_resolvers(mocker)

skills_root = tmp_path / "skills"
for name, desc in [
("code-review", "Review code for quality and security"),
("openshift-troubleshooting", "Troubleshoot OpenShift cluster issues"),
]:
skill_dir = skills_root / name
skill_dir.mkdir(parents=True)
(skill_dir / "SKILL.md").write_text(
f"---\nname: {name}\ndescription: {desc}\n---\n\nInstructions.\n",
encoding="utf-8",
)

skills_config = SkillsConfiguration(paths=[skills_root])
mock_config = mocker.patch("app.endpoints.skills.configuration")
mock_config.configuration.skills = skills_config

request = Request(scope={"type": "http"})
response = await skills_endpoint_handler(auth=MOCK_AUTH, request=request)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Add route-level authorization coverage.

These tests call the handler directly with a hand-built request and auth tuple, so they do not verify /v1/skills registration, FastAPI serialization, or dependency wiring. Add at least one client-level test covering the mounted route and denied access; keep the direct filesystem tests for metadata cases.

Based on the PR objective, this endpoint must be both versioned and authorized.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/unit/app/endpoints/test_skills.py` around lines 18 - 43, The existing
test_skills_loaded direct-handler coverage does not validate route registration,
serialization, or authorization wiring. Add a client-level test for the mounted
/v1/skills route that verifies an authorized request succeeds and a denied
request is rejected, while retaining the direct filesystem-based tests for
metadata behavior. Ensure the route remains versioned under /v1 and uses the
configured authorization dependency.

Signed-off-by: Stephanie <yangcao@redhat.com>
@yangcao77
yangcao77 force-pushed the list-skills-endpoint branch from fdb284a to 450a1d3 Compare July 30, 2026 15:11
Signed-off-by: Stephanie <yangcao@redhat.com>

@asimurka asimurka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Skills catalog is already available under GET /tools endpoint. You can filter them on provider_id == "agent-skills".

@tisnik

tisnik commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

@yangcao77 please look at our contributing guide https://github.com/lightspeed-core/lightspeed-stack/blob/main/CONTRIBUTING.md . It basically says, that features as this one needs to be a bit coordinated. And all such changes should include documentation (user+devel one) and ideally also integration and end to end tests.

We are forced to require all these things on order to make sure the LCore will be in a good shape, prepared to be released, and also able to pass all security checks we are asked to pass.

@sbunciak FYI

@yangcao77

yangcao77 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

@asimurka thanks for taking a look.

list_skills is an agent tool, not a callable endpoint. it's only invoked by the LLM during a query turn, and the response comes back embedded in a conversation turn rather than as a clean structured metadata. which is also unpredictable how different models are going to answer it.

GET /v1/skills is meant for consumers that need a clear and LLM-free way to see what's is cofigured & available. We would like to avoid the model/agent call and also parsing from the response, or dependencies on LLM tool-calling behavior. It reads directly from SkillsConfiguration the same way /tools does for tool metadata

Signed-off-by: Stephanie <yangcao@redhat.com>
@yangcao77

Copy link
Copy Markdown
Contributor Author

Thanks for the pointer, @tisnik

I've added:

Docs: README.md and docs/user_doc/skills_guide.md, docs/devel_doc/ARCHITECTURE.md and docs/models/responses_succ.md
Integration tests: tests/integration/endpoints/test_skills_integration.py
E2E tests: 3 new scenarios in tests/e2e/features/skills.feature covering populated, empty, and multi-skill-directory configs
Let me know if there's anything else you'd like coordinated before this moves forward.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/devel_doc/ARCHITECTURE.md`:
- Around line 506-508: Update the “List Skills” endpoint documentation to use
the versioned path GET /v1/skills instead of GET /skills, while preserving the
existing description of its behavior.

In `@docs/user_doc/skills_guide.md`:
- Around line 211-219: Update the “Inspecting Loaded Skills via REST API” curl
example to reflect the handler’s authentication requirements by showing the
necessary credentials and permissions, or explicitly state that authentication
must be disabled for the unauthenticated request to work.

In `@README.md`:
- Line 1273: Add a blank line between the **Response Body:** paragraph and the
following ```json fenced block in the README.md section.
- Around line 1268-1270: Update the README curl example to include the required
authorization header, and document that requests without valid authentication
may return 401 or 403 when authentication is enabled.

In `@src/models/api/responses/successful/catalog.py`:
- Around line 11-12: Update the SkillsResponse class docstring to include an
Attributes section documenting the skills field, following the project's
existing docstring conventions for public response models.

In `@tests/integration/endpoints/test_skills_integration.py`:
- Around line 23-30: Complete the _write_skill docstring by adding Parameters
and Returns sections that document skills_root, name, and description, and state
that the helper returns None. Keep the existing behavior and summary unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 52979f47-1a4d-4db0-9293-55d50b480683

📥 Commits

Reviewing files that changed from the base of the PR and between 056bcf6 and 3f5a80d.

📒 Files selected for processing (16)
  • README.md
  • docs/devel_doc/ARCHITECTURE.md
  • docs/devel_doc/openapi.json
  • docs/models/responses_succ.md
  • docs/user_doc/skills_guide.md
  • src/app/endpoints/skills.py
  • src/models/api/responses/successful/catalog.py
  • src/models/common/__init__.py
  • src/models/common/skills.py
  • src/utils/models_dumper.py
  • src/utils/pydantic_ai_helpers.py
  • tests/e2e/features/skills.feature
  • tests/integration/endpoints/test_skills_integration.py
  • tests/unit/app/endpoints/test_skills.py
  • tests/unit/app/test_routers.py
  • tests/unit/utils/test_pydantic_ai.py
📜 Review details
⏰ Context from checks skipped due to timeout. (8)
  • GitHub Check: E2E Tests for Lightspeed Evaluation job
  • GitHub Check: E2E: library mode / ci / group 2
  • GitHub Check: E2E: server mode / ci / group 1
  • GitHub Check: E2E: server mode / ci / group 3
  • GitHub Check: E2E: server mode / ci / group 2
  • GitHub Check: E2E: library mode / ci / group 3
  • GitHub Check: E2E: library mode / ci / group 1
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-0-7-on-pull-request
🧰 Additional context used
📓 Path-based instructions (8)
**/*

📄 CodeRabbit inference engine (Custom checks)

**/*: Flag meaningful O(n^2)+ algorithms on non-trivial inputs, including handlers and Kubernetes list operations.
Flag N+1 patterns that list items and then query once per item, including Kubernetes API and database access.
Flag expensive work inside loops, including API calls, JSON parsing, and regex compilation.
Flag unbounded growth in caches, watchers, or buffers when eviction or limits are missing.
Flag missing pagination or limits on list operations and API endpoints.
Flag secrets or tokens logged in plaintext or hardcoded in source.
Flag API endpoints missing authentication or authorization.
Flag injection vulnerabilities, including SQL injection, command injection, and path traversal.
Flag sensitive data leaked in API responses, WebSocket messages, or logs.
Flag Kubernetes Secrets and Red Hat secrets missing OwnerReferences.

Files:

  • docs/devel_doc/ARCHITECTURE.md
  • src/utils/models_dumper.py
  • src/models/common/skills.py
  • tests/e2e/features/skills.feature
  • docs/models/responses_succ.md
  • tests/integration/endpoints/test_skills_integration.py
  • tests/unit/app/test_routers.py
  • docs/user_doc/skills_guide.md
  • README.md
  • src/models/common/__init__.py
  • docs/devel_doc/openapi.json
  • src/utils/pydantic_ai_helpers.py
  • src/app/endpoints/skills.py
  • tests/unit/utils/test_pydantic_ai.py
  • tests/unit/app/endpoints/test_skills.py
  • src/models/api/responses/successful/catalog.py
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Use absolute imports for internal Python modules.
All modules must begin with descriptive docstrings explaining their purpose.
Use logger = get_logger(__name__) from log.py for module logging.
Use complete type annotations for function parameters and return types.
Use modern union syntax such as str | int; use Optional[Type] for optional values.
Use typing_extensions.Self for model validators.
Functions must use descriptive, action-oriented snake_case names such as get_, validate_, and check_.
Avoid modifying mutable parameters in place; return a new data structure instead.
Use async def for I/O operations and external API calls.
Handle APIConnectionError from Llama Stack.
All classes must have descriptive docstrings and complete type annotations for class attributes; use specific types instead of Any.
Use PascalCase for classes and descriptive standard suffixes such as Configuration, Error/Exception, Resolver, and Interface.
Use ABC and @abstractmethod for abstract interfaces.
Follow Google Python docstring conventions; document all modules, classes, and functions, including Parameters, Returns, Raises, and Attributes sections as applicable.
Never commit secrets or keys; use environment variables for sensitive data.

Files:

  • src/utils/models_dumper.py
  • src/models/common/skills.py
  • tests/integration/endpoints/test_skills_integration.py
  • tests/unit/app/test_routers.py
  • src/models/common/__init__.py
  • src/utils/pydantic_ai_helpers.py
  • src/app/endpoints/skills.py
  • tests/unit/utils/test_pydantic_ai.py
  • tests/unit/app/endpoints/test_skills.py
  • src/models/api/responses/successful/catalog.py
src/models/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

src/models/**/*.py: Extend ConfigurationBase for configuration models and BaseModel for data models.
Use @model_validator and @field_validator for Pydantic model validation.

Files:

  • src/models/common/skills.py
  • src/models/common/__init__.py
  • src/models/api/responses/successful/catalog.py
tests/e2e/features/**/*.feature

📄 CodeRabbit inference engine (AGENTS.md)

End-to-end scenarios must use behave’s Gherkin feature-file format.

Files:

  • tests/e2e/features/skills.feature
tests/integration/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

Use pytest for all integration tests; do not use unittest.

Files:

  • tests/integration/endpoints/test_skills_integration.py
tests/unit/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

tests/unit/**/*.py: Use pytest for all unit tests; do not use unittest.
Use conftest.py for shared fixtures, pytest-mock for AsyncMock objects, and pytest.mark.asyncio for asynchronous tests.

Files:

  • tests/unit/app/test_routers.py
  • tests/unit/utils/test_pydantic_ai.py
  • tests/unit/app/endpoints/test_skills.py
**/__init__.py

📄 CodeRabbit inference engine (AGENTS.md)

Package __init__.py files must contain brief package descriptions.

Files:

  • src/models/common/__init__.py
src/app/endpoints/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

Use FastAPI HTTPException with appropriate status codes for API endpoints.

Files:

  • src/app/endpoints/skills.py
🧠 Learnings (7)
📚 Learning: 2026-06-24T13:45:37.249Z
Learnt from: Jdubrick
Repo: lightspeed-core/lightspeed-stack PR: 1971
File: src/utils/markdown_repair.py:31-36
Timestamp: 2026-06-24T13:45:37.249Z
Learning: In the lightspeed-stack repository, docstrings must use the section header name "Parameters:" (not "Args:") for function arguments, even if the project references Google Python docstring conventions. Ensure docstrings follow the project’s established "Parameters:" header format for any documented function parameters.

Applied to files:

  • src/utils/models_dumper.py
  • src/models/common/skills.py
  • tests/integration/endpoints/test_skills_integration.py
  • tests/unit/app/test_routers.py
  • src/models/common/__init__.py
  • src/utils/pydantic_ai_helpers.py
  • src/app/endpoints/skills.py
  • tests/unit/utils/test_pydantic_ai.py
  • tests/unit/app/endpoints/test_skills.py
  • src/models/api/responses/successful/catalog.py
📚 Learning: 2026-07-06T15:26:18.398Z
Learnt from: Jdubrick
Repo: lightspeed-core/lightspeed-stack PR: 2071
File: src/models/config.py:2416-2422
Timestamp: 2026-07-06T15:26:18.398Z
Learning: In this repo’s Python code under src/**, don’t treat differences in string concatenation style as a style inconsistency when Black has effectively forced (or made clearer) use of explicit `+` string concatenation in multi-line logger/string expressions. If adjacent-literal implicit concatenation is avoided/changed specifically to accommodate Black’s formatting in these call sites, accept the `+` usage and don’t recommend converting it solely for consistency with nearby blocks that use implicit concatenation.

Applied to files:

  • src/utils/models_dumper.py
  • src/models/common/skills.py
  • src/models/common/__init__.py
  • src/utils/pydantic_ai_helpers.py
  • src/app/endpoints/skills.py
  • src/models/api/responses/successful/catalog.py
📚 Learning: 2026-07-17T19:25:05.325Z
Learnt from: Jdubrick
Repo: lightspeed-core/lightspeed-stack PR: 2166
File: src/utils/saved_prompts.py:129-157
Timestamp: 2026-07-17T19:25:05.325Z
Learning: For any endpoint that handles saved prompts and calls `src/utils/saved_prompts.py::create_saved_prompt`, treat the endpoint as the validation boundary. Before calling `create_saved_prompt`, validate the incoming saved-prompt name and content, specifically using `validate_saved_prompt_name` and then persist (store) the normalized value it returns. Do not call `create_saved_prompt` with unvalidated/raw name/content.

Applied to files:

  • src/utils/models_dumper.py
  • src/models/common/skills.py
  • src/models/common/__init__.py
  • src/utils/pydantic_ai_helpers.py
  • src/app/endpoints/skills.py
  • src/models/api/responses/successful/catalog.py
📚 Learning: 2026-01-12T10:58:40.230Z
Learnt from: blublinsky
Repo: lightspeed-core/lightspeed-stack PR: 972
File: src/models/config.py:459-513
Timestamp: 2026-01-12T10:58:40.230Z
Learning: In lightspeed-core/lightspeed-stack, for Python files under src/models, when a user claims a fix is done but the issue persists, verify the current code state before accepting the fix. Steps: review the diff, fetch the latest changes, run relevant tests, reproduce the issue, search the codebase for lingering references to the original problem, confirm the fix is applied and not undone by subsequent commits, and validate with local checks to ensure the issue is resolved.

Applied to files:

  • src/models/common/skills.py
  • src/models/common/__init__.py
  • src/models/api/responses/successful/catalog.py
📚 Learning: 2026-02-25T07:46:33.545Z
Learnt from: asimurka
Repo: lightspeed-core/lightspeed-stack PR: 1211
File: src/models/responses.py:8-16
Timestamp: 2026-02-25T07:46:33.545Z
Learning: In the Python codebase, requests.py should use OpenAIResponseInputTool as Tool while responses.py uses OpenAIResponseTool as Tool. This difference is intentional due to differing schemas for input vs output tools in llama-stack-api. Apply this distinction consistently to other models under src/models (e.g., ensure request-related tools use the InputTool variant and response-related tools use the ResponseTool variant). If adding new tools, choose the corresponding InputTool or Tool class based on whether the tool represents input or output, and document the rationale in code comments.

Applied to files:

  • src/models/common/skills.py
  • src/models/common/__init__.py
  • src/models/api/responses/successful/catalog.py
📚 Learning: 2026-07-21T11:10:05.060Z
Learnt from: are-ces
Repo: lightspeed-core/lightspeed-stack PR: 2162
File: src/a2a_client/__init__.py:3-9
Timestamp: 2026-07-21T11:10:05.060Z
Learning: In this repository, it is acceptable for Python package `__init__.py` files to contain functional code (not only docstrings/metadata) and to perform package-level re-exports. Do not flag `__init__.py` solely for containing imports or other logic used to re-export symbols; this is allowed when it’s implemented via imports and `__all__` (or otherwise clearly intended to define the package’s public API).

Applied to files:

  • src/models/common/__init__.py
📚 Learning: 2026-04-06T20:18:07.852Z
Learnt from: major
Repo: lightspeed-core/lightspeed-stack PR: 1463
File: src/app/endpoints/rlsapi_v1.py:266-271
Timestamp: 2026-04-06T20:18:07.852Z
Learning: In the lightspeed-stack codebase, within `src/app/endpoints/` inference/MCP endpoints, treat `tools: Optional[list[Any]]` in MCP tool definitions as an intentional, consistent typing pattern (used across `query`, `responses`, `streaming_query`, `rlsapi_v1`). Do not raise or suggest this as a typing issue during code review; changing it in isolation could break endpoint typing consistency across the codebase.

Applied to files:

  • src/app/endpoints/skills.py
🪛 markdownlint-cli2 (0.23.1)
README.md

[warning] 1273-1273: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

🔇 Additional comments (14)
src/models/common/skills.py (1)

1-17: LGTM!

src/models/common/__init__.py (1)

21-21: LGTM!

Also applies to: 52-52

src/models/api/responses/successful/catalog.py (1)

8-8: LGTM!

Also applies to: 14-35

src/utils/models_dumper.py (1)

76-76: LGTM!

Also applies to: 120-120

docs/user_doc/skills_guide.md (1)

19-19: LGTM!

docs/models/responses_succ.md (1)

2137-2152: LGTM!

Also applies to: 2173-2183

docs/devel_doc/openapi.json (1)

1674-1823: LGTM!

Also applies to: 11799-11799, 20949-20969, 20987-21018, 22599-22602

tests/e2e/features/skills.feature (1)

183-234: Add denied-access coverage.

The scenarios assert only successful responses. Add unauthenticated and unauthorized requests that assert the documented 401 and 403 responses.

src/utils/pydantic_ai_helpers.py (1)

15-15: LGTM!

Also applies to: 108-125

src/app/endpoints/skills.py (1)

6-6: LGTM!

Also applies to: 39-69

tests/unit/app/endpoints/test_skills.py (1)

47-51: LGTM!

Also applies to: 97-119

tests/unit/utils/test_pydantic_ai.py (1)

187-203: LGTM!

tests/integration/endpoints/test_skills_integration.py (1)

33-87: LGTM!

tests/unit/app/test_routers.py (1)

33-33: LGTM!

Also applies to: 126-134, 169-177

Comment thread docs/devel_doc/ARCHITECTURE.md
Comment thread docs/user_doc/skills_guide.md
Comment thread README.md
Comment thread README.md
Comment thread src/models/api/responses/successful/catalog.py Outdated
Comment thread tests/integration/endpoints/test_skills_integration.py
Signed-off-by: Stephanie <yangcao@redhat.com>
Signed-off-by: Stephanie <yangcao@redhat.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/models/config.py (1)

3050-3055: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Document Configuration.observability.

The new public field is not described in Configuration's class docstring. Add an Attributes: entry for observability so the configuration model documentation remains complete.

As per coding guidelines, class docstrings must document applicable Attributes sections.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/models/config.py` around lines 3050 - 3055, Add an Attributes entry for
the public Configuration.observability field in the Configuration class
docstring, describing its OpenTelemetry and observability settings sourced from
OTEL_* environment variables. Preserve the existing docstring structure and
document only this newly added field.

Source: Coding guidelines

♻️ Duplicate comments (1)
README.md (1)

1268-1274: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Show credentials in the authenticated curl example.

The section documents authentication, but the copy-paste command sends no Authorization header. It fails with 401 or 403 when authentication is enabled. Add a placeholder bearer header, or label the command as valid only when authentication is disabled.

Proposed fix
-curl http://localhost:8080/v1/skills
+curl -H "Authorization: Bearer <token>" \
+  http://localhost:8080/v1/skills
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` around lines 1268 - 1274, Update the authenticated curl example in
the authentication documentation to include a placeholder Authorization bearer
header, ensuring the copy-paste command works when authentication is enabled.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/models/config.py`:
- Around line 3050-3055: Add an Attributes entry for the public
Configuration.observability field in the Configuration class docstring,
describing its OpenTelemetry and observability settings sourced from OTEL_*
environment variables. Preserve the existing docstring structure and document
only this newly added field.

---

Duplicate comments:
In `@README.md`:
- Around line 1268-1274: Update the authenticated curl example in the
authentication documentation to include a placeholder Authorization bearer
header, ensuring the copy-paste command works when authentication is enabled.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5ba6b65c-74aa-4f8e-94ee-862370e32f86

📥 Commits

Reviewing files that changed from the base of the PR and between 3f5a80d and e78fcea.

📒 Files selected for processing (8)
  • README.md
  • docs/devel_doc/openapi.json
  • docs/models/successful_responses.md
  • docs/user_doc/skills_guide.md
  • src/models/api/responses/successful/catalog.py
  • src/models/config.py
  • src/utils/models_dumper.py
  • tests/integration/endpoints/test_skills_integration.py
📜 Review details
⏰ Context from checks skipped due to timeout. (13)
  • GitHub Check: integration_tests (3.12)
  • GitHub Check: spectral
  • GitHub Check: integration_tests (3.13)
  • GitHub Check: pydocstyle
  • GitHub Check: bandit
  • GitHub Check: E2E Tests for Lightspeed Evaluation job
  • GitHub Check: E2E: library mode / ci / group 3
  • GitHub Check: E2E: server mode / ci / group 3
  • GitHub Check: E2E: library mode / ci / group 2
  • GitHub Check: E2E: library mode / ci / group 1
  • GitHub Check: E2E: server mode / ci / group 1
  • GitHub Check: E2E: server mode / ci / group 2
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-0-7-on-pull-request
🧰 Additional context used
📓 Path-based instructions (4)
**/*

📄 CodeRabbit inference engine (Custom checks)

**/*: Flag meaningful O(n^2)+ algorithms on non-trivial inputs, including handlers and Kubernetes list operations.
Flag N+1 patterns that list items and then query once per item, including Kubernetes API and database access.
Flag expensive work inside loops, including API calls, JSON parsing, and regex compilation.
Flag unbounded growth in caches, watchers, or buffers when eviction or limits are missing.
Flag missing pagination or limits on list operations and API endpoints.
Flag secrets or tokens logged in plaintext or hardcoded in source.
Flag API endpoints missing authentication or authorization.
Flag injection vulnerabilities, including SQL injection, command injection, and path traversal.
Flag sensitive data leaked in API responses, WebSocket messages, or logs.
Flag Kubernetes Secrets and Red Hat secrets missing OwnerReferences.

Files:

  • docs/models/successful_responses.md
  • README.md
  • docs/devel_doc/openapi.json
  • tests/integration/endpoints/test_skills_integration.py
  • docs/user_doc/skills_guide.md
  • src/models/api/responses/successful/catalog.py
  • src/models/config.py
  • src/utils/models_dumper.py
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Use absolute imports for internal Python modules.
All modules must begin with descriptive docstrings explaining their purpose.
Use logger = get_logger(__name__) from log.py for module logging.
Use complete type annotations for function parameters and return types.
Use modern union syntax such as str | int; use Optional[Type] for optional values.
Use typing_extensions.Self for model validators.
Functions must use descriptive, action-oriented snake_case names such as get_, validate_, and check_.
Avoid modifying mutable parameters in place; return a new data structure instead.
Use async def for I/O operations and external API calls.
Handle APIConnectionError from Llama Stack.
All classes must have descriptive docstrings and complete type annotations for class attributes; use specific types instead of Any.
Use PascalCase for classes and descriptive standard suffixes such as Configuration, Error/Exception, Resolver, and Interface.
Use ABC and @abstractmethod for abstract interfaces.
Follow Google Python docstring conventions; document all modules, classes, and functions, including Parameters, Returns, Raises, and Attributes sections as applicable.
Never commit secrets or keys; use environment variables for sensitive data.

Files:

  • tests/integration/endpoints/test_skills_integration.py
  • src/models/api/responses/successful/catalog.py
  • src/models/config.py
  • src/utils/models_dumper.py
tests/integration/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

Use pytest for all integration tests; do not use unittest.

Files:

  • tests/integration/endpoints/test_skills_integration.py
src/models/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

src/models/**/*.py: Extend ConfigurationBase for configuration models and BaseModel for data models.
Use @model_validator and @field_validator for Pydantic model validation.

Files:

  • src/models/api/responses/successful/catalog.py
  • src/models/config.py
🧠 Learnings (5)
📚 Learning: 2026-06-24T13:45:37.249Z
Learnt from: Jdubrick
Repo: lightspeed-core/lightspeed-stack PR: 1971
File: src/utils/markdown_repair.py:31-36
Timestamp: 2026-06-24T13:45:37.249Z
Learning: In the lightspeed-stack repository, docstrings must use the section header name "Parameters:" (not "Args:") for function arguments, even if the project references Google Python docstring conventions. Ensure docstrings follow the project’s established "Parameters:" header format for any documented function parameters.

Applied to files:

  • tests/integration/endpoints/test_skills_integration.py
  • src/models/api/responses/successful/catalog.py
  • src/models/config.py
  • src/utils/models_dumper.py
📚 Learning: 2026-01-12T10:58:40.230Z
Learnt from: blublinsky
Repo: lightspeed-core/lightspeed-stack PR: 972
File: src/models/config.py:459-513
Timestamp: 2026-01-12T10:58:40.230Z
Learning: In lightspeed-core/lightspeed-stack, for Python files under src/models, when a user claims a fix is done but the issue persists, verify the current code state before accepting the fix. Steps: review the diff, fetch the latest changes, run relevant tests, reproduce the issue, search the codebase for lingering references to the original problem, confirm the fix is applied and not undone by subsequent commits, and validate with local checks to ensure the issue is resolved.

Applied to files:

  • src/models/api/responses/successful/catalog.py
  • src/models/config.py
📚 Learning: 2026-02-25T07:46:33.545Z
Learnt from: asimurka
Repo: lightspeed-core/lightspeed-stack PR: 1211
File: src/models/responses.py:8-16
Timestamp: 2026-02-25T07:46:33.545Z
Learning: In the Python codebase, requests.py should use OpenAIResponseInputTool as Tool while responses.py uses OpenAIResponseTool as Tool. This difference is intentional due to differing schemas for input vs output tools in llama-stack-api. Apply this distinction consistently to other models under src/models (e.g., ensure request-related tools use the InputTool variant and response-related tools use the ResponseTool variant). If adding new tools, choose the corresponding InputTool or Tool class based on whether the tool represents input or output, and document the rationale in code comments.

Applied to files:

  • src/models/api/responses/successful/catalog.py
  • src/models/config.py
📚 Learning: 2026-07-06T15:26:18.398Z
Learnt from: Jdubrick
Repo: lightspeed-core/lightspeed-stack PR: 2071
File: src/models/config.py:2416-2422
Timestamp: 2026-07-06T15:26:18.398Z
Learning: In this repo’s Python code under src/**, don’t treat differences in string concatenation style as a style inconsistency when Black has effectively forced (or made clearer) use of explicit `+` string concatenation in multi-line logger/string expressions. If adjacent-literal implicit concatenation is avoided/changed specifically to accommodate Black’s formatting in these call sites, accept the `+` usage and don’t recommend converting it solely for consistency with nearby blocks that use implicit concatenation.

Applied to files:

  • src/models/api/responses/successful/catalog.py
  • src/models/config.py
  • src/utils/models_dumper.py
📚 Learning: 2026-07-17T19:25:05.325Z
Learnt from: Jdubrick
Repo: lightspeed-core/lightspeed-stack PR: 2166
File: src/utils/saved_prompts.py:129-157
Timestamp: 2026-07-17T19:25:05.325Z
Learning: For any endpoint that handles saved prompts and calls `src/utils/saved_prompts.py::create_saved_prompt`, treat the endpoint as the validation boundary. Before calling `create_saved_prompt`, validate the incoming saved-prompt name and content, specifically using `validate_saved_prompt_name` and then persist (store) the normalized value it returns. Do not call `create_saved_prompt` with unvalidated/raw name/content.

Applied to files:

  • src/models/api/responses/successful/catalog.py
  • src/models/config.py
  • src/utils/models_dumper.py
🔇 Additional comments (11)
src/models/api/responses/successful/catalog.py (1)

12-20: LGTM!

Also applies to: 22-39

src/utils/models_dumper.py (1)

187-187: LGTM!

Also applies to: 207-224

src/models/config.py (2)

5-5: LGTM!

Also applies to: 2777-2785, 2842-2886


2787-2840: 🩺 Stability & Availability

No change needed.

Configuration.observability.otel is only populated for the config response, documented as redacted, and there is no runtime OpenTelemetry initialization path reading it.

tests/integration/endpoints/test_skills_integration.py (1)

23-39: LGTM!

README.md (1)

1251-1266: LGTM!

Also applies to: 1276-1301

docs/devel_doc/openapi.json (2)

6938-6946: LGTM!

Also applies to: 13179-13183, 13280-13288, 15947-15962, 21042-21042


1674-1823: 🗄️ Data Integrity & Integration

No change needed.

The /v1/skills OpenAPI operation uses the get_skills permission, references SkillsResponse, and returns SkillMetadata items under the skills tag.

docs/user_doc/skills_guide.md (2)

219-221: Make the curl example valid for the authenticated endpoint.

The command sends no credentials. Add an authorization header with a token that has the required permission, or state that the command only works when authentication is disabled. The current prose does not make the copy-paste example executable in the documented authenticated setup.


19-19: LGTM!

docs/models/successful_responses.md (1)

2308-2323: LGTM!

Also applies to: 2344-2354

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.

3 participants