Skip to content

LCORE-1356: Updated config docs#1470

Merged
tisnik merged 1 commit into
lightspeed-core:mainfrom
tisnik:lcore-1356-updated-config-docs-
Apr 7, 2026
Merged

LCORE-1356: Updated config docs#1470
tisnik merged 1 commit into
lightspeed-core:mainfrom
tisnik:lcore-1356-updated-config-docs-

Conversation

@tisnik
Copy link
Copy Markdown
Contributor

@tisnik tisnik commented Apr 7, 2026

Description

LCORE-1356: Updated config docs

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

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

Related Tickets & Documents

  • Related Issue #LCORE-1356

Summary by CodeRabbit

  • Documentation
    • Added new configuration section for the /infer endpoint with allow_verbose_infer option to control extended metadata output and quota_subject option for token quota enforcement.
    • Moved allow_verbose_infer setting from global customization to endpoint-specific configuration.
    • Updated MCP server registration documentation to clarify availability.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 7, 2026

Walkthrough

Configuration schema restructuring moves allow_verbose_infer from service-wide customization to a new endpoint-specific RlsapiV1Configuration section, alongside a new quota_subject field for /v1/infer quota enforcement. Updates applied consistently across documentation, schema definitions, and diagram representations.

Changes

Cohort / File(s) Summary
Configuration Documentation
docs/config.html, docs/config.md, docs/config.json
Added top-level rlsapi_v1 field referencing new RlsapiV1Configuration schema with allow_verbose_infer (boolean) and quota_subject (string) properties. Removed allow_verbose_infer from Customization section. Updated MCP servers documentation to reflect availability constraints.
Schema Diagram
docs/config.puml
Added rlsapi_v1: Optional[RlsapiV1Configuration] field to Configuration class and validation method validate_rlsapi_v1_quota_configuration(). Introduced new RlsapiV1Configuration class with optional allow_verbose_infer and quota_subject fields. Removed allow_verbose_infer from Customization class.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'LCORE-1356: Updated config docs' is vague and generic, using the non-descriptive term 'Updated' without specifying what config changes were made or their scope. Consider a more specific title like 'LCORE-1356: Add rlsapi_v1 configuration section and remove allow_verbose_infer from Customization' to clearly convey the main structural changes.
✅ 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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 and usage tips.

Copy link
Copy Markdown
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: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/config.json`:
- Around line 1193-1199: The quota_subject schema currently allows any string;
modify the "quota_subject" property in the config JSON schema to restrict values
to the supported set by adding an "enum": ["user_id", "org_id", "system_id"]
while preserving "type": "string", "nullable": true and "default": null and keep
the existing description/title; update the description if desired to note the
allowed values so validation and OpenAPI generation enforce only those three
options.

In `@docs/config.md`:
- Line 162: The documentation line that claims "Only MCP servers defined in the
lightspeed-stack.yaml configuration are available to the agents" conflicts with
the runtime registration feature; update the MCP availability text to include
support for dynamic runtime registration via the POST /v1/mcp-servers endpoint
(or, if the intended behavior is to disallow runtime registration,
remove/disable that route and note the change). Specifically, mention both
static configuration (lightspeed-stack.yaml) and dynamic registration (POST
/v1/mcp-servers) as supported options for registering MCP servers so readers
aren’t misled about MCP servers availability.

In `@docs/config.puml`:
- Around line 211-213: The UML docs show allow_verbose_infer as Optional[bool]
but the actual model RlsapiV1Configuration defines allow_verbose_infer as a
non-nullable bool (default False); update the docs in docs/config.puml so the
attribute for RlsapiV1Configuration reads a plain bool (no Optional) to reflect
the model's non-nullability and default.
🪄 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

Run ID: 16a71212-b71f-48d9-a070-5f012ecf39d7

📥 Commits

Reviewing files that changed from the base of the PR and between 6767256 and fd1d29b.

⛔ Files ignored due to path filters (1)
  • docs/config.svg is excluded by !**/*.svg
📒 Files selected for processing (4)
  • docs/config.html
  • docs/config.json
  • docs/config.md
  • docs/config.puml
📜 Review details
⏰ 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). (4)
  • GitHub Check: build-pr
  • GitHub Check: unit_tests (3.12)
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
  • GitHub Check: E2E Tests for Lightspeed Evaluation job
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: major
Repo: lightspeed-core/lightspeed-stack PR: 1469
File: src/models/config.py:1928-1933
Timestamp: 2026-04-07T14:44:42.022Z
Learning: In lightspeed-core/lightspeed-stack, `allow_verbose_infer` (previously `customization.allow_verbose_infer`, now `rlsapi_v1.allow_verbose_infer`) is only used internally by the `rlsapi_v1` `/infer` endpoint and has a single known consumer (the PR author). Backward compatibility for this config field relocation is intentionally not required and should not be flagged in future reviews.
📚 Learning: 2026-04-07T14:44:42.022Z
Learnt from: major
Repo: lightspeed-core/lightspeed-stack PR: 1469
File: src/models/config.py:1928-1933
Timestamp: 2026-04-07T14:44:42.022Z
Learning: In lightspeed-core/lightspeed-stack, `allow_verbose_infer` (previously `customization.allow_verbose_infer`, now `rlsapi_v1.allow_verbose_infer`) is only used internally by the `rlsapi_v1` `/infer` endpoint and has a single known consumer (the PR author). Backward compatibility for this config field relocation is intentionally not required and should not be flagged in future reviews.

Applied to files:

  • docs/config.json
  • docs/config.html
  • docs/config.md
📚 Learning: 2026-04-05T12:19:36.009Z
Learnt from: CR
Repo: lightspeed-core/lightspeed-stack PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-05T12:19:36.009Z
Learning: Applies to src/models/config.py : All config uses Pydantic models extending `ConfigurationBase`

Applied to files:

  • docs/config.puml
📚 Learning: 2026-04-05T12:19:36.009Z
Learnt from: CR
Repo: lightspeed-core/lightspeed-stack PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-05T12:19:36.009Z
Learning: Applies to src/models/config.py : Pydantic configuration models should extend `ConfigurationBase`

Applied to files:

  • docs/config.puml
📚 Learning: 2026-04-05T12:19:36.009Z
Learnt from: CR
Repo: lightspeed-core/lightspeed-stack PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-05T12:19:36.009Z
Learning: Applies to src/models/config.py : Use type hints: `Optional[FilePath]`, `PositiveInt`, `SecretStr` for configuration fields

Applied to files:

  • docs/config.puml
📚 Learning: 2026-04-05T12:19:36.009Z
Learnt from: CR
Repo: lightspeed-core/lightspeed-stack PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-05T12:19:36.009Z
Learning: Applies to src/models/config.py : Base class sets `extra="forbid"` to reject unknown fields in Pydantic configuration models

Applied to files:

  • docs/config.puml
📚 Learning: 2025-12-18T10:21:09.038Z
Learnt from: are-ces
Repo: lightspeed-core/lightspeed-stack PR: 935
File: run.yaml:114-115
Timestamp: 2025-12-18T10:21:09.038Z
Learning: In Llama Stack version 0.3.x, telemetry provider configuration is not supported under the `providers` section in run.yaml configuration files. Telemetry can be enabled with just `telemetry.enabled: true` without requiring an explicit provider block.

Applied to files:

  • docs/config.md
🪛 LanguageTool
docs/config.md

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

(NOT_ABLE_PREMIUM)


[style] ~364-~364: 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)


[style] ~543-~543: To form a complete sentence, be sure to include a subject.
Context: ... client sends "include_metadata": true. Should NOT be enabled in production. If produc...

(MISSING_IT_THERE)

🔇 Additional comments (4)
docs/config.html (1)

607-611: Good clarification of endpoint-scoped rlsapi_v1 settings.

The new top-level field and dedicated RlsapiV1Configuration section are clear and consistent with endpoint-specific behavior.

Also applies to: 1458-1496

docs/config.puml (1)

76-76: Configuration wiring for rlsapi_v1 looks correct.

The added field, validator method, and inheritance mapping are consistent and useful.

Also applies to: 82-82, 281-281

docs/config.json (1)

460-464: Top-level rlsapi_v1 schema reference is correctly introduced.

docs/config.md (1)

172-172: rlsapi_v1 documentation addition is clear and well-scoped.

The new section cleanly documents endpoint-specific behavior and keeps it separate from shared customization settings.

Also applies to: 531-545

Comment thread docs/config.json
Comment on lines +1193 to +1199
"quota_subject": {
"type": "string",
"nullable": true,
"default": null,
"description": "Identity field used as the quota subject for /v1/infer. When set, token quota enforcement is enabled for this endpoint. Requires quota_handlers to be configured. \"org_id\" and \"system_id\" require rh-identity authentication; falls back to user_id when rh-identity data is unavailable.",
"title": "Quota subject"
}
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.

⚠️ Potential issue | 🟠 Major

quota_subject should be constrained to supported values.

Right now this allows any string, but runtime accepts only user_id, org_id, or system_id. The OpenAPI schema should encode that constraint.

Suggested fix
           "quota_subject": {
             "type": "string",
+            "enum": [
+              "user_id",
+              "org_id",
+              "system_id"
+            ],
             "nullable": true,
             "default": null,
             "description": "Identity field used as the quota subject for /v1/infer. When set, token quota enforcement is enabled for this endpoint. Requires quota_handlers to be configured. \"org_id\" and \"system_id\" require rh-identity authentication; falls back to user_id when rh-identity data is unavailable.",
             "title": "Quota subject"
           }
📝 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
"quota_subject": {
"type": "string",
"nullable": true,
"default": null,
"description": "Identity field used as the quota subject for /v1/infer. When set, token quota enforcement is enabled for this endpoint. Requires quota_handlers to be configured. \"org_id\" and \"system_id\" require rh-identity authentication; falls back to user_id when rh-identity data is unavailable.",
"title": "Quota subject"
}
"quota_subject": {
"type": "string",
"enum": [
"user_id",
"org_id",
"system_id"
],
"nullable": true,
"default": null,
"description": "Identity field used as the quota subject for /v1/infer. When set, token quota enforcement is enabled for this endpoint. Requires quota_handlers to be configured. \"org_id\" and \"system_id\" require rh-identity authentication; falls back to user_id when rh-identity data is unavailable.",
"title": "Quota subject"
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/config.json` around lines 1193 - 1199, The quota_subject schema
currently allows any string; modify the "quota_subject" property in the config
JSON schema to restrict values to the supported set by adding an "enum":
["user_id", "org_id", "system_id"] while preserving "type": "string",
"nullable": true and "default": null and keep the existing description/title;
update the description if desired to note the allowed values so validation and
OpenAPI generation enforce only those three options.

Comment thread docs/config.md
| user_data_collection | | This section contains configuration for subsystem that collects user data(transcription history and feedbacks). |
| database | | Configuration for database to store conversation IDs and other runtime data |
| mcp_servers | array | MCP (Model Context Protocol) servers provide tools and capabilities to the AI agents. These are configured in this section. Servers can also be registered dynamically at runtime via the `POST /v1/mcp-servers` API endpoint. Only MCP servers defined in lightspeed-stack.yaml or registered via the API are available to the agents. Tools configured in the llama-stack run.yaml are not accessible to lightspeed-core agents. |
| mcp_servers | array | MCP (Model Context Protocol) servers provide tools and capabilities to the AI agents. These are configured in this section. Only MCP servers defined in the lightspeed-stack.yaml configuration are available to the agents. Tools configured in the llama-stack run.yaml are not accessible to lightspeed-core agents. |
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.

⚠️ Potential issue | 🟠 Major

MCP availability text conflicts with active runtime registration support.

The docs now state only lightspeed-stack.yaml MCP servers are available, but runtime dynamic registration via POST /v1/mcp-servers is still implemented and routed. This will mislead users about supported workflows.

Suggested fix
-| mcp_servers | array | MCP (Model Context Protocol) servers provide tools and capabilities to the AI agents. These are configured in this section. Only MCP servers defined in the lightspeed-stack.yaml configuration are available to the agents. Tools configured in the llama-stack run.yaml are not accessible to lightspeed-core agents. |
+| mcp_servers | array | MCP (Model Context Protocol) servers provide tools and capabilities to the AI agents. Servers defined in lightspeed-stack.yaml are loaded from configuration, and additional servers can be registered at runtime via the MCP server management API (authorization required). Tools configured in the llama-stack run.yaml are not accessible to lightspeed-core agents. |
-MCP (Model Context Protocol) servers provide tools and capabilities to the
-AI agents. These are configured by this structure. Only MCP servers
-defined in the lightspeed-stack.yaml configuration are available to the
-agents. Tools configured in the llama-stack run.yaml are not accessible to
-lightspeed-core agents.
+MCP (Model Context Protocol) servers provide tools and capabilities to the
+AI agents. These are configured by this structure and can also be managed
+at runtime via the MCP server management API (authorization required).
+Tools configured in the llama-stack run.yaml are not accessible to
+lightspeed-core agents.

Also applies to: 362-365

🧰 Tools
🪛 LanguageTool

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

(NOT_ABLE_PREMIUM)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/config.md` at line 162, The documentation line that claims "Only MCP
servers defined in the lightspeed-stack.yaml configuration are available to the
agents" conflicts with the runtime registration feature; update the MCP
availability text to include support for dynamic runtime registration via the
POST /v1/mcp-servers endpoint (or, if the intended behavior is to disallow
runtime registration, remove/disable that route and note the change).
Specifically, mention both static configuration (lightspeed-stack.yaml) and
dynamic registration (POST /v1/mcp-servers) as supported options for registering
MCP servers so readers aren’t misled about MCP servers availability.

Comment thread docs/config.puml
Comment on lines +211 to +213
class "RlsapiV1Configuration" as src.models.config.RlsapiV1Configuration {
allow_verbose_infer : Optional[bool]
quota_subject : Optional[Literal['user_id', 'org_id', 'system_id']]
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.

⚠️ Potential issue | 🟡 Minor

allow_verbose_infer is documented with incorrect nullability.

The diagram shows Optional[bool], but the model defines it as non-nullable bool (default False). This can mislead readers into thinking null is accepted.

Suggested fix
 class "RlsapiV1Configuration" as src.models.config.RlsapiV1Configuration {
-  allow_verbose_infer : Optional[bool]
+  allow_verbose_infer : bool
   quota_subject : Optional[Literal['user_id', 'org_id', 'system_id']]
 }
📝 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
class "RlsapiV1Configuration" as src.models.config.RlsapiV1Configuration {
allow_verbose_infer : Optional[bool]
quota_subject : Optional[Literal['user_id', 'org_id', 'system_id']]
class "RlsapiV1Configuration" as src.models.config.RlsapiV1Configuration {
allow_verbose_infer : bool
quota_subject : Optional[Literal['user_id', 'org_id', 'system_id']]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/config.puml` around lines 211 - 213, The UML docs show
allow_verbose_infer as Optional[bool] but the actual model RlsapiV1Configuration
defines allow_verbose_infer as a non-nullable bool (default False); update the
docs in docs/config.puml so the attribute for RlsapiV1Configuration reads a
plain bool (no Optional) to reflect the model's non-nullability and default.

@tisnik tisnik merged commit ef57d8b into lightspeed-core:main Apr 7, 2026
25 of 26 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