|
1424 | 1424 | "shields" |
1425 | 1425 | ], |
1426 | 1426 | "summary": "Shields Endpoint Handler", |
1427 | | - "description": "Handle requests to the /shields endpoint.\n\nProcess GET requests to the /shields endpoint, returning a list of available\nshields from the Llama Stack service.\n\n### Parameters:\n- request: The incoming HTTP request (used by middleware).\n- auth: Authentication tuple from the auth dependency (used by middleware).\n\n### Raises:\n- HTTPException: with status 401 for unauthorized access.\n- HTTPException: with status 403 if permission is denied.\n- HTTPException: with status 500 and a detail object containing `response`\n and `cause` when service configuration is wrong or incomplete.\n- HTTPException: with status 503 and a detail object containing `response`\n and `cause` when unable to connect to Llama Stack.\n\n### Returns:\n- ShieldsResponse: An object containing the list of available shields.", |
| 1427 | + "description": "Handle requests to the /shields endpoint.\n\nProcess GET requests to the /shields endpoint, returning a list of available\nshields from Lightspeed Core Stack configuration.\n\n### Parameters:\n- request: The incoming HTTP request (used by middleware).\n- auth: Authentication tuple from the auth dependency (used by middleware).\n\n### Raises:\n- HTTPException: with status 401 for unauthorized access.\n- HTTPException: with status 403 if permission is denied.\n- HTTPException: with status 500 and a detail object containing `response`\n and `cause` when service configuration is wrong or incomplete.\n\n### Returns:\n- ShieldsResponse: An object containing the list of available shields.", |
1428 | 1428 | "operationId": "shields_endpoint_handler_v1_shields_get", |
1429 | 1429 | "responses": { |
1430 | 1430 | "200": { |
|
1563 | 1563 | } |
1564 | 1564 | } |
1565 | 1565 | } |
1566 | | - }, |
1567 | | - "503": { |
1568 | | - "description": "Service unavailable", |
1569 | | - "content": { |
1570 | | - "application/json": { |
1571 | | - "schema": { |
1572 | | - "$ref": "#/components/schemas/ServiceUnavailableResponse" |
1573 | | - }, |
1574 | | - "examples": { |
1575 | | - "ogx": { |
1576 | | - "value": { |
1577 | | - "detail": { |
1578 | | - "cause": "Connection error while trying to reach backend service.", |
1579 | | - "response": "Unable to connect to OGX" |
1580 | | - } |
1581 | | - } |
1582 | | - }, |
1583 | | - "kubernetes api": { |
1584 | | - "value": { |
1585 | | - "detail": { |
1586 | | - "cause": "Failed to connect to Kubernetes API: Service Unavailable (status 503)", |
1587 | | - "response": "Unable to connect to Kubernetes API" |
1588 | | - } |
1589 | | - } |
1590 | | - } |
1591 | | - } |
1592 | | - } |
1593 | | - } |
1594 | 1566 | } |
1595 | 1567 | } |
1596 | 1568 | } |
|
12269 | 12241 | "title": "Model Context Protocol Server and tools configuration", |
12270 | 12242 | "description": "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." |
12271 | 12243 | }, |
| 12244 | + "shields": { |
| 12245 | + "items": { |
| 12246 | + "$ref": "#/components/schemas/ShieldConfiguration" |
| 12247 | + }, |
| 12248 | + "type": "array", |
| 12249 | + "title": "Shields configuration", |
| 12250 | + "description": "Safety shields owned by Lightspeed Core Stack. Mirrors the former Llama Stack registered_resources.shields entries. Configured shields are listed by the /shields endpoint and applied via LCORE capabilities (not the Llama Stack Safety API)." |
| 12251 | + }, |
12272 | 12252 | "authentication": { |
12273 | 12253 | "$ref": "#/components/schemas/AuthenticationConfiguration", |
12274 | 12254 | "title": "Authentication configuration", |
|
19897 | 19877 | } |
19898 | 19878 | ] |
19899 | 19879 | }, |
| 19880 | + "ShieldConfiguration": { |
| 19881 | + "properties": { |
| 19882 | + "shield_id": { |
| 19883 | + "type": "string", |
| 19884 | + "minLength": 1, |
| 19885 | + "title": "Shield ID", |
| 19886 | + "description": "Static shield capability identifier. Supported values: lightspeed_pii_redaction, lightspeed_question_validity." |
| 19887 | + }, |
| 19888 | + "provider_id": { |
| 19889 | + "type": "string", |
| 19890 | + "minLength": 1, |
| 19891 | + "title": "Provider ID", |
| 19892 | + "description": "Shield provider identification." |
| 19893 | + }, |
| 19894 | + "provider_shield_id": { |
| 19895 | + "type": "string", |
| 19896 | + "minLength": 1, |
| 19897 | + "title": "Provider shield ID", |
| 19898 | + "description": "Provider-specific shield resource identifier. For 'lightspeed_question_validity' this is the model id used by the guardrail." |
| 19899 | + }, |
| 19900 | + "params": { |
| 19901 | + "additionalProperties": true, |
| 19902 | + "type": "object", |
| 19903 | + "title": "Shield parameters", |
| 19904 | + "description": "Optional capability-specific shield parameters." |
| 19905 | + } |
| 19906 | + }, |
| 19907 | + "additionalProperties": false, |
| 19908 | + "type": "object", |
| 19909 | + "required": [ |
| 19910 | + "shield_id", |
| 19911 | + "provider_id", |
| 19912 | + "provider_shield_id" |
| 19913 | + ], |
| 19914 | + "title": "ShieldConfiguration", |
| 19915 | + "description": "Shield resource configuration owned by Lightspeed Core Stack.\n\nMirrors the former Llama Stack / OGX ``registered_resources.shields``\nentry. Shields are configured in ``lightspeed-stack.yaml`` and consumed\nby LCORE Pydantic AI capabilities, not registered with the Llama Stack\nSafety API.\n\n``shield_id`` must be one of the supported capability IDs:\n``lightspeed_question_validity`` or ``lightspeed_pii_redaction``.\n\nAttributes:\n shield_id: Static capability identifier (see ``SUPPORTED_SHIELD_IDS``).\n provider_id: Shield provider identification (typically matches shield_id).\n provider_shield_id: Provider resource id; for question-validity this is\n the model id used by the guard.\n params: Capability-specific parameters (prompt overrides for question\n validity; ``rules`` / ``case_sensitive`` for PII redaction)." |
| 19916 | + }, |
19900 | 19917 | "ShieldsResponse": { |
19901 | 19918 | "properties": { |
19902 | 19919 | "shields": { |
|
0 commit comments