LCORE-1356: Updated config docs#1470
Conversation
WalkthroughConfiguration schema restructuring moves Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify 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. Comment |
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
docs/config.svgis excluded by!**/*.svg
📒 Files selected for processing (4)
docs/config.htmldocs/config.jsondocs/config.mddocs/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.jsondocs/config.htmldocs/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-scopedrlsapi_v1settings.The new top-level field and dedicated
RlsapiV1Configurationsection are clear and consistent with endpoint-specific behavior.Also applies to: 1458-1496
docs/config.puml (1)
76-76:Configurationwiring forrlsapi_v1looks 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-levelrlsapi_v1schema reference is correctly introduced.docs/config.md (1)
172-172:rlsapi_v1documentation 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
| "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" | ||
| } |
There was a problem hiding this comment.
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.
| "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.
| | 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. | |
There was a problem hiding this comment.
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.
| class "RlsapiV1Configuration" as src.models.config.RlsapiV1Configuration { | ||
| allow_verbose_infer : Optional[bool] | ||
| quota_subject : Optional[Literal['user_id', 'org_id', 'system_id']] |
There was a problem hiding this comment.
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.
| 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.
Description
LCORE-1356: Updated config docs
Type of change
Tools used to create PR
Related Tickets & Documents
Summary by CodeRabbit
/inferendpoint withallow_verbose_inferoption to control extended metadata output andquota_subjectoption for token quota enforcement.allow_verbose_infersetting from global customization to endpoint-specific configuration.