Skip to content

Commit ade5b5d

Browse files
authored
Merge pull request lightspeed-core#928 from major/rlsapi-v1
RSPEED-2229: Add rlsapi v1 endpoint registration and CLA documentation
2 parents 692f5ff + 802b169 commit ade5b5d

4 files changed

Lines changed: 397 additions & 2 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: RHEL Lightspeed CLA Configuration Example
2+
# Example configuration for RHEL Lightspeed Command Line Assistant (CLA)
3+
# deployments using the rlsapi v1 /infer endpoint.
4+
#
5+
# The rlsapi v1 endpoint provides stateless inference without conversation
6+
# history or RAG. It is designed for the RHEL Lightspeed CLI tool.
7+
service:
8+
host: localhost
9+
port: 8080
10+
auth_enabled: true
11+
workers: 1
12+
color_log: true
13+
access_log: true
14+
llama_stack:
15+
use_as_library_client: false
16+
url: http://localhost:8321
17+
inference:
18+
# Configure the default model for rlsapi v1 inference
19+
# Provider ID must match the provider_id in your Llama Stack config
20+
default_provider: google-vertex
21+
default_model: gemini-2.5-flash
22+
23+
# Red Hat Identity authentication (typical for CLA deployments)
24+
authentication:
25+
module: "rh-identity"
26+
rh_identity_config:
27+
required_entitlements: ["rhel"]
28+
29+
# Authorization configuration for CLA
30+
# Grant rlsapi_v1_infer to all authenticated users
31+
authorization:
32+
access_rules:
33+
- role: "*"
34+
actions: ["info", "rlsapi_v1_infer"]
35+
# Optional: Add admin role for full access
36+
# - role: "admin"
37+
# actions: ["admin"]

src/app/routers.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
tools,
2121
# V2 endpoints for Response API support
2222
query_v2,
23+
# RHEL Lightspeed rlsapi v1 compatibility
24+
rlsapi_v1,
2325
)
2426

2527

@@ -49,6 +51,9 @@ def include_routers(app: FastAPI) -> None:
4951
# Note: query_v2, streaming_query_v2, and conversations_v3 are now exposed at /v1 above
5052
# The old query, streaming_query, and conversations modules are deprecated
5153

54+
# RHEL Lightspeed rlsapi v1 compatibility - stateless CLA (Command Line Assistant) endpoint
55+
app.include_router(rlsapi_v1.router, prefix="/v1")
56+
5257
# road-core does not version these endpoints
5358
app.include_router(health.router)
5459
app.include_router(authorized.router)

0 commit comments

Comments
 (0)