lightspeed-stack 0.4.2__tar.gz → 0.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lightspeed_stack-0.6.0/PKG-INFO +1700 -0
- lightspeed_stack-0.6.0/README.md +1445 -0
- lightspeed_stack-0.6.0/pyproject.toml +231 -0
- lightspeed_stack-0.6.0/src/a2a_storage/__init__.py +23 -0
- lightspeed_stack-0.6.0/src/a2a_storage/postgres_context_store.py +143 -0
- lightspeed_stack-0.6.0/src/a2a_storage/sqlite_context_store.py +144 -0
- lightspeed_stack-0.6.0/src/a2a_storage/storage_factory.py +184 -0
- lightspeed_stack-0.6.0/src/app/database.py +211 -0
- lightspeed_stack-0.6.0/src/app/endpoints/README.md +83 -0
- lightspeed_stack-0.6.0/src/app/endpoints/TODO +6 -0
- lightspeed_stack-0.6.0/src/app/endpoints/a2a.py +1045 -0
- lightspeed_stack-0.6.0/src/app/endpoints/a2a_openapi.py +32 -0
- lightspeed_stack-0.6.0/src/app/endpoints/authorized.py +51 -0
- lightspeed_stack-0.6.0/src/app/endpoints/config.py +74 -0
- lightspeed_stack-0.6.0/src/app/endpoints/conversations_v1.py +543 -0
- lightspeed_stack-0.6.0/src/app/endpoints/conversations_v2.py +285 -0
- lightspeed_stack-0.6.0/src/app/endpoints/feedback.py +248 -0
- lightspeed_stack-0.6.0/src/app/endpoints/health.py +255 -0
- lightspeed_stack-0.6.0/src/app/endpoints/info.py +89 -0
- lightspeed_stack-0.6.0/src/app/endpoints/mcp_auth.py +94 -0
- lightspeed_stack-0.6.0/src/app/endpoints/mcp_servers.py +245 -0
- lightspeed_stack-0.6.0/src/app/endpoints/metrics.py +65 -0
- lightspeed_stack-0.6.0/src/app/endpoints/models.py +147 -0
- lightspeed_stack-0.6.0/src/app/endpoints/prompts.py +397 -0
- lightspeed_stack-0.6.0/src/app/endpoints/providers.py +174 -0
- lightspeed_stack-0.6.0/src/app/endpoints/query.py +397 -0
- lightspeed_stack-0.6.0/src/app/endpoints/rags.py +212 -0
- lightspeed_stack-0.6.0/src/app/endpoints/responses.py +1191 -0
- lightspeed_stack-0.6.0/src/app/endpoints/responses_telemetry.py +162 -0
- lightspeed_stack-0.6.0/src/app/endpoints/rlsapi_v1.py +817 -0
- lightspeed_stack-0.6.0/src/app/endpoints/root.py +820 -0
- lightspeed_stack-0.6.0/src/app/endpoints/shields.py +91 -0
- lightspeed_stack-0.6.0/src/app/endpoints/stream_interrupt.py +92 -0
- lightspeed_stack-0.6.0/src/app/endpoints/streaming_query.py +953 -0
- lightspeed_stack-0.6.0/src/app/endpoints/tools.py +266 -0
- lightspeed_stack-0.6.0/src/app/endpoints/vector_stores.py +860 -0
- lightspeed_stack-0.6.0/src/app/main.py +304 -0
- lightspeed_stack-0.6.0/src/app/routers.py +79 -0
- lightspeed_stack-0.6.0/src/authentication/README.md +32 -0
- lightspeed_stack-0.6.0/src/authentication/__init__.py +94 -0
- lightspeed_stack-0.6.0/src/authentication/api_key_token.py +92 -0
- lightspeed_stack-0.6.0/src/authentication/interface.py +48 -0
- lightspeed_stack-0.6.0/src/authentication/jwk_token.py +279 -0
- lightspeed_stack-0.6.0/src/authentication/k8s.py +518 -0
- lightspeed_stack-0.6.0/src/authentication/noop.py +59 -0
- lightspeed_stack-0.6.0/src/authentication/noop_with_token.py +73 -0
- lightspeed_stack-0.6.0/src/authentication/rh_identity.py +452 -0
- lightspeed_stack-0.6.0/src/authentication/trusted_proxy.py +127 -0
- lightspeed_stack-0.6.0/src/authentication/utils.py +35 -0
- lightspeed_stack-0.6.0/src/authorization/azure_token_manager.py +123 -0
- lightspeed_stack-0.6.0/src/authorization/middleware.py +199 -0
- lightspeed_stack-0.6.0/src/authorization/resolvers.py +375 -0
- lightspeed_stack-0.6.0/src/cache/README.md +29 -0
- lightspeed_stack-0.6.0/src/cache/cache.py +249 -0
- lightspeed_stack-0.6.0/src/cache/cache_entry.py +35 -0
- lightspeed_stack-0.6.0/src/cache/cache_factory.py +54 -0
- lightspeed_stack-0.6.0/src/cache/in_memory_cache.py +241 -0
- lightspeed_stack-0.6.0/src/cache/noop_cache.py +214 -0
- lightspeed_stack-0.6.0/src/cache/postgres_cache.py +747 -0
- lightspeed_stack-0.6.0/src/cache/sqlite_cache.py +712 -0
- lightspeed_stack-0.6.0/src/data/README.md +5 -0
- lightspeed_stack-0.6.0/src/data/__init__.py +8 -0
- lightspeed_stack-0.6.0/src/data/default_run.yaml +131 -0
- lightspeed_stack-0.6.0/src/metrics/README.md +11 -0
- lightspeed_stack-0.6.0/src/metrics/__init__.py +90 -0
- lightspeed_stack-0.6.0/src/metrics/recording.py +174 -0
- lightspeed_stack-0.6.0/src/metrics/utils.py +58 -0
- lightspeed_stack-0.6.0/src/models/README.md +11 -0
- lightspeed_stack-0.6.0/src/models/__init__.py +11 -0
- lightspeed_stack-0.6.0/src/models/api/README.md +5 -0
- lightspeed_stack-0.6.0/src/models/api/__init__.py +5 -0
- lightspeed_stack-0.6.0/src/models/api/requests/README.md +32 -0
- lightspeed_stack-0.6.0/src/models/api/requests/__init__.py +44 -0
- lightspeed_stack-0.6.0/src/models/api/requests/catalog.py +20 -0
- lightspeed_stack-0.6.0/src/models/api/requests/conversations.py +22 -0
- lightspeed_stack-0.6.0/src/models/api/requests/feedback.py +204 -0
- lightspeed_stack-0.6.0/src/models/api/requests/mcp_servers.py +154 -0
- lightspeed_stack-0.6.0/src/models/api/requests/prompts.py +86 -0
- lightspeed_stack-0.6.0/src/models/api/requests/query.py +253 -0
- lightspeed_stack-0.6.0/src/models/api/requests/responses_openai.py +175 -0
- lightspeed_stack-0.6.0/src/models/api/requests/rlsapi.py +245 -0
- lightspeed_stack-0.6.0/src/models/api/requests/vector_stores.py +215 -0
- lightspeed_stack-0.6.0/src/models/api/responses/README.md +8 -0
- lightspeed_stack-0.6.0/src/models/api/responses/__init__.py +5 -0
- lightspeed_stack-0.6.0/src/models/api/responses/constants.py +34 -0
- lightspeed_stack-0.6.0/src/models/api/responses/error/README.md +38 -0
- lightspeed_stack-0.6.0/src/models/api/responses/error/__init__.py +32 -0
- lightspeed_stack-0.6.0/src/models/api/responses/error/bad_request.py +51 -0
- lightspeed_stack-0.6.0/src/models/api/responses/error/bases.py +94 -0
- lightspeed_stack-0.6.0/src/models/api/responses/error/conflict.py +120 -0
- lightspeed_stack-0.6.0/src/models/api/responses/error/content_too_large.py +148 -0
- lightspeed_stack-0.6.0/src/models/api/responses/error/forbidden.py +198 -0
- lightspeed_stack-0.6.0/src/models/api/responses/error/internal.py +211 -0
- lightspeed_stack-0.6.0/src/models/api/responses/error/not_found.py +111 -0
- lightspeed_stack-0.6.0/src/models/api/responses/error/service_unavailable.py +51 -0
- lightspeed_stack-0.6.0/src/models/api/responses/error/too_many_requests.py +114 -0
- lightspeed_stack-0.6.0/src/models/api/responses/error/unauthorized.py +98 -0
- lightspeed_stack-0.6.0/src/models/api/responses/error/unprocessable_entity.py +55 -0
- lightspeed_stack-0.6.0/src/models/api/responses/successful/README.md +41 -0
- lightspeed_stack-0.6.0/src/models/api/responses/successful/__init__.py +103 -0
- lightspeed_stack-0.6.0/src/models/api/responses/successful/bases.py +84 -0
- lightspeed_stack-0.6.0/src/models/api/responses/successful/catalog.py +258 -0
- lightspeed_stack-0.6.0/src/models/api/responses/successful/configuration.py +94 -0
- lightspeed_stack-0.6.0/src/models/api/responses/successful/conversations.py +219 -0
- lightspeed_stack-0.6.0/src/models/api/responses/successful/feedback.py +58 -0
- lightspeed_stack-0.6.0/src/models/api/responses/successful/mcp_servers.py +148 -0
- lightspeed_stack-0.6.0/src/models/api/responses/successful/probes.py +220 -0
- lightspeed_stack-0.6.0/src/models/api/responses/successful/prompts.py +119 -0
- lightspeed_stack-0.6.0/src/models/api/responses/successful/query.py +243 -0
- lightspeed_stack-0.6.0/src/models/api/responses/successful/responses_openai.py +210 -0
- lightspeed_stack-0.6.0/src/models/api/responses/successful/rlsapi.py +93 -0
- lightspeed_stack-0.6.0/src/models/api/responses/successful/vector_stores.py +303 -0
- lightspeed_stack-0.6.0/src/models/common/README.md +29 -0
- lightspeed_stack-0.6.0/src/models/common/__init__.py +58 -0
- lightspeed_stack-0.6.0/src/models/common/agents/README.md +11 -0
- lightspeed_stack-0.6.0/src/models/common/agents/__init__.py +39 -0
- lightspeed_stack-0.6.0/src/models/common/agents/stream_payloads.py +270 -0
- lightspeed_stack-0.6.0/src/models/common/agents/turn_accumulator.py +46 -0
- lightspeed_stack-0.6.0/src/models/common/conversation.py +166 -0
- lightspeed_stack-0.6.0/src/models/common/feedback.py +19 -0
- lightspeed_stack-0.6.0/src/models/common/health.py +58 -0
- lightspeed_stack-0.6.0/src/models/common/mcp.py +33 -0
- lightspeed_stack-0.6.0/src/models/common/moderation.py +29 -0
- lightspeed_stack-0.6.0/src/models/common/query.py +139 -0
- lightspeed_stack-0.6.0/src/models/common/responses/README.md +17 -0
- lightspeed_stack-0.6.0/src/models/common/responses/__init__.py +25 -0
- lightspeed_stack-0.6.0/src/models/common/responses/contexts.py +112 -0
- lightspeed_stack-0.6.0/src/models/common/responses/responses_api_params.py +170 -0
- lightspeed_stack-0.6.0/src/models/common/responses/responses_conversation_context.py +33 -0
- lightspeed_stack-0.6.0/src/models/common/responses/types.py +78 -0
- lightspeed_stack-0.6.0/src/models/common/transcripts.py +31 -0
- lightspeed_stack-0.6.0/src/models/common/turn_summary.py +152 -0
- lightspeed_stack-0.6.0/src/models/compaction.py +70 -0
- lightspeed_stack-0.6.0/src/models/config.py +2828 -0
- lightspeed_stack-0.6.0/src/models/database/conversations.py +73 -0
- lightspeed_stack-0.6.0/src/observability/README.md +97 -0
- lightspeed_stack-0.6.0/src/observability/__init__.py +26 -0
- lightspeed_stack-0.6.0/src/observability/formats/README.md +11 -0
- lightspeed_stack-0.6.0/src/observability/formats/__init__.py +15 -0
- lightspeed_stack-0.6.0/src/observability/formats/responses.py +50 -0
- lightspeed_stack-0.6.0/src/observability/formats/rlsapi.py +58 -0
- lightspeed_stack-0.6.0/src/observability/splunk.py +147 -0
- lightspeed_stack-0.6.0/src/pydantic_ai_lightspeed/README.md +5 -0
- lightspeed_stack-0.6.0/src/pydantic_ai_lightspeed/__init__.py +1 -0
- lightspeed_stack-0.6.0/src/pydantic_ai_lightspeed/capabilities/README.md +5 -0
- lightspeed_stack-0.6.0/src/pydantic_ai_lightspeed/capabilities/__init__.py +10 -0
- lightspeed_stack-0.6.0/src/pydantic_ai_lightspeed/capabilities/question_validity/README.md +8 -0
- lightspeed_stack-0.6.0/src/pydantic_ai_lightspeed/capabilities/question_validity/__init__.py +7 -0
- lightspeed_stack-0.6.0/src/pydantic_ai_lightspeed/capabilities/question_validity/_capability.py +151 -0
- lightspeed_stack-0.6.0/src/pydantic_ai_lightspeed/capabilities/redaction/__init__.py +21 -0
- lightspeed_stack-0.6.0/src/pydantic_ai_lightspeed/capabilities/redaction/capability.py +323 -0
- lightspeed_stack-0.6.0/src/pydantic_ai_lightspeed/capabilities/redaction/core.py +53 -0
- lightspeed_stack-0.6.0/src/pydantic_ai_lightspeed/llamastack/README.md +14 -0
- lightspeed_stack-0.6.0/src/pydantic_ai_lightspeed/llamastack/__init__.py +6 -0
- lightspeed_stack-0.6.0/src/pydantic_ai_lightspeed/llamastack/_model.py +309 -0
- lightspeed_stack-0.6.0/src/pydantic_ai_lightspeed/llamastack/_provider.py +123 -0
- lightspeed_stack-0.6.0/src/pydantic_ai_lightspeed/llamastack/_transport.py +205 -0
- lightspeed_stack-0.6.0/src/quota/cluster_quota_limiter.py +49 -0
- lightspeed_stack-0.6.0/src/quota/connect_pg.py +53 -0
- lightspeed_stack-0.6.0/src/quota/connect_sqlite.py +40 -0
- lightspeed_stack-0.6.0/src/quota/quota_exceed_error.py +55 -0
- lightspeed_stack-0.6.0/src/quota/quota_limiter.py +195 -0
- lightspeed_stack-0.6.0/src/quota/quota_limiter_factory.py +93 -0
- lightspeed_stack-0.6.0/src/quota/revokable_quota_limiter.py +376 -0
- lightspeed_stack-0.6.0/src/quota/token_usage_history.py +202 -0
- lightspeed_stack-0.6.0/src/quota/user_quota_limiter.py +51 -0
- lightspeed_stack-0.6.0/src/runners/quota_scheduler.py +398 -0
- lightspeed_stack-0.6.0/src/runners/uvicorn.py +46 -0
- lightspeed_stack-0.6.0/src/telemetry/configuration_snapshot.py +548 -0
- lightspeed_stack-0.6.0/src/utils/README.md +98 -0
- lightspeed_stack-0.6.0/src/utils/agents/README.md +11 -0
- lightspeed_stack-0.6.0/src/utils/agents/query.py +334 -0
- lightspeed_stack-0.6.0/src/utils/agents/streaming.py +560 -0
- lightspeed_stack-0.6.0/src/utils/agents/tool_processor.py +529 -0
- lightspeed_stack-0.6.0/src/utils/checks.py +155 -0
- lightspeed_stack-0.6.0/src/utils/common.py +143 -0
- lightspeed_stack-0.6.0/src/utils/compaction.py +402 -0
- lightspeed_stack-0.6.0/src/utils/connection_decorator.py +77 -0
- lightspeed_stack-0.6.0/src/utils/conversation_compaction.py +710 -0
- lightspeed_stack-0.6.0/src/utils/conversations.py +529 -0
- lightspeed_stack-0.6.0/src/utils/degraded_mode.py +60 -0
- lightspeed_stack-0.6.0/src/utils/endpoints.py +626 -0
- lightspeed_stack-0.6.0/src/utils/llama_stack_version.py +130 -0
- lightspeed_stack-0.6.0/src/utils/markdown_repair.py +280 -0
- lightspeed_stack-0.6.0/src/utils/mcp_auth_headers.py +102 -0
- lightspeed_stack-0.6.0/src/utils/mcp_headers.py +258 -0
- lightspeed_stack-0.6.0/src/utils/mcp_oauth_probe.py +127 -0
- lightspeed_stack-0.6.0/src/utils/prompts.py +102 -0
- lightspeed_stack-0.6.0/src/utils/pydantic_ai.py +256 -0
- lightspeed_stack-0.6.0/src/utils/query.py +582 -0
- lightspeed_stack-0.6.0/src/utils/quota.py +125 -0
- lightspeed_stack-0.6.0/src/utils/reranker.py +205 -0
- lightspeed_stack-0.6.0/src/utils/responses.py +1930 -0
- lightspeed_stack-0.6.0/src/utils/rh_identity.py +39 -0
- lightspeed_stack-0.6.0/src/utils/schema_dumper.py +100 -0
- lightspeed_stack-0.6.0/src/utils/shields.py +296 -0
- lightspeed_stack-0.6.0/src/utils/stream_interrupts.py +393 -0
- lightspeed_stack-0.6.0/src/utils/streaming_sse.py +259 -0
- lightspeed_stack-0.6.0/src/utils/suid.py +140 -0
- lightspeed_stack-0.6.0/src/utils/token_counter.py +40 -0
- lightspeed_stack-0.6.0/src/utils/token_estimator.py +170 -0
- lightspeed_stack-0.6.0/src/utils/tool_formatter.py +168 -0
- lightspeed_stack-0.6.0/src/utils/transcripts.py +168 -0
- lightspeed_stack-0.6.0/src/utils/types.py +55 -0
- lightspeed_stack-0.6.0/src/utils/vector_search.py +848 -0
- lightspeed_stack-0.6.0/tests/benchmarks/conftest.py +127 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data/js_10000_lines.js +10000 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data/js_1000_lines.js +1000 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data/js_100_lines.js +100 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data/js_10_lines.js +10 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data/json_10000_lines.json +10000 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data/json_1000_lines.json +1000 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data/json_100_lines.json +100 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data/json_10_lines.json +10 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data/python_10000_lines.py +10000 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data/python_1000_lines.py +1000 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data/python_100_lines.py +100 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data/python_10_lines.py +10 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data/xml_10000_lines.xml +10000 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data/xml_1000_lines.xml +1000 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data/xml_100_lines.xml +100 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data/xml_10_lines.xml +10 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data/yaml_10000_lines.yml +10000 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data/yaml_1000_lines.yml +1000 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data/yaml_100_lines.yml +100 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data/yaml_10_lines.yml +10 -0
- lightspeed_stack-0.6.0/tests/benchmarks/data_generators.py +160 -0
- lightspeed_stack-0.6.0/tests/benchmarks/db_benchmarks.py +357 -0
- lightspeed_stack-0.6.0/tests/benchmarks/test_app_database.py +857 -0
- lightspeed_stack-0.6.0/tests/benchmarks/test_app_database_comparison.py +144 -0
- lightspeed_stack-0.6.0/tests/benchmarks/test_token_estimator.py +437 -0
- lightspeed_stack-0.6.0/tests/configuration/lightspeed-stack-proper-name.yaml +44 -0
- lightspeed_stack-0.6.0/tests/e2e/configs/run-azure.yaml +162 -0
- lightspeed_stack-0.6.0/tests/e2e/configs/run-bedrock.yaml +160 -0
- lightspeed_stack-0.6.0/tests/e2e/configs/run-ci.yaml +151 -0
- lightspeed_stack-0.6.0/tests/e2e/configs/run-rhaiis.yaml +162 -0
- lightspeed_stack-0.6.0/tests/e2e/configs/run-rhelai.yaml +162 -0
- lightspeed_stack-0.6.0/tests/e2e/configs/run-vertexai.yaml +157 -0
- lightspeed_stack-0.6.0/tests/e2e/configs/run-watsonx.yaml +158 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/library-mode/lightspeed-stack-auth-noop-token.yaml +41 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/library-mode/lightspeed-stack-byok-pdf.yaml +45 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/library-mode/lightspeed-stack-inline-rag.yaml +40 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/library-mode/lightspeed-stack-invalid-mcp-file-auth.yaml +24 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/library-mode/lightspeed-stack-mcp-auth.yaml +25 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/library-mode/lightspeed-stack-mcp-client-auth.yaml +24 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/library-mode/lightspeed-stack-mcp-file-auth.yaml +24 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/library-mode/lightspeed-stack-mcp-kubernetes-auth.yaml +24 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/library-mode/lightspeed-stack-mcp-oauth-auth.yaml +24 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/library-mode/lightspeed-stack-mcp.yaml +36 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/library-mode/lightspeed-stack-skills-directory.yaml +25 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/library-mode/lightspeed-stack-skills.yaml +25 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/library-mode/lightspeed-stack.yaml +34 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/server-mode/lightspeed-stack-auth-noop-token.yaml +47 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/server-mode/lightspeed-stack-degraded-mode.yaml +25 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/server-mode/lightspeed-stack-inline-rag.yaml +41 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/server-mode/lightspeed-stack-invalid-mcp-file-auth.yaml +25 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/server-mode/lightspeed-stack-mcp-auth.yaml +26 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/server-mode/lightspeed-stack-mcp-client-auth.yaml +25 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/server-mode/lightspeed-stack-mcp-file-auth.yaml +25 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/server-mode/lightspeed-stack-mcp-kubernetes-auth.yaml +25 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/server-mode/lightspeed-stack-mcp-oauth-auth.yaml +25 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/server-mode/lightspeed-stack-mcp.yaml +37 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/server-mode/lightspeed-stack-rbac.yaml +96 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/server-mode/lightspeed-stack-rhelai.yaml +35 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/server-mode/lightspeed-stack-skills-directory.yaml +26 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/server-mode/lightspeed-stack-skills.yaml +26 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/server-mode/lightspeed-stack-tls.yaml +22 -0
- lightspeed_stack-0.6.0/tests/e2e/configuration/server-mode/lightspeed-stack.yaml +35 -0
- lightspeed_stack-0.6.0/tests/e2e/features/authorized_noop.feature +56 -0
- lightspeed_stack-0.6.0/tests/e2e/features/authorized_noop_token.feature +35 -0
- lightspeed_stack-0.6.0/tests/e2e/features/authorized_rh_identity.feature +147 -0
- lightspeed_stack-0.6.0/tests/e2e/features/byok_pdf.feature +52 -0
- lightspeed_stack-0.6.0/tests/e2e/features/conversation_cache_v2.feature +268 -0
- lightspeed_stack-0.6.0/tests/e2e/features/conversations.feature +127 -0
- lightspeed_stack-0.6.0/tests/e2e/features/degraded_mode_startup.feature +40 -0
- lightspeed_stack-0.6.0/tests/e2e/features/environment.py +546 -0
- lightspeed_stack-0.6.0/tests/e2e/features/faiss.feature +33 -0
- lightspeed_stack-0.6.0/tests/e2e/features/feedback.feature +368 -0
- lightspeed_stack-0.6.0/tests/e2e/features/health.feature +47 -0
- lightspeed_stack-0.6.0/tests/e2e/features/http_401_unauthorized.feature +514 -0
- lightspeed_stack-0.6.0/tests/e2e/features/info.feature +80 -0
- lightspeed_stack-0.6.0/tests/e2e/features/inline_rag.feature +71 -0
- lightspeed_stack-0.6.0/tests/e2e/features/llama_stack_disrupted.feature +294 -0
- lightspeed_stack-0.6.0/tests/e2e/features/mcp.feature +586 -0
- lightspeed_stack-0.6.0/tests/e2e/features/mcp_servers_api.feature +133 -0
- lightspeed_stack-0.6.0/tests/e2e/features/mcp_servers_api_auth.feature +31 -0
- lightspeed_stack-0.6.0/tests/e2e/features/mcp_servers_api_no_config.feature +23 -0
- lightspeed_stack-0.6.0/tests/e2e/features/models.feature +33 -0
- lightspeed_stack-0.6.0/tests/e2e/features/opentelemetry.feature +29 -0
- lightspeed_stack-0.6.0/tests/e2e/features/prompts.feature +233 -0
- lightspeed_stack-0.6.0/tests/e2e/features/proxy.feature +116 -0
- lightspeed_stack-0.6.0/tests/e2e/features/query.feature +171 -0
- lightspeed_stack-0.6.0/tests/e2e/features/rbac.feature +126 -0
- lightspeed_stack-0.6.0/tests/e2e/features/responses.feature +550 -0
- lightspeed_stack-0.6.0/tests/e2e/features/responses_streaming.feature +432 -0
- lightspeed_stack-0.6.0/tests/e2e/features/rest_api.feature +17 -0
- lightspeed_stack-0.6.0/tests/e2e/features/rlsapi_v1.feature +57 -0
- lightspeed_stack-0.6.0/tests/e2e/features/rlsapi_v1_errors.feature +36 -0
- lightspeed_stack-0.6.0/tests/e2e/features/skills.feature +766 -0
- lightspeed_stack-0.6.0/tests/e2e/features/smoketests.feature +18 -0
- lightspeed_stack-0.6.0/tests/e2e/features/steps/README.md +59 -0
- lightspeed_stack-0.6.0/tests/e2e/features/steps/auth.py +194 -0
- lightspeed_stack-0.6.0/tests/e2e/features/steps/common.py +218 -0
- lightspeed_stack-0.6.0/tests/e2e/features/steps/common_http.py +347 -0
- lightspeed_stack-0.6.0/tests/e2e/features/steps/conversation.py +412 -0
- lightspeed_stack-0.6.0/tests/e2e/features/steps/feedback.py +174 -0
- lightspeed_stack-0.6.0/tests/e2e/features/steps/health.py +110 -0
- lightspeed_stack-0.6.0/tests/e2e/features/steps/info.py +192 -0
- lightspeed_stack-0.6.0/tests/e2e/features/steps/llm_query_response.py +407 -0
- lightspeed_stack-0.6.0/tests/e2e/features/steps/models.py +114 -0
- lightspeed_stack-0.6.0/tests/e2e/features/steps/place_holder.py +17 -0
- lightspeed_stack-0.6.0/tests/e2e/features/steps/prompts.py +167 -0
- lightspeed_stack-0.6.0/tests/e2e/features/steps/proxy.py +626 -0
- lightspeed_stack-0.6.0/tests/e2e/features/steps/rbac.py +44 -0
- lightspeed_stack-0.6.0/tests/e2e/features/steps/responses_steps.py +80 -0
- lightspeed_stack-0.6.0/tests/e2e/features/steps/rlsapi_v1.py +65 -0
- lightspeed_stack-0.6.0/tests/e2e/features/steps/shields.py +37 -0
- lightspeed_stack-0.6.0/tests/e2e/features/steps/tls.py +402 -0
- lightspeed_stack-0.6.0/tests/e2e/features/steps/token_counters.py +211 -0
- lightspeed_stack-0.6.0/tests/e2e/features/streaming_query.feature +158 -0
- lightspeed_stack-0.6.0/tests/e2e/features/tls-ca.feature +80 -0
- lightspeed_stack-0.6.0/tests/e2e/features/tls-mtls.feature +80 -0
- lightspeed_stack-0.6.0/tests/e2e/features/tls-tlsv13.feature +58 -0
- lightspeed_stack-0.6.0/tests/e2e/features/unified-mode-boot.feature +116 -0
- lightspeed_stack-0.6.0/tests/e2e/features/unified-mode-legacy.feature +39 -0
- lightspeed_stack-0.6.0/tests/e2e/features/unified-mode-migration.feature +53 -0
- lightspeed_stack-0.6.0/tests/e2e/features/unified-mode-synthesis.feature +59 -0
- lightspeed_stack-0.6.0/tests/e2e/features/unified-mode-validation.feature +25 -0
- lightspeed_stack-0.6.0/tests/e2e/features/vector_stores.feature +45 -0
- lightspeed_stack-0.6.0/tests/e2e/mock_jwks_server/generate_tokens.py +85 -0
- lightspeed_stack-0.6.0/tests/e2e/mock_jwks_server/server.py +66 -0
- lightspeed_stack-0.6.0/tests/e2e/mock_mcp_server/Dockerfile +5 -0
- lightspeed_stack-0.6.0/tests/e2e/mock_mcp_server/README.md +5 -0
- lightspeed_stack-0.6.0/tests/e2e/mock_mcp_server/server.py +123 -0
- lightspeed_stack-0.6.0/tests/e2e/mock_tls_inference_server/Dockerfile +14 -0
- lightspeed_stack-0.6.0/tests/e2e/mock_tls_inference_server/README.md +5 -0
- lightspeed_stack-0.6.0/tests/e2e/mock_tls_inference_server/server.py +382 -0
- lightspeed_stack-0.6.0/tests/e2e/patches/README.md +2 -0
- lightspeed_stack-0.6.0/tests/e2e/patches/docker-compose-mcp-volumes-selinux.patch +26 -0
- lightspeed_stack-0.6.0/tests/e2e/proxy/README.md +11 -0
- lightspeed_stack-0.6.0/tests/e2e/proxy/__init__.py +1 -0
- lightspeed_stack-0.6.0/tests/e2e/proxy/interception_proxy.py +331 -0
- lightspeed_stack-0.6.0/tests/e2e/proxy/tunnel_proxy.py +263 -0
- lightspeed_stack-0.6.0/tests/e2e/rag/README.md +45 -0
- lightspeed_stack-0.6.0/tests/e2e/rag/pdf_kv_store.db +0 -0
- lightspeed_stack-0.6.0/tests/e2e/rag/sources/README.md +2 -0
- lightspeed_stack-0.6.0/tests/e2e/rag/sources/lightspeed-field-notes.pdf +45 -0
- lightspeed_stack-0.6.0/tests/e2e/secrets/README.md +18 -0
- lightspeed_stack-0.6.0/tests/e2e/secrets/invalid-mcp-token +1 -0
- lightspeed_stack-0.6.0/tests/e2e/skills/echo/SKILL.md +19 -0
- lightspeed_stack-0.6.0/tests/e2e/skills/echo/references/guide.md +19 -0
- lightspeed_stack-0.6.0/tests/e2e/skills/summarize/SKILL.md +21 -0
- lightspeed_stack-0.6.0/tests/e2e/skills/summarize/references/guide.md +20 -0
- lightspeed_stack-0.6.0/tests/e2e/test_list.txt +40 -0
- lightspeed_stack-0.6.0/tests/e2e/utils/README.md +17 -0
- lightspeed_stack-0.6.0/tests/e2e/utils/llama_config_utils.py +121 -0
- lightspeed_stack-0.6.0/tests/e2e/utils/llama_prow_utils.py +41 -0
- lightspeed_stack-0.6.0/tests/e2e/utils/llama_stack_utils.py +160 -0
- lightspeed_stack-0.6.0/tests/e2e/utils/prow_utils.py +300 -0
- lightspeed_stack-0.6.0/tests/e2e/utils/utils.py +552 -0
- lightspeed_stack-0.6.0/tests/e2e-prow/rhoai/.e2e_exit_code +1 -0
- lightspeed_stack-0.6.0/tests/e2e-prow/rhoai/manifests/lightspeed/e2e-interception-proxy.yaml +77 -0
- lightspeed_stack-0.6.0/tests/e2e-prow/rhoai/manifests/lightspeed/e2e-mock-tls-inference.yaml +104 -0
- lightspeed_stack-0.6.0/tests/e2e-prow/rhoai/manifests/lightspeed/e2e-tunnel-proxy.yaml +69 -0
- lightspeed_stack-0.6.0/tests/e2e-prow/rhoai/manifests/lightspeed/lightspeed-stack.yaml +79 -0
- lightspeed_stack-0.6.0/tests/e2e-prow/rhoai/manifests/lightspeed/llama-stack-openai.yaml +269 -0
- lightspeed_stack-0.6.0/tests/e2e-prow/rhoai/manifests/lightspeed/llama-stack-prow.yaml +200 -0
- lightspeed_stack-0.6.0/tests/e2e-prow/rhoai/manifests/lightspeed/mock-jwks.yaml +56 -0
- lightspeed_stack-0.6.0/tests/e2e-prow/rhoai/manifests/lightspeed/mock-mcp.yaml +56 -0
- lightspeed_stack-0.6.0/tests/e2e-prow/rhoai/manifests/operators/ds-cluster.yaml +16 -0
- lightspeed_stack-0.6.0/tests/e2e-prow/rhoai/manifests/vllm/vllm-runtime-cpu.yaml +65 -0
- lightspeed_stack-0.6.0/tests/e2e-prow/rhoai/manifests/vllm/vllm-runtime-gpu.yaml +82 -0
- lightspeed_stack-0.6.0/tests/e2e-prow/rhoai/pipeline-konflux.sh +449 -0
- lightspeed_stack-0.6.0/tests/e2e-prow/rhoai/pipeline-services-konflux.sh +61 -0
- lightspeed_stack-0.6.0/tests/e2e-prow/rhoai/pipeline-services.sh +30 -0
- lightspeed_stack-0.6.0/tests/e2e-prow/rhoai/pipeline.sh +492 -0
- lightspeed_stack-0.6.0/tests/e2e-prow/rhoai/run-tests.sh +75 -0
- lightspeed_stack-0.6.0/tests/e2e-prow/rhoai/scripts/bootstrap.sh +102 -0
- lightspeed_stack-0.6.0/tests/e2e-prow/rhoai/scripts/e2e-ops.sh +1084 -0
- lightspeed_stack-0.6.0/tests/integration/README.md +524 -0
- lightspeed_stack-0.6.0/tests/integration/conftest.py +824 -0
- lightspeed_stack-0.6.0/tests/integration/container_lifecycle/README.md +5 -0
- lightspeed_stack-0.6.0/tests/integration/container_lifecycle/test_container_lifecycle.py +628 -0
- lightspeed_stack-0.6.0/tests/integration/endpoints/README.md +56 -0
- lightspeed_stack-0.6.0/tests/integration/endpoints/test_authorized_endpoint.py +35 -0
- lightspeed_stack-0.6.0/tests/integration/endpoints/test_config_integration.py +90 -0
- lightspeed_stack-0.6.0/tests/integration/endpoints/test_conversations_v1_integration.py +827 -0
- lightspeed_stack-0.6.0/tests/integration/endpoints/test_conversations_v2_integration.py +815 -0
- lightspeed_stack-0.6.0/tests/integration/endpoints/test_health_integration.py +195 -0
- lightspeed_stack-0.6.0/tests/integration/endpoints/test_info_integration.py +159 -0
- lightspeed_stack-0.6.0/tests/integration/endpoints/test_model_list.py +212 -0
- lightspeed_stack-0.6.0/tests/integration/endpoints/test_query_byok_integration.py +1312 -0
- lightspeed_stack-0.6.0/tests/integration/endpoints/test_query_integration.py +1530 -0
- lightspeed_stack-0.6.0/tests/integration/endpoints/test_responses_byok_integration.py +716 -0
- lightspeed_stack-0.6.0/tests/integration/endpoints/test_responses_integration.py +374 -0
- lightspeed_stack-0.6.0/tests/integration/endpoints/test_rlsapi_v1_integration.py +555 -0
- lightspeed_stack-0.6.0/tests/integration/endpoints/test_root_endpoint.py +75 -0
- lightspeed_stack-0.6.0/tests/integration/endpoints/test_stream_interrupt_integration.py +84 -0
- lightspeed_stack-0.6.0/tests/integration/endpoints/test_streaming_query_byok_integration.py +1082 -0
- lightspeed_stack-0.6.0/tests/integration/endpoints/test_streaming_query_integration.py +317 -0
- lightspeed_stack-0.6.0/tests/integration/endpoints/test_tools_integration.py +107 -0
- lightspeed_stack-0.6.0/tests/integration/test_configuration.py +94 -0
- lightspeed_stack-0.6.0/tests/integration/test_middleware_integration.py +34 -0
- lightspeed_stack-0.6.0/tests/integration/test_openapi_json.py +416 -0
- lightspeed_stack-0.6.0/tests/integration/test_rh_identity_integration.py +183 -0
- lightspeed_stack-0.6.0/tests/unit/README.md +35 -0
- lightspeed_stack-0.6.0/tests/unit/__init__.py +41 -0
- lightspeed_stack-0.6.0/tests/unit/a2a_storage/test_storage_factory.py +178 -0
- lightspeed_stack-0.6.0/tests/unit/app/README.md +14 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/README.md +83 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/conftest.py +43 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_a2a.py +961 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_authorized.py +86 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_config.py +74 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_conversations.py +2164 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_conversations_v2.py +977 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_feedback.py +551 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_health.py +396 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_mcp_auth.py +339 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_mcp_servers.py +542 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_metrics.py +43 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_models.py +474 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_prompts.py +385 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_query.py +815 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_rags.py +391 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_responses.py +2869 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_responses_splunk.py +814 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_rlsapi_v1.py +1619 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_shields.py +498 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_stream_interrupt.py +227 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_streaming_query.py +2707 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_tools.py +1179 -0
- lightspeed_stack-0.6.0/tests/unit/app/endpoints/test_vector_stores.py +1283 -0
- lightspeed_stack-0.6.0/tests/unit/app/test_database.py +406 -0
- lightspeed_stack-0.6.0/tests/unit/app/test_main_middleware.py +243 -0
- lightspeed_stack-0.6.0/tests/unit/app/test_routers.py +185 -0
- lightspeed_stack-0.6.0/tests/unit/authentication/README.md +32 -0
- lightspeed_stack-0.6.0/tests/unit/authentication/test_api_key_token.py +139 -0
- lightspeed_stack-0.6.0/tests/unit/authentication/test_auth.py +52 -0
- lightspeed_stack-0.6.0/tests/unit/authentication/test_jwk_token.py +927 -0
- lightspeed_stack-0.6.0/tests/unit/authentication/test_k8s.py +1137 -0
- lightspeed_stack-0.6.0/tests/unit/authentication/test_noop.py +59 -0
- lightspeed_stack-0.6.0/tests/unit/authentication/test_noop_with_token.py +148 -0
- lightspeed_stack-0.6.0/tests/unit/authentication/test_rh_identity.py +1058 -0
- lightspeed_stack-0.6.0/tests/unit/authentication/test_trusted_proxy.py +507 -0
- lightspeed_stack-0.6.0/tests/unit/authentication/test_utils.py +43 -0
- lightspeed_stack-0.6.0/tests/unit/authorization/test_azure_token_manager.py +177 -0
- lightspeed_stack-0.6.0/tests/unit/authorization/test_middleware.py +407 -0
- lightspeed_stack-0.6.0/tests/unit/authorization/test_resolvers.py +467 -0
- lightspeed_stack-0.6.0/tests/unit/cache/README.md +20 -0
- lightspeed_stack-0.6.0/tests/unit/cache/test_cache_factory.py +265 -0
- lightspeed_stack-0.6.0/tests/unit/cache/test_in_memory_cache.py +70 -0
- lightspeed_stack-0.6.0/tests/unit/cache/test_noop_cache.py +292 -0
- lightspeed_stack-0.6.0/tests/unit/cache/test_postgres_cache.py +1129 -0
- lightspeed_stack-0.6.0/tests/unit/cache/test_sqlite_cache.py +821 -0
- lightspeed_stack-0.6.0/tests/unit/conftest.py +144 -0
- lightspeed_stack-0.6.0/tests/unit/metrics/README.md +11 -0
- lightspeed_stack-0.6.0/tests/unit/metrics/test_recording.py +236 -0
- lightspeed_stack-0.6.0/tests/unit/metrics/test_utis.py +75 -0
- lightspeed_stack-0.6.0/tests/unit/models/README.md +8 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/README.md +86 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_a2a_state_configuration.py +117 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_approvals_configuration.py +121 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_authentication_configuration.py +616 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_byok_rag.py +269 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_compaction_configuration.py +111 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_conversation_history.py +279 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_customization.py +104 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_database_configuration.py +95 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_dump_configuration.py +2586 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_in_memory_cache_configuration.py +31 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_inference_configuration.py +160 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_jwt_role_rule.py +157 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_llama_stack_configuration.py +313 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_model_context_protocol_server.py +405 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_postgresql_database_configuration.py +311 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_quota_handlers_config.py +750 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_quota_limiter_config.py +408 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_quota_scheduler_config.py +173 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_rag_configuration.py +91 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_reranker_configuration.py +53 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_rlsapi_v1_configuration.py +169 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_service_configuration.py +60 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_skills_configuration.py +49 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_splunk_configuration.py +126 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_tls_configuration.py +229 -0
- lightspeed_stack-0.6.0/tests/unit/models/config/test_user_data_collection.py +101 -0
- lightspeed_stack-0.6.0/tests/unit/models/requests/README.md +23 -0
- lightspeed_stack-0.6.0/tests/unit/models/requests/__init__.py +1 -0
- lightspeed_stack-0.6.0/tests/unit/models/requests/test_attachment.py +38 -0
- lightspeed_stack-0.6.0/tests/unit/models/requests/test_feedback_request.py +218 -0
- lightspeed_stack-0.6.0/tests/unit/models/requests/test_feedback_status_update_request.py +23 -0
- lightspeed_stack-0.6.0/tests/unit/models/requests/test_query_request.py +149 -0
- lightspeed_stack-0.6.0/tests/unit/models/requests/test_responses_request.py +57 -0
- lightspeed_stack-0.6.0/tests/unit/models/requests/test_vector_store_requests.py +248 -0
- lightspeed_stack-0.6.0/tests/unit/models/responses/README.md +26 -0
- lightspeed_stack-0.6.0/tests/unit/models/responses/test_authorized_response.py +46 -0
- lightspeed_stack-0.6.0/tests/unit/models/responses/test_error_responses.py +825 -0
- lightspeed_stack-0.6.0/tests/unit/models/responses/test_query_response.py +95 -0
- lightspeed_stack-0.6.0/tests/unit/models/responses/test_rag_chunk.py +199 -0
- lightspeed_stack-0.6.0/tests/unit/models/responses/test_response_types.py +87 -0
- lightspeed_stack-0.6.0/tests/unit/models/responses/test_successful_responses.py +1304 -0
- lightspeed_stack-0.6.0/tests/unit/models/responses/test_types.py +95 -0
- lightspeed_stack-0.6.0/tests/unit/models/rlsapi/test_requests.py +681 -0
- lightspeed_stack-0.6.0/tests/unit/models/rlsapi/test_responses.py +176 -0
- lightspeed_stack-0.6.0/tests/unit/models/test_compaction.py +76 -0
- lightspeed_stack-0.6.0/tests/unit/observability/formats/README.md +11 -0
- lightspeed_stack-0.6.0/tests/unit/observability/formats/test_responses.py +162 -0
- lightspeed_stack-0.6.0/tests/unit/observability/formats/test_rlsapi.py +103 -0
- lightspeed_stack-0.6.0/tests/unit/observability/test_splunk.py +318 -0
- lightspeed_stack-0.6.0/tests/unit/pydantic_ai_lightspeed/README.md +5 -0
- lightspeed_stack-0.6.0/tests/unit/pydantic_ai_lightspeed/__init__.py +1 -0
- lightspeed_stack-0.6.0/tests/unit/pydantic_ai_lightspeed/capabilities/README.md +5 -0
- lightspeed_stack-0.6.0/tests/unit/pydantic_ai_lightspeed/capabilities/__init__.py +1 -0
- lightspeed_stack-0.6.0/tests/unit/pydantic_ai_lightspeed/capabilities/question_validity/README.md +8 -0
- lightspeed_stack-0.6.0/tests/unit/pydantic_ai_lightspeed/capabilities/question_validity/__init__.py +1 -0
- lightspeed_stack-0.6.0/tests/unit/pydantic_ai_lightspeed/capabilities/question_validity/test_capability.py +571 -0
- lightspeed_stack-0.6.0/tests/unit/pydantic_ai_lightspeed/capabilities/redaction/__init__.py +1 -0
- lightspeed_stack-0.6.0/tests/unit/pydantic_ai_lightspeed/capabilities/redaction/test_capability.py +316 -0
- lightspeed_stack-0.6.0/tests/unit/pydantic_ai_lightspeed/capabilities/redaction/test_config.py +157 -0
- lightspeed_stack-0.6.0/tests/unit/pydantic_ai_lightspeed/capabilities/redaction/test_core.py +153 -0
- lightspeed_stack-0.6.0/tests/unit/pydantic_ai_lightspeed/llamastack/README.md +11 -0
- lightspeed_stack-0.6.0/tests/unit/pydantic_ai_lightspeed/llamastack/__init__.py +1 -0
- lightspeed_stack-0.6.0/tests/unit/pydantic_ai_lightspeed/llamastack/test_provider.py +156 -0
- lightspeed_stack-0.6.0/tests/unit/pydantic_ai_lightspeed/llamastack/test_transport.py +344 -0
- lightspeed_stack-0.6.0/tests/unit/quota/test_cluster_quota_limiter.py +195 -0
- lightspeed_stack-0.6.0/tests/unit/quota/test_connect_pg.py +70 -0
- lightspeed_stack-0.6.0/tests/unit/quota/test_connect_sqlite.py +26 -0
- lightspeed_stack-0.6.0/tests/unit/quota/test_quota_limiter_factory.py +283 -0
- lightspeed_stack-0.6.0/tests/unit/quota/test_user_quota_limiter.py +180 -0
- lightspeed_stack-0.6.0/tests/unit/runners/test_uvicorn_runner.py +198 -0
- lightspeed_stack-0.6.0/tests/unit/telemetry/conftest.py +390 -0
- lightspeed_stack-0.6.0/tests/unit/telemetry/test_configuration_snapshot.py +727 -0
- lightspeed_stack-0.6.0/tests/unit/test_client.py +383 -0
- lightspeed_stack-0.6.0/tests/unit/test_configuration.py +3941 -0
- lightspeed_stack-0.6.0/tests/unit/test_degraded_mode.py +59 -0
- lightspeed_stack-0.6.0/tests/unit/test_lightspeed_stack.py +16 -0
- lightspeed_stack-0.6.0/tests/unit/test_llama_stack_configuration.py +892 -0
- lightspeed_stack-0.6.0/tests/unit/test_llama_stack_synthesize.py +371 -0
- lightspeed_stack-0.6.0/tests/unit/test_log.py +115 -0
- lightspeed_stack-0.6.0/tests/unit/test_sentry.py +186 -0
- lightspeed_stack-0.6.0/tests/unit/utils/README.md +86 -0
- lightspeed_stack-0.6.0/tests/unit/utils/agents/README.md +11 -0
- lightspeed_stack-0.6.0/tests/unit/utils/agents/test_query.py +499 -0
- lightspeed_stack-0.6.0/tests/unit/utils/agents/test_streaming.py +1146 -0
- lightspeed_stack-0.6.0/tests/unit/utils/agents/test_tool_processor.py +637 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_checks.py +238 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_common.py +414 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_compaction.py +597 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_conversation_compaction.py +668 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_conversations.py +857 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_endpoints.py +547 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_llama_stack_version.py +158 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_markdown_repair.py +518 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_mcp_auth_headers.py +124 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_mcp_headers.py +457 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_prompts.py +335 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_pydantic_ai.py +409 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_query.py +757 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_responses.py +3574 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_rh_identity.py +74 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_schema_dumper.py +520 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_shields.py +632 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_stream_interrupts.py +193 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_streaming_sse.py +277 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_suid.py +155 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_token_estimator.py +245 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_tool_formatter.py +76 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_transcripts.py +153 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_types.py +268 -0
- lightspeed_stack-0.6.0/tests/unit/utils/test_vector_search.py +1384 -0
- lightspeed_stack-0.4.2/PKG-INFO +0 -1657
- lightspeed_stack-0.4.2/README.md +0 -1409
- lightspeed_stack-0.4.2/pyproject.toml +0 -212
- lightspeed_stack-0.4.2/src/a2a_storage/__init__.py +0 -23
- lightspeed_stack-0.4.2/src/a2a_storage/postgres_context_store.py +0 -143
- lightspeed_stack-0.4.2/src/a2a_storage/sqlite_context_store.py +0 -144
- lightspeed_stack-0.4.2/src/a2a_storage/storage_factory.py +0 -185
- lightspeed_stack-0.4.2/src/app/database.py +0 -205
- lightspeed_stack-0.4.2/src/app/endpoints/README.md +0 -62
- lightspeed_stack-0.4.2/src/app/endpoints/a2a.py +0 -895
- lightspeed_stack-0.4.2/src/app/endpoints/authorized.py +0 -43
- lightspeed_stack-0.4.2/src/app/endpoints/config.py +0 -61
- lightspeed_stack-0.4.2/src/app/endpoints/conversations_v1.py +0 -555
- lightspeed_stack-0.4.2/src/app/endpoints/conversations_v2.py +0 -283
- lightspeed_stack-0.4.2/src/app/endpoints/feedback.py +0 -236
- lightspeed_stack-0.4.2/src/app/endpoints/health.py +0 -157
- lightspeed_stack-0.4.2/src/app/endpoints/info.py +0 -82
- lightspeed_stack-0.4.2/src/app/endpoints/mcp_auth.py +0 -92
- lightspeed_stack-0.4.2/src/app/endpoints/metrics.py +0 -68
- lightspeed_stack-0.4.2/src/app/endpoints/models.py +0 -141
- lightspeed_stack-0.4.2/src/app/endpoints/providers.py +0 -160
- lightspeed_stack-0.4.2/src/app/endpoints/query.py +0 -338
- lightspeed_stack-0.4.2/src/app/endpoints/rags.py +0 -195
- lightspeed_stack-0.4.2/src/app/endpoints/rlsapi_v1.py +0 -501
- lightspeed_stack-0.4.2/src/app/endpoints/root.py +0 -808
- lightspeed_stack-0.4.2/src/app/endpoints/shields.py +0 -82
- lightspeed_stack-0.4.2/src/app/endpoints/stream_interrupt.py +0 -91
- lightspeed_stack-0.4.2/src/app/endpoints/streaming_query.py +0 -950
- lightspeed_stack-0.4.2/src/app/endpoints/tools.py +0 -214
- lightspeed_stack-0.4.2/src/app/main.py +0 -233
- lightspeed_stack-0.4.2/src/app/routers.py +0 -71
- lightspeed_stack-0.4.2/src/authentication/README.md +0 -29
- lightspeed_stack-0.4.2/src/authentication/__init__.py +0 -84
- lightspeed_stack-0.4.2/src/authentication/api_key_token.py +0 -74
- lightspeed_stack-0.4.2/src/authentication/interface.py +0 -48
- lightspeed_stack-0.4.2/src/authentication/jwk_token.py +0 -250
- lightspeed_stack-0.4.2/src/authentication/k8s.py +0 -351
- lightspeed_stack-0.4.2/src/authentication/noop.py +0 -56
- lightspeed_stack-0.4.2/src/authentication/noop_with_token.py +0 -69
- lightspeed_stack-0.4.2/src/authentication/rh_identity.py +0 -277
- lightspeed_stack-0.4.2/src/authentication/utils.py +0 -31
- lightspeed_stack-0.4.2/src/authorization/azure_token_manager.py +0 -102
- lightspeed_stack-0.4.2/src/authorization/middleware.py +0 -192
- lightspeed_stack-0.4.2/src/authorization/resolvers.py +0 -357
- lightspeed_stack-0.4.2/src/cache/README.md +0 -26
- lightspeed_stack-0.4.2/src/cache/cache.py +0 -165
- lightspeed_stack-0.4.2/src/cache/cache_factory.py +0 -54
- lightspeed_stack-0.4.2/src/cache/in_memory_cache.py +0 -163
- lightspeed_stack-0.4.2/src/cache/noop_cache.py +0 -143
- lightspeed_stack-0.4.2/src/cache/postgres_cache.py +0 -547
- lightspeed_stack-0.4.2/src/cache/sqlite_cache.py +0 -523
- lightspeed_stack-0.4.2/src/metrics/README.md +0 -8
- lightspeed_stack-0.4.2/src/metrics/__init__.py +0 -55
- lightspeed_stack-0.4.2/src/metrics/utils.py +0 -64
- lightspeed_stack-0.4.2/src/models/README.md +0 -20
- lightspeed_stack-0.4.2/src/models/__init__.py +0 -1
- lightspeed_stack-0.4.2/src/models/cache_entry.py +0 -29
- lightspeed_stack-0.4.2/src/models/config.py +0 -1970
- lightspeed_stack-0.4.2/src/models/context.py +0 -48
- lightspeed_stack-0.4.2/src/models/database/conversations.py +0 -68
- lightspeed_stack-0.4.2/src/models/requests.py +0 -733
- lightspeed_stack-0.4.2/src/models/responses.py +0 -2345
- lightspeed_stack-0.4.2/src/models/rlsapi/README.md +0 -11
- lightspeed_stack-0.4.2/src/models/rlsapi/__init__.py +0 -1
- lightspeed_stack-0.4.2/src/models/rlsapi/requests.py +0 -234
- lightspeed_stack-0.4.2/src/models/rlsapi/responses.py +0 -54
- lightspeed_stack-0.4.2/src/observability/README.md +0 -97
- lightspeed_stack-0.4.2/src/observability/__init__.py +0 -14
- lightspeed_stack-0.4.2/src/observability/formats/README.md +0 -8
- lightspeed_stack-0.4.2/src/observability/formats/__init__.py +0 -9
- lightspeed_stack-0.4.2/src/observability/formats/rlsapi.py +0 -57
- lightspeed_stack-0.4.2/src/observability/splunk.py +0 -90
- lightspeed_stack-0.4.2/src/quota/cluster_quota_limiter.py +0 -47
- lightspeed_stack-0.4.2/src/quota/connect_pg.py +0 -49
- lightspeed_stack-0.4.2/src/quota/connect_sqlite.py +0 -37
- lightspeed_stack-0.4.2/src/quota/quota_exceed_error.py +0 -53
- lightspeed_stack-0.4.2/src/quota/quota_limiter.py +0 -193
- lightspeed_stack-0.4.2/src/quota/quota_limiter_factory.py +0 -89
- lightspeed_stack-0.4.2/src/quota/revokable_quota_limiter.py +0 -360
- lightspeed_stack-0.4.2/src/quota/token_usage_history.py +0 -201
- lightspeed_stack-0.4.2/src/quota/user_quota_limiter.py +0 -49
- lightspeed_stack-0.4.2/src/runners/quota_scheduler.py +0 -384
- lightspeed_stack-0.4.2/src/runners/uvicorn.py +0 -38
- lightspeed_stack-0.4.2/src/telemetry/configuration_snapshot.py +0 -525
- lightspeed_stack-0.4.2/src/utils/README.md +0 -68
- lightspeed_stack-0.4.2/src/utils/checks.py +0 -146
- lightspeed_stack-0.4.2/src/utils/common.py +0 -140
- lightspeed_stack-0.4.2/src/utils/connection_decorator.py +0 -49
- lightspeed_stack-0.4.2/src/utils/conversations.py +0 -425
- lightspeed_stack-0.4.2/src/utils/endpoints.py +0 -460
- lightspeed_stack-0.4.2/src/utils/llama_stack_version.py +0 -99
- lightspeed_stack-0.4.2/src/utils/mcp_auth_headers.py +0 -99
- lightspeed_stack-0.4.2/src/utils/mcp_headers.py +0 -123
- lightspeed_stack-0.4.2/src/utils/mcp_oauth_probe.py +0 -101
- lightspeed_stack-0.4.2/src/utils/prompts.py +0 -95
- lightspeed_stack-0.4.2/src/utils/query.py +0 -524
- lightspeed_stack-0.4.2/src/utils/quota.py +0 -117
- lightspeed_stack-0.4.2/src/utils/responses.py +0 -1170
- lightspeed_stack-0.4.2/src/utils/schema_dumper.py +0 -85
- lightspeed_stack-0.4.2/src/utils/shields.py +0 -272
- lightspeed_stack-0.4.2/src/utils/stream_interrupts.py +0 -141
- lightspeed_stack-0.4.2/src/utils/suid.py +0 -105
- lightspeed_stack-0.4.2/src/utils/token_counter.py +0 -39
- lightspeed_stack-0.4.2/src/utils/tool_formatter.py +0 -133
- lightspeed_stack-0.4.2/src/utils/transcripts.py +0 -161
- lightspeed_stack-0.4.2/src/utils/types.py +0 -362
- lightspeed_stack-0.4.2/src/utils/vector_search.py +0 -627
- lightspeed_stack-0.4.2/tests/benchmarks/conftest.py +0 -119
- lightspeed_stack-0.4.2/tests/benchmarks/data_generators.py +0 -159
- lightspeed_stack-0.4.2/tests/benchmarks/db_benchmarks.py +0 -333
- lightspeed_stack-0.4.2/tests/benchmarks/test_app_database.py +0 -761
- lightspeed_stack-0.4.2/tests/benchmarks/test_app_database_comparison.py +0 -132
- lightspeed_stack-0.4.2/tests/configuration/lightspeed-stack-proper-name.yaml +0 -44
- lightspeed_stack-0.4.2/tests/e2e/.pdm-python +0 -1
- lightspeed_stack-0.4.2/tests/e2e/configs/run-azure.yaml +0 -163
- lightspeed_stack-0.4.2/tests/e2e/configs/run-ci.yaml +0 -164
- lightspeed_stack-0.4.2/tests/e2e/configs/run-rhaiis.yaml +0 -163
- lightspeed_stack-0.4.2/tests/e2e/configs/run-rhelai.yaml +0 -164
- lightspeed_stack-0.4.2/tests/e2e/configs/run-vertexai.yaml +0 -159
- lightspeed_stack-0.4.2/tests/e2e/configs/run-watsonx.yaml +0 -170
- lightspeed_stack-0.4.2/tests/e2e/configuration/library-mode/lightspeed-stack-auth-noop-token.yaml +0 -28
- lightspeed_stack-0.4.2/tests/e2e/configuration/library-mode/lightspeed-stack-mcp-file-auth.yaml +0 -25
- lightspeed_stack-0.4.2/tests/e2e/configuration/library-mode/lightspeed-stack-mcp.yaml +0 -25
- lightspeed_stack-0.4.2/tests/e2e/configuration/library-mode/lightspeed-stack.yaml +0 -39
- lightspeed_stack-0.4.2/tests/e2e/configuration/server-mode/lightspeed-stack-auth-noop-token.yaml +0 -34
- lightspeed_stack-0.4.2/tests/e2e/configuration/server-mode/lightspeed-stack-auth-rh-identity.yaml +0 -25
- lightspeed_stack-0.4.2/tests/e2e/configuration/server-mode/lightspeed-stack-invalid-feedback-storage.yaml +0 -25
- lightspeed_stack-0.4.2/tests/e2e/configuration/server-mode/lightspeed-stack-mcp-file-auth.yaml +0 -26
- lightspeed_stack-0.4.2/tests/e2e/configuration/server-mode/lightspeed-stack-mcp.yaml +0 -26
- lightspeed_stack-0.4.2/tests/e2e/configuration/server-mode/lightspeed-stack-no-cache.yaml +0 -27
- lightspeed_stack-0.4.2/tests/e2e/configuration/server-mode/lightspeed-stack-rbac.yaml +0 -96
- lightspeed_stack-0.4.2/tests/e2e/configuration/server-mode/lightspeed-stack.yaml +0 -40
- lightspeed_stack-0.4.2/tests/e2e/features/authorized_noop.feature +0 -56
- lightspeed_stack-0.4.2/tests/e2e/features/authorized_noop_token.feature +0 -82
- lightspeed_stack-0.4.2/tests/e2e/features/authorized_rh_identity.feature +0 -163
- lightspeed_stack-0.4.2/tests/e2e/features/conversation_cache_v2.feature +0 -409
- lightspeed_stack-0.4.2/tests/e2e/features/conversations.feature +0 -208
- lightspeed_stack-0.4.2/tests/e2e/features/environment.py +0 -432
- lightspeed_stack-0.4.2/tests/e2e/features/faiss.feature +0 -55
- lightspeed_stack-0.4.2/tests/e2e/features/feedback.feature +0 -359
- lightspeed_stack-0.4.2/tests/e2e/features/health.feature +0 -64
- lightspeed_stack-0.4.2/tests/e2e/features/info.feature +0 -121
- lightspeed_stack-0.4.2/tests/e2e/features/mcp.feature +0 -168
- lightspeed_stack-0.4.2/tests/e2e/features/mcp_file_auth.feature +0 -20
- lightspeed_stack-0.4.2/tests/e2e/features/models.feature +0 -40
- lightspeed_stack-0.4.2/tests/e2e/features/query.feature +0 -235
- lightspeed_stack-0.4.2/tests/e2e/features/rbac.feature +0 -155
- lightspeed_stack-0.4.2/tests/e2e/features/rest_api.feature +0 -12
- lightspeed_stack-0.4.2/tests/e2e/features/rlsapi_v1.feature +0 -89
- lightspeed_stack-0.4.2/tests/e2e/features/rlsapi_v1_errors.feature +0 -49
- lightspeed_stack-0.4.2/tests/e2e/features/smoketests.feature +0 -13
- lightspeed_stack-0.4.2/tests/e2e/features/steps/README.md +0 -35
- lightspeed_stack-0.4.2/tests/e2e/features/steps/auth.py +0 -191
- lightspeed_stack-0.4.2/tests/e2e/features/steps/common.py +0 -38
- lightspeed_stack-0.4.2/tests/e2e/features/steps/common_http.py +0 -412
- lightspeed_stack-0.4.2/tests/e2e/features/steps/conversation.py +0 -356
- lightspeed_stack-0.4.2/tests/e2e/features/steps/feedback.py +0 -147
- lightspeed_stack-0.4.2/tests/e2e/features/steps/health.py +0 -74
- lightspeed_stack-0.4.2/tests/e2e/features/steps/info.py +0 -191
- lightspeed_stack-0.4.2/tests/e2e/features/steps/llm_query_response.py +0 -269
- lightspeed_stack-0.4.2/tests/e2e/features/steps/models.py +0 -115
- lightspeed_stack-0.4.2/tests/e2e/features/steps/rbac.py +0 -43
- lightspeed_stack-0.4.2/tests/e2e/features/steps/rlsapi_v1.py +0 -65
- lightspeed_stack-0.4.2/tests/e2e/features/steps/token_counters.py +0 -206
- lightspeed_stack-0.4.2/tests/e2e/features/streaming_query.feature +0 -195
- lightspeed_stack-0.4.2/tests/e2e/mock_jwks_server/generate_tokens.py +0 -85
- lightspeed_stack-0.4.2/tests/e2e/mock_jwks_server/server.py +0 -66
- lightspeed_stack-0.4.2/tests/e2e/mock_mcp_server/Dockerfile +0 -5
- lightspeed_stack-0.4.2/tests/e2e/mock_mcp_server/server.py +0 -117
- lightspeed_stack-0.4.2/tests/e2e/rag/README.md +0 -2
- lightspeed_stack-0.4.2/tests/e2e/test_list.txt +0 -19
- lightspeed_stack-0.4.2/tests/e2e/utils/README.md +0 -5
- lightspeed_stack-0.4.2/tests/e2e/utils/llama_stack_shields.py +0 -104
- lightspeed_stack-0.4.2/tests/e2e/utils/prow_utils.py +0 -217
- lightspeed_stack-0.4.2/tests/e2e/utils/utils.py +0 -291
- lightspeed_stack-0.4.2/tests/e2e-prow/rhoai/configs/lightspeed-stack-auth-noop-token.yaml +0 -31
- lightspeed_stack-0.4.2/tests/e2e-prow/rhoai/configs/lightspeed-stack-rbac.yaml +0 -94
- lightspeed_stack-0.4.2/tests/e2e-prow/rhoai/configs/lightspeed-stack.yaml +0 -43
- lightspeed_stack-0.4.2/tests/e2e-prow/rhoai/manifests/lightspeed/lightspeed-stack.yaml +0 -25
- lightspeed_stack-0.4.2/tests/e2e-prow/rhoai/manifests/lightspeed/llama-stack.yaml +0 -63
- lightspeed_stack-0.4.2/tests/e2e-prow/rhoai/manifests/lightspeed/mcp-mock-server.yaml +0 -50
- lightspeed_stack-0.4.2/tests/e2e-prow/rhoai/manifests/lightspeed/mock-jwks.yaml +0 -46
- lightspeed_stack-0.4.2/tests/e2e-prow/rhoai/manifests/operators/ds-cluster.yaml +0 -17
- lightspeed_stack-0.4.2/tests/e2e-prow/rhoai/manifests/vllm/vllm-runtime-cpu.yaml +0 -65
- lightspeed_stack-0.4.2/tests/e2e-prow/rhoai/manifests/vllm/vllm-runtime-gpu.yaml +0 -82
- lightspeed_stack-0.4.2/tests/e2e-prow/rhoai/pipeline-services.sh +0 -27
- lightspeed_stack-0.4.2/tests/e2e-prow/rhoai/pipeline.sh +0 -365
- lightspeed_stack-0.4.2/tests/e2e-prow/rhoai/run-tests.sh +0 -50
- lightspeed_stack-0.4.2/tests/e2e-prow/rhoai/scripts/bootstrap.sh +0 -96
- lightspeed_stack-0.4.2/tests/e2e-prow/rhoai/scripts/e2e-ops.sh +0 -234
- lightspeed_stack-0.4.2/tests/integration/README.md +0 -23
- lightspeed_stack-0.4.2/tests/integration/conftest.py +0 -191
- lightspeed_stack-0.4.2/tests/integration/endpoints/README.md +0 -23
- lightspeed_stack-0.4.2/tests/integration/endpoints/test_authorized_endpoint.py +0 -35
- lightspeed_stack-0.4.2/tests/integration/endpoints/test_config_integration.py +0 -88
- lightspeed_stack-0.4.2/tests/integration/endpoints/test_health_integration.py +0 -183
- lightspeed_stack-0.4.2/tests/integration/endpoints/test_info_integration.py +0 -152
- lightspeed_stack-0.4.2/tests/integration/endpoints/test_model_list.py +0 -256
- lightspeed_stack-0.4.2/tests/integration/endpoints/test_query_integration.py +0 -1722
- lightspeed_stack-0.4.2/tests/integration/endpoints/test_rlsapi_v1_integration.py +0 -516
- lightspeed_stack-0.4.2/tests/integration/endpoints/test_root_endpoint.py +0 -72
- lightspeed_stack-0.4.2/tests/integration/endpoints/test_stream_interrupt_integration.py +0 -66
- lightspeed_stack-0.4.2/tests/integration/endpoints/test_streaming_query_integration.py +0 -350
- lightspeed_stack-0.4.2/tests/integration/endpoints/test_tools_integration.py +0 -112
- lightspeed_stack-0.4.2/tests/integration/test_configuration.py +0 -93
- lightspeed_stack-0.4.2/tests/integration/test_middleware_integration.py +0 -34
- lightspeed_stack-0.4.2/tests/integration/test_openapi_json.py +0 -374
- lightspeed_stack-0.4.2/tests/integration/test_rh_identity_integration.py +0 -140
- lightspeed_stack-0.4.2/tests/test_results/.coverage.integration +0 -0
- lightspeed_stack-0.4.2/tests/test_results/.coverage.unit +0 -0
- lightspeed_stack-0.4.2/tests/test_results/coverage_integration.json +0 -1
- lightspeed_stack-0.4.2/tests/test_results/coverage_unit.json +0 -1
- lightspeed_stack-0.4.2/tests/test_results/junit_integration.xml +0 -1
- lightspeed_stack-0.4.2/tests/test_results/junit_unit.xml +0 -1
- lightspeed_stack-0.4.2/tests/unit/README.md +0 -26
- lightspeed_stack-0.4.2/tests/unit/__init__.py +0 -40
- lightspeed_stack-0.4.2/tests/unit/a2a_storage/test_storage_factory.py +0 -179
- lightspeed_stack-0.4.2/tests/unit/app/README.md +0 -14
- lightspeed_stack-0.4.2/tests/unit/app/endpoints/README.md +0 -62
- lightspeed_stack-0.4.2/tests/unit/app/endpoints/test_a2a.py +0 -894
- lightspeed_stack-0.4.2/tests/unit/app/endpoints/test_authorized.py +0 -86
- lightspeed_stack-0.4.2/tests/unit/app/endpoints/test_config.py +0 -72
- lightspeed_stack-0.4.2/tests/unit/app/endpoints/test_conversations.py +0 -2125
- lightspeed_stack-0.4.2/tests/unit/app/endpoints/test_conversations_v2.py +0 -967
- lightspeed_stack-0.4.2/tests/unit/app/endpoints/test_feedback.py +0 -429
- lightspeed_stack-0.4.2/tests/unit/app/endpoints/test_health.py +0 -207
- lightspeed_stack-0.4.2/tests/unit/app/endpoints/test_mcp_auth.py +0 -339
- lightspeed_stack-0.4.2/tests/unit/app/endpoints/test_metrics.py +0 -48
- lightspeed_stack-0.4.2/tests/unit/app/endpoints/test_models.py +0 -474
- lightspeed_stack-0.4.2/tests/unit/app/endpoints/test_query.py +0 -715
- lightspeed_stack-0.4.2/tests/unit/app/endpoints/test_rags.py +0 -389
- lightspeed_stack-0.4.2/tests/unit/app/endpoints/test_rlsapi_v1.py +0 -868
- lightspeed_stack-0.4.2/tests/unit/app/endpoints/test_shields.py +0 -383
- lightspeed_stack-0.4.2/tests/unit/app/endpoints/test_stream_interrupt.py +0 -150
- lightspeed_stack-0.4.2/tests/unit/app/endpoints/test_streaming_query.py +0 -2476
- lightspeed_stack-0.4.2/tests/unit/app/endpoints/test_tools.py +0 -1143
- lightspeed_stack-0.4.2/tests/unit/app/test_database.py +0 -402
- lightspeed_stack-0.4.2/tests/unit/app/test_main_middleware.py +0 -177
- lightspeed_stack-0.4.2/tests/unit/app/test_routers.py +0 -169
- lightspeed_stack-0.4.2/tests/unit/authentication/README.md +0 -29
- lightspeed_stack-0.4.2/tests/unit/authentication/test_api_key_token.py +0 -133
- lightspeed_stack-0.4.2/tests/unit/authentication/test_auth.py +0 -30
- lightspeed_stack-0.4.2/tests/unit/authentication/test_jwk_token.py +0 -863
- lightspeed_stack-0.4.2/tests/unit/authentication/test_k8s.py +0 -583
- lightspeed_stack-0.4.2/tests/unit/authentication/test_noop.py +0 -56
- lightspeed_stack-0.4.2/tests/unit/authentication/test_noop_with_token.py +0 -142
- lightspeed_stack-0.4.2/tests/unit/authentication/test_rh_identity.py +0 -549
- lightspeed_stack-0.4.2/tests/unit/authentication/test_utils.py +0 -42
- lightspeed_stack-0.4.2/tests/unit/authorization/test_azure_token_manager.py +0 -164
- lightspeed_stack-0.4.2/tests/unit/authorization/test_middleware.py +0 -370
- lightspeed_stack-0.4.2/tests/unit/authorization/test_resolvers.py +0 -447
- lightspeed_stack-0.4.2/tests/unit/cache/README.md +0 -17
- lightspeed_stack-0.4.2/tests/unit/cache/test_cache_factory.py +0 -246
- lightspeed_stack-0.4.2/tests/unit/cache/test_noop_cache.py +0 -232
- lightspeed_stack-0.4.2/tests/unit/cache/test_postgres_cache.py +0 -836
- lightspeed_stack-0.4.2/tests/unit/cache/test_sqlite_cache.py +0 -573
- lightspeed_stack-0.4.2/tests/unit/conftest.py +0 -74
- lightspeed_stack-0.4.2/tests/unit/metrics/README.md +0 -8
- lightspeed_stack-0.4.2/tests/unit/metrics/test_utis.py +0 -74
- lightspeed_stack-0.4.2/tests/unit/models/README.md +0 -5
- lightspeed_stack-0.4.2/tests/unit/models/config/README.md +0 -65
- lightspeed_stack-0.4.2/tests/unit/models/config/test_a2a_state_configuration.py +0 -118
- lightspeed_stack-0.4.2/tests/unit/models/config/test_authentication_configuration.py +0 -574
- lightspeed_stack-0.4.2/tests/unit/models/config/test_byok_rag.py +0 -168
- lightspeed_stack-0.4.2/tests/unit/models/config/test_conversation_history.py +0 -269
- lightspeed_stack-0.4.2/tests/unit/models/config/test_customization.py +0 -86
- lightspeed_stack-0.4.2/tests/unit/models/config/test_database_configuration.py +0 -87
- lightspeed_stack-0.4.2/tests/unit/models/config/test_dump_configuration.py +0 -1192
- lightspeed_stack-0.4.2/tests/unit/models/config/test_inference_configuration.py +0 -52
- lightspeed_stack-0.4.2/tests/unit/models/config/test_jwt_role_rule.py +0 -151
- lightspeed_stack-0.4.2/tests/unit/models/config/test_llama_stack_configuration.py +0 -126
- lightspeed_stack-0.4.2/tests/unit/models/config/test_model_context_protocol_server.py +0 -360
- lightspeed_stack-0.4.2/tests/unit/models/config/test_postgresql_database_configuration.py +0 -115
- lightspeed_stack-0.4.2/tests/unit/models/config/test_quota_handlers_config.py +0 -24
- lightspeed_stack-0.4.2/tests/unit/models/config/test_quota_limiter_config.py +0 -79
- lightspeed_stack-0.4.2/tests/unit/models/config/test_quota_scheduler_config.py +0 -80
- lightspeed_stack-0.4.2/tests/unit/models/config/test_rag_configuration.py +0 -93
- lightspeed_stack-0.4.2/tests/unit/models/config/test_service_configuration.py +0 -61
- lightspeed_stack-0.4.2/tests/unit/models/config/test_splunk_configuration.py +0 -115
- lightspeed_stack-0.4.2/tests/unit/models/config/test_tls_configuration.py +0 -112
- lightspeed_stack-0.4.2/tests/unit/models/config/test_user_data_collection.py +0 -89
- lightspeed_stack-0.4.2/tests/unit/models/requests/README.md +0 -17
- lightspeed_stack-0.4.2/tests/unit/models/requests/__init__.py +0 -1
- lightspeed_stack-0.4.2/tests/unit/models/requests/test_attachment.py +0 -30
- lightspeed_stack-0.4.2/tests/unit/models/requests/test_feedback_request.py +0 -212
- lightspeed_stack-0.4.2/tests/unit/models/requests/test_feedback_status_update_request.py +0 -23
- lightspeed_stack-0.4.2/tests/unit/models/requests/test_query_request.py +0 -122
- lightspeed_stack-0.4.2/tests/unit/models/responses/README.md +0 -26
- lightspeed_stack-0.4.2/tests/unit/models/responses/test_authorized_response.py +0 -46
- lightspeed_stack-0.4.2/tests/unit/models/responses/test_error_responses.py +0 -761
- lightspeed_stack-0.4.2/tests/unit/models/responses/test_query_response.py +0 -86
- lightspeed_stack-0.4.2/tests/unit/models/responses/test_rag_chunk.py +0 -194
- lightspeed_stack-0.4.2/tests/unit/models/responses/test_response_types.py +0 -83
- lightspeed_stack-0.4.2/tests/unit/models/responses/test_successful_responses.py +0 -1170
- lightspeed_stack-0.4.2/tests/unit/models/responses/test_types.py +0 -83
- lightspeed_stack-0.4.2/tests/unit/models/rlsapi/test_requests.py +0 -627
- lightspeed_stack-0.4.2/tests/unit/models/rlsapi/test_responses.py +0 -160
- lightspeed_stack-0.4.2/tests/unit/observability/formats/README.md +0 -8
- lightspeed_stack-0.4.2/tests/unit/observability/formats/test_rlsapi.py +0 -75
- lightspeed_stack-0.4.2/tests/unit/observability/test_splunk.py +0 -163
- lightspeed_stack-0.4.2/tests/unit/quota/test_cluster_quota_limiter.py +0 -173
- lightspeed_stack-0.4.2/tests/unit/quota/test_connect_pg.py +0 -56
- lightspeed_stack-0.4.2/tests/unit/quota/test_connect_sqlite.py +0 -26
- lightspeed_stack-0.4.2/tests/unit/quota/test_quota_limiter_factory.py +0 -260
- lightspeed_stack-0.4.2/tests/unit/quota/test_user_quota_limiter.py +0 -171
- lightspeed_stack-0.4.2/tests/unit/runners/test_uvicorn_runner.py +0 -185
- lightspeed_stack-0.4.2/tests/unit/telemetry/conftest.py +0 -388
- lightspeed_stack-0.4.2/tests/unit/telemetry/test_configuration_snapshot.py +0 -711
- lightspeed_stack-0.4.2/tests/unit/test_client.py +0 -160
- lightspeed_stack-0.4.2/tests/unit/test_configuration.py +0 -1077
- lightspeed_stack-0.4.2/tests/unit/test_lightspeed_stack.py +0 -10
- lightspeed_stack-0.4.2/tests/unit/test_llama_stack_configuration.py +0 -495
- lightspeed_stack-0.4.2/tests/unit/test_log.py +0 -155
- lightspeed_stack-0.4.2/tests/unit/utils/README.md +0 -53
- lightspeed_stack-0.4.2/tests/unit/utils/test_checks.py +0 -239
- lightspeed_stack-0.4.2/tests/unit/utils/test_common.py +0 -415
- lightspeed_stack-0.4.2/tests/unit/utils/test_conversations.py +0 -722
- lightspeed_stack-0.4.2/tests/unit/utils/test_endpoints.py +0 -453
- lightspeed_stack-0.4.2/tests/unit/utils/test_llama_stack_version.py +0 -124
- lightspeed_stack-0.4.2/tests/unit/utils/test_mcp_auth_headers.py +0 -125
- lightspeed_stack-0.4.2/tests/unit/utils/test_mcp_headers.py +0 -291
- lightspeed_stack-0.4.2/tests/unit/utils/test_prompts.py +0 -335
- lightspeed_stack-0.4.2/tests/unit/utils/test_query.py +0 -852
- lightspeed_stack-0.4.2/tests/unit/utils/test_responses.py +0 -2394
- lightspeed_stack-0.4.2/tests/unit/utils/test_shields.py +0 -520
- lightspeed_stack-0.4.2/tests/unit/utils/test_suid.py +0 -102
- lightspeed_stack-0.4.2/tests/unit/utils/test_transcripts.py +0 -144
- lightspeed_stack-0.4.2/tests/unit/utils/test_types.py +0 -328
- lightspeed_stack-0.4.2/tests/unit/utils/test_vector_search.py +0 -504
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/LICENSE +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/a2a_storage/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/a2a_storage/context_store.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/a2a_storage/in_memory_context_store.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/app/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/app/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/app/endpoints/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/authorization/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/authorization/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/cache/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/cache/cache_error.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/models/database/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/models/database/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/models/database/base.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/quota/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/quota/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/quota/sql.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/runners/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/runners/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/telemetry/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/telemetry/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/src/utils/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/benchmarks/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/configuration/benchmarks-postgres.yaml +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/configuration/benchmarks-sqlite.yaml +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/configuration/lightspeed-stack.yaml +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/configuration/minimal-stack.yaml +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/configuration/multiline_system_prompt.txt +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/configuration/password +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/configuration/rag.txt +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/configuration/rh-identity-config.yaml +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/configuration/run.yaml +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/configuration/server.crt +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/configuration/server.key +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/configuration/system_prompt.txt +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e/configs/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e/configuration/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e/configuration/library-mode/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e/configuration/library-mode/lightspeed-stack-auth-rh-identity.yaml +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e/configuration/library-mode/lightspeed-stack-invalid-feedback-storage.yaml +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e/configuration/library-mode/lightspeed-stack-no-cache.yaml +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e/configuration/library-mode/lightspeed-stack-rbac.yaml +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e/configuration/server-mode/README.md +0 -0
- {lightspeed_stack-0.4.2/tests/e2e-prow/rhoai/configs → lightspeed_stack-0.6.0/tests/e2e/configuration/server-mode}/lightspeed-stack-auth-rh-identity.yaml +0 -0
- {lightspeed_stack-0.4.2/tests/e2e-prow/rhoai/configs → lightspeed_stack-0.6.0/tests/e2e/configuration/server-mode}/lightspeed-stack-invalid-feedback-storage.yaml +0 -0
- {lightspeed_stack-0.4.2/tests/e2e-prow/rhoai/configs → lightspeed_stack-0.6.0/tests/e2e/configuration/server-mode}/lightspeed-stack-no-cache.yaml +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e/features/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e/features/steps/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e/gen_scenario_list.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e/mock_jwks_server/Dockerfile +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e/mock_jwks_server/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e/rag/kv_store.db +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e/secrets/mcp-token +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e/test_api.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e-prow/rhoai/configs/run.yaml +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e-prow/rhoai/manifests/gpu/cluster-policy.yaml +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e-prow/rhoai/manifests/gpu/create-nfd.yaml +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e-prow/rhoai/manifests/namespaces/nfd.yaml +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e-prow/rhoai/manifests/namespaces/nvidia-operator.yaml +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e-prow/rhoai/manifests/operators/operatorgroup.yaml +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e-prow/rhoai/manifests/operators/operators.yaml +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e-prow/rhoai/manifests/vllm/vllm-inference-service-cpu.yaml +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e-prow/rhoai/manifests/vllm/vllm-inference-service-gpu.yaml +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e-prow/rhoai/pipeline-test-pod.sh +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e-prow/rhoai/pipeline-vllm.sh +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e-prow/rhoai/scripts/deploy-vllm.sh +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e-prow/rhoai/scripts/fetch-vllm-image.sh +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e-prow/rhoai/scripts/get-vllm-pod-info.sh +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/e2e-prow/rhoai/scripts/gpu-setup.sh +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/integration/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/integration/endpoints/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/integration/test_version.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/profiles/empty.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/profiles/syntax_error.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/profiles/test/profile.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/profiles/test_four/profile.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/profiles/test_three/profile.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/profiles/test_two/test.txt +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/a2a_storage/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/a2a_storage/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/a2a_storage/test_in_memory_context_store.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/a2a_storage/test_sqlite_context_store.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/app/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/app/endpoints/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/app/endpoints/test_info.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/app/endpoints/test_providers.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/app/endpoints/test_root.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/authentication/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/authorization/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/authorization/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/cache/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/metrics/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/models/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/models/config/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/models/config/test_cors.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/models/responses/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/models/rlsapi/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/models/rlsapi/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/observability/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/observability/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/observability/formats/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/quota/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/quota/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/quota/test_quota_exceed_error.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/runners/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/runners/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/telemetry/README.md +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/telemetry/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/test_configuration_unknown_fields.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/utils/__init__.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/utils/auth_helpers.py +0 -0
- {lightspeed_stack-0.4.2 → lightspeed_stack-0.6.0}/tests/unit/utils/test_connection_decorator.py +0 -0
|
@@ -0,0 +1,1700 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: lightspeed-stack
|
|
3
|
+
Version: 0.6.0
|
|
4
|
+
Summary: LLM tooling stack
|
|
5
|
+
Keywords: LLM,RAG
|
|
6
|
+
Maintainer-Email: =?utf-8?b?UGF2ZWwgVGnFoW5vdnNrw70=?= <tisnik@centrum.cz>
|
|
7
|
+
License: Apache License
|
|
8
|
+
Version 2.0, January 2004
|
|
9
|
+
http://www.apache.org/licenses/
|
|
10
|
+
|
|
11
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
12
|
+
|
|
13
|
+
1. Definitions.
|
|
14
|
+
|
|
15
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
16
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
17
|
+
|
|
18
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
19
|
+
the copyright owner that is granting the License.
|
|
20
|
+
|
|
21
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
22
|
+
other entities that control, are controlled by, or are under common
|
|
23
|
+
control with that entity. For the purposes of this definition,
|
|
24
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
25
|
+
direction or management of such entity, whether by contract or
|
|
26
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
27
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
28
|
+
|
|
29
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
30
|
+
exercising permissions granted by this License.
|
|
31
|
+
|
|
32
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
33
|
+
including but not limited to software source code, documentation
|
|
34
|
+
source, and configuration files.
|
|
35
|
+
|
|
36
|
+
"Object" form shall mean any form resulting from mechanical
|
|
37
|
+
transformation or translation of a Source form, including but
|
|
38
|
+
not limited to compiled object code, generated documentation,
|
|
39
|
+
and conversions to other media types.
|
|
40
|
+
|
|
41
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
42
|
+
Object form, made available under the License, as indicated by a
|
|
43
|
+
copyright notice that is included in or attached to the work
|
|
44
|
+
(an example is provided in the Appendix below).
|
|
45
|
+
|
|
46
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
47
|
+
form, that is based on (or derived from) the Work and for which the
|
|
48
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
49
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
50
|
+
of this License, Derivative Works shall not include works that remain
|
|
51
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
52
|
+
the Work and Derivative Works thereof.
|
|
53
|
+
|
|
54
|
+
"Contribution" shall mean any work of authorship, including
|
|
55
|
+
the original version of the Work and any modifications or additions
|
|
56
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
57
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
58
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
59
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
60
|
+
means any form of electronic, verbal, or written communication sent
|
|
61
|
+
to the Licensor or its representatives, including but not limited to
|
|
62
|
+
communication on electronic mailing lists, source code control systems,
|
|
63
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
64
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
65
|
+
excluding communication that is conspicuously marked or otherwise
|
|
66
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
67
|
+
|
|
68
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
69
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
70
|
+
subsequently incorporated within the Work.
|
|
71
|
+
|
|
72
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
73
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
74
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
75
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
76
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
77
|
+
Work and such Derivative Works in Source or Object form.
|
|
78
|
+
|
|
79
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
80
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
81
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
82
|
+
(except as stated in this section) patent license to make, have made,
|
|
83
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
84
|
+
where such license applies only to those patent claims licensable
|
|
85
|
+
by such Contributor that are necessarily infringed by their
|
|
86
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
87
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
88
|
+
institute patent litigation against any entity (including a
|
|
89
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
90
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
91
|
+
or contributory patent infringement, then any patent licenses
|
|
92
|
+
granted to You under this License for that Work shall terminate
|
|
93
|
+
as of the date such litigation is filed.
|
|
94
|
+
|
|
95
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
96
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
97
|
+
modifications, and in Source or Object form, provided that You
|
|
98
|
+
meet the following conditions:
|
|
99
|
+
|
|
100
|
+
(a) You must give any other recipients of the Work or
|
|
101
|
+
Derivative Works a copy of this License; and
|
|
102
|
+
|
|
103
|
+
(b) You must cause any modified files to carry prominent notices
|
|
104
|
+
stating that You changed the files; and
|
|
105
|
+
|
|
106
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
107
|
+
that You distribute, all copyright, patent, trademark, and
|
|
108
|
+
attribution notices from the Source form of the Work,
|
|
109
|
+
excluding those notices that do not pertain to any part of
|
|
110
|
+
the Derivative Works; and
|
|
111
|
+
|
|
112
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
113
|
+
distribution, then any Derivative Works that You distribute must
|
|
114
|
+
include a readable copy of the attribution notices contained
|
|
115
|
+
within such NOTICE file, excluding those notices that do not
|
|
116
|
+
pertain to any part of the Derivative Works, in at least one
|
|
117
|
+
of the following places: within a NOTICE text file distributed
|
|
118
|
+
as part of the Derivative Works; within the Source form or
|
|
119
|
+
documentation, if provided along with the Derivative Works; or,
|
|
120
|
+
within a display generated by the Derivative Works, if and
|
|
121
|
+
wherever such third-party notices normally appear. The contents
|
|
122
|
+
of the NOTICE file are for informational purposes only and
|
|
123
|
+
do not modify the License. You may add Your own attribution
|
|
124
|
+
notices within Derivative Works that You distribute, alongside
|
|
125
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
126
|
+
that such additional attribution notices cannot be construed
|
|
127
|
+
as modifying the License.
|
|
128
|
+
|
|
129
|
+
You may add Your own copyright statement to Your modifications and
|
|
130
|
+
may provide additional or different license terms and conditions
|
|
131
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
132
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
133
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
134
|
+
the conditions stated in this License.
|
|
135
|
+
|
|
136
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
137
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
138
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
139
|
+
this License, without any additional terms or conditions.
|
|
140
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
141
|
+
the terms of any separate license agreement you may have executed
|
|
142
|
+
with Licensor regarding such Contributions.
|
|
143
|
+
|
|
144
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
145
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
146
|
+
except as required for reasonable and customary use in describing the
|
|
147
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
148
|
+
|
|
149
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
150
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
151
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
152
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
153
|
+
implied, including, without limitation, any warranties or conditions
|
|
154
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
155
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
156
|
+
appropriateness of using or redistributing the Work and assume any
|
|
157
|
+
risks associated with Your exercise of permissions under this License.
|
|
158
|
+
|
|
159
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
160
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
161
|
+
unless required by applicable law (such as deliberate and grossly
|
|
162
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
163
|
+
liable to You for damages, including any direct, indirect, special,
|
|
164
|
+
incidental, or consequential damages of any character arising as a
|
|
165
|
+
result of this License or out of the use or inability to use the
|
|
166
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
167
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
168
|
+
other commercial damages or losses), even if such Contributor
|
|
169
|
+
has been advised of the possibility of such damages.
|
|
170
|
+
|
|
171
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
172
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
173
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
174
|
+
or other liability obligations and/or rights consistent with this
|
|
175
|
+
License. However, in accepting such obligations, You may act only
|
|
176
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
177
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
178
|
+
defend, and hold each Contributor harmless for any liability
|
|
179
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
180
|
+
of your accepting any such warranty or additional liability.
|
|
181
|
+
|
|
182
|
+
END OF TERMS AND CONDITIONS
|
|
183
|
+
|
|
184
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
185
|
+
|
|
186
|
+
To apply the Apache License to your work, attach the following
|
|
187
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
188
|
+
replaced with your own identifying information. (Don't include
|
|
189
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
190
|
+
comment syntax for the file format. We also recommend that a
|
|
191
|
+
file or class name and description of purpose be included on the
|
|
192
|
+
same "printed page" as the copyright notice for easier
|
|
193
|
+
identification within third-party archives.
|
|
194
|
+
|
|
195
|
+
Copyright [yyyy] [name of copyright owner]
|
|
196
|
+
|
|
197
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
198
|
+
you may not use this file except in compliance with the License.
|
|
199
|
+
You may obtain a copy of the License at
|
|
200
|
+
|
|
201
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
202
|
+
|
|
203
|
+
Unless required by applicable law or agreed to in writing, software
|
|
204
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
205
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
206
|
+
See the License for the specific language governing permissions and
|
|
207
|
+
limitations under the License.
|
|
208
|
+
|
|
209
|
+
Classifier: Development Status :: 4 - Beta
|
|
210
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
211
|
+
Classifier: Topic :: Software Development
|
|
212
|
+
Classifier: Programming Language :: Python :: 3
|
|
213
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
214
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
215
|
+
Project-URL: Homepage, https://github.com/lightspeed-core/lightspeed-stack
|
|
216
|
+
Project-URL: Issues, https://github.com/lightspeed-core/lightspeed-stack/issues
|
|
217
|
+
Requires-Python: <3.14,>=3.12
|
|
218
|
+
Requires-Dist: fastapi>=0.115.12
|
|
219
|
+
Requires-Dist: uvicorn>=0.34.3
|
|
220
|
+
Requires-Dist: kubernetes>=30.1.0
|
|
221
|
+
Requires-Dist: llama-stack==0.6.0
|
|
222
|
+
Requires-Dist: llama-stack-client==0.6.0
|
|
223
|
+
Requires-Dist: llama-stack-api==0.6.0
|
|
224
|
+
Requires-Dist: rich>=14.0.0
|
|
225
|
+
Requires-Dist: cachetools>=6.1.0
|
|
226
|
+
Requires-Dist: prometheus-client>=0.22.1
|
|
227
|
+
Requires-Dist: starlette>=0.47.1
|
|
228
|
+
Requires-Dist: aiohttp>=3.13.3
|
|
229
|
+
Requires-Dist: authlib>=1.6.0
|
|
230
|
+
Requires-Dist: a2a-sdk<0.4.0,>=0.3.4
|
|
231
|
+
Requires-Dist: email-validator>=2.2.0
|
|
232
|
+
Requires-Dist: openai>=1.99.9
|
|
233
|
+
Requires-Dist: sqlalchemy[asyncio]>=2.0.42
|
|
234
|
+
Requires-Dist: aiosqlite>=0.21.0
|
|
235
|
+
Requires-Dist: asyncpg>=0.31.0
|
|
236
|
+
Requires-Dist: semver<4.0.0
|
|
237
|
+
Requires-Dist: jsonpath-ng>=1.6.1
|
|
238
|
+
Requires-Dist: psycopg2-binary>=2.9.10
|
|
239
|
+
Requires-Dist: litellm>=1.83.7
|
|
240
|
+
Requires-Dist: urllib3>=2.6.3
|
|
241
|
+
Requires-Dist: PyYAML>=6.0.0
|
|
242
|
+
Requires-Dist: einops>=0.8.1
|
|
243
|
+
Requires-Dist: azure-core>=1.38.0
|
|
244
|
+
Requires-Dist: azure-identity>=1.21.0
|
|
245
|
+
Requires-Dist: pyasn1>=0.6.3
|
|
246
|
+
Requires-Dist: jinja2>=3.1.0
|
|
247
|
+
Requires-Dist: requests>=2.33.0
|
|
248
|
+
Requires-Dist: datasets>=4.7.0
|
|
249
|
+
Requires-Dist: sentry-sdk[fastapi]>=2.58.0
|
|
250
|
+
Requires-Dist: python-dotenv>=1.2.2
|
|
251
|
+
Requires-Dist: tiktoken>=0.8.0
|
|
252
|
+
Requires-Dist: pydantic-ai>=1.99.0
|
|
253
|
+
Requires-Dist: pydantic-ai-skills>=0.11.0
|
|
254
|
+
Description-Content-Type: text/markdown
|
|
255
|
+
|
|
256
|
+
# Lightspeed Core Stack (LCS)
|
|
257
|
+
|
|
258
|
+
## About The Project
|
|
259
|
+
|
|
260
|
+
[](https://lightspeed-core.github.io/lightspeed-stack/)
|
|
261
|
+
[](https://github.com/lightspeed-core/lightspeed-stack/blob/main/LICENSE)
|
|
262
|
+
[](https://www.python.org/)
|
|
263
|
+
[](https://www.python.org/)
|
|
264
|
+
[](https://github.com/lightspeed-core/lightspeed-stack/releases/tag/0.6.0rc2)
|
|
265
|
+
|
|
266
|
+
Lightspeed Core Stack (LCS) is an AI-powered assistant that provides answers to product questions using backend LLM services, agents, and RAG databases.
|
|
267
|
+
|
|
268
|
+
The service includes comprehensive user data collection capabilities for various types of user interaction data, which can be exported to Red Hat's Dataverse for analysis using the companion [lightspeed-to-dataverse-exporter](https://github.com/lightspeed-core/lightspeed-to-dataverse-exporter) service.
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
<!-- vim-markdown-toc GFM -->
|
|
272
|
+
|
|
273
|
+
* [Architecture](#architecture)
|
|
274
|
+
* [Prerequisites](#prerequisites)
|
|
275
|
+
* [Installation](#installation)
|
|
276
|
+
* [Run LCS locally](#run-lcs-locally)
|
|
277
|
+
* [Container Runtime Requirements](#container-runtime-requirements)
|
|
278
|
+
* [Configuration](#configuration)
|
|
279
|
+
* [Agentic Capabilities](#agentic-capabilities)
|
|
280
|
+
* [LLM Compatibility](#llm-compatibility)
|
|
281
|
+
* [Set LLM provider and model](#set-llm-provider-and-model)
|
|
282
|
+
* [Selecting provider and model](#selecting-provider-and-model)
|
|
283
|
+
* [Provider and model selection in REST API request](#provider-and-model-selection-in-rest-api-request)
|
|
284
|
+
* [Default provider and model](#default-provider-and-model)
|
|
285
|
+
* [Supported providers](#supported-providers)
|
|
286
|
+
* [Integration with Llama Stack](#integration-with-llama-stack)
|
|
287
|
+
* [Llama Stack as separate server](#llama-stack-as-separate-server)
|
|
288
|
+
* [Degraded mode](#degraded-mode)
|
|
289
|
+
* [MCP Server and Tool Configuration](#mcp-server-and-tool-configuration)
|
|
290
|
+
* [Configuring MCP Servers](#configuring-mcp-servers)
|
|
291
|
+
* [Configuring MCP Server Authentication](#configuring-mcp-server-authentication)
|
|
292
|
+
* [1. Static Tokens from Files (Recommended for Service Credentials)](#1-static-tokens-from-files-recommended-for-service-credentials)
|
|
293
|
+
* [2. Kubernetes Service Account Tokens (For K8s Deployments)](#2-kubernetes-service-account-tokens-for-k8s-deployments)
|
|
294
|
+
* [3. Client-Provided Tokens (For Per-User Authentication)](#3-client-provided-tokens-for-per-user-authentication)
|
|
295
|
+
* [4. OAuth (For MCP Servers Requiring OAuth)](#4-oauth-for-mcp-servers-requiring-oauth)
|
|
296
|
+
* [5. Automatic Header Propagation (For Gateway-Injected Headers)](#5-automatic-header-propagation-for-gateway-injected-headers)
|
|
297
|
+
* [Client-Authenticated MCP Servers Discovery](#client-authenticated-mcp-servers-discovery)
|
|
298
|
+
* [Combining Authentication Methods](#combining-authentication-methods)
|
|
299
|
+
* [Authentication Method Comparison](#authentication-method-comparison)
|
|
300
|
+
* [Important: Automatic Server Skipping](#important-automatic-server-skipping)
|
|
301
|
+
* [Llama Stack project and configuration](#llama-stack-project-and-configuration)
|
|
302
|
+
* [Check connection to Llama Stack](#check-connection-to-llama-stack)
|
|
303
|
+
* [Llama Stack as client library](#llama-stack-as-client-library)
|
|
304
|
+
* [Llama Stack version check](#llama-stack-version-check)
|
|
305
|
+
* [User data collection](#user-data-collection)
|
|
306
|
+
* [System prompt](#system-prompt)
|
|
307
|
+
* [System Prompt Path](#system-prompt-path)
|
|
308
|
+
* [System Prompt Literal](#system-prompt-literal)
|
|
309
|
+
* [Custom Profile](#custom-profile)
|
|
310
|
+
* [Control model/provider overrides via authorization](#control-modelprovider-overrides-via-authorization)
|
|
311
|
+
* [Agent Skills (Upcoming)](#agent-skills-upcoming)
|
|
312
|
+
* [Safety Shields](#safety-shields)
|
|
313
|
+
* [Authentication](#authentication)
|
|
314
|
+
* [CORS](#cors)
|
|
315
|
+
* [Default values](#default-values)
|
|
316
|
+
* [Allow credentials](#allow-credentials)
|
|
317
|
+
* [RAG Configuration](#rag-configuration)
|
|
318
|
+
* [Example configurations for inference](#example-configurations-for-inference)
|
|
319
|
+
* [Usage](#usage)
|
|
320
|
+
* [CLI options](#cli-options)
|
|
321
|
+
* [Dumping configuration](#dumping-configuration)
|
|
322
|
+
* [Dumping configuration schema](#dumping-configuration-schema)
|
|
323
|
+
* [Make targets](#make-targets)
|
|
324
|
+
* [Running Linux container image](#running-linux-container-image)
|
|
325
|
+
* [Building Container Images](#building-container-images)
|
|
326
|
+
* [Llama-Stack as Separate Service (Server Mode)](#llama-stack-as-separate-service-server-mode)
|
|
327
|
+
* [macOS (arm64)](#macos-arm64)
|
|
328
|
+
* [Llama-Stack as Library (Library Mode)](#llama-stack-as-library-library-mode)
|
|
329
|
+
* [macOS](#macos)
|
|
330
|
+
* [Verify it's running properly](#verify-its-running-properly)
|
|
331
|
+
* [Custom Container Image](#custom-container-image)
|
|
332
|
+
* [Endpoints](#endpoints)
|
|
333
|
+
* [OpenAPI specification](#openapi-specification)
|
|
334
|
+
* [Readiness Endpoint](#readiness-endpoint)
|
|
335
|
+
* [Liveness Endpoint](#liveness-endpoint)
|
|
336
|
+
* [Models endpoint](#models-endpoint)
|
|
337
|
+
* [Database structure](#database-structure)
|
|
338
|
+
* [Publish the service as Python package on PyPI](#publish-the-service-as-python-package-on-pypi)
|
|
339
|
+
* [Generate distribution archives to be uploaded into Python registry](#generate-distribution-archives-to-be-uploaded-into-python-registry)
|
|
340
|
+
* [Upload distribution archives into selected Python registry](#upload-distribution-archives-into-selected-python-registry)
|
|
341
|
+
* [Packages on PyPI and Test PyPI](#packages-on-pypi-and-test-pypi)
|
|
342
|
+
* [Contributing](#contributing)
|
|
343
|
+
* [Testing](#testing)
|
|
344
|
+
* [Releasing](#releasing)
|
|
345
|
+
* [License](#license)
|
|
346
|
+
* [Additional tools](#additional-tools)
|
|
347
|
+
* [Utility to generate OpenAPI schema](#utility-to-generate-openapi-schema)
|
|
348
|
+
* [Path](#path)
|
|
349
|
+
* [Usage](#usage-1)
|
|
350
|
+
* [Makefile target to generate OpenAPI specification](#makefile-target-to-generate-openapi-specification)
|
|
351
|
+
* [Utility to generate documentation from source code](#utility-to-generate-documentation-from-source-code)
|
|
352
|
+
* [Path](#path-1)
|
|
353
|
+
* [Usage](#usage-2)
|
|
354
|
+
* [Data Export Integration](#data-export-integration)
|
|
355
|
+
* [Quick Integration](#quick-integration)
|
|
356
|
+
* [Documentation](#documentation)
|
|
357
|
+
* [Project structure](#project-structure)
|
|
358
|
+
* [Configuration classes](#configuration-classes)
|
|
359
|
+
* [REST API](#rest-api)
|
|
360
|
+
* [Sequence diagrams](#sequence-diagrams)
|
|
361
|
+
* [Query endpoint REST API handler](#query-endpoint-rest-api-handler)
|
|
362
|
+
* [Streaming query endpoint REST API handler](#streaming-query-endpoint-rest-api-handler)
|
|
363
|
+
* [Versioning](#versioning)
|
|
364
|
+
* [Konflux](#konflux)
|
|
365
|
+
* [Updating Dependencies for Hermetic Builds](#updating-dependencies-for-hermetic-builds)
|
|
366
|
+
* [When to Update Dependency Files](#when-to-update-dependency-files)
|
|
367
|
+
* [Updating Python Dependencies](#updating-python-dependencies)
|
|
368
|
+
* [Updating RPM Dependencies](#updating-rpm-dependencies)
|
|
369
|
+
|
|
370
|
+
<!-- vim-markdown-toc -->
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
# Architecture
|
|
375
|
+
|
|
376
|
+
Overall architecture with all main parts is displayed below:
|
|
377
|
+
|
|
378
|
+

|
|
379
|
+
|
|
380
|
+
Lightspeed Core Stack is based on the FastAPI framework (Uvicorn). The service is split into several parts described below.
|
|
381
|
+
|
|
382
|
+
# Prerequisites
|
|
383
|
+
|
|
384
|
+
* Python 3.12, or 3.13
|
|
385
|
+
- please note that currently Python 3.14 is not officially supported
|
|
386
|
+
- all sources are made (backward) compatible with Python 3.12; it is checked on CI
|
|
387
|
+
|
|
388
|
+
* OpenAI API Key (Recommended for Getting Started)
|
|
389
|
+
|
|
390
|
+
Lightspeed Stack supports multiple LLM providers.
|
|
391
|
+
|
|
392
|
+
| Provider | Setup Documentation |
|
|
393
|
+
|-----------------|-----------------------------------------------------------------------|
|
|
394
|
+
| OpenAI | https://platform.openai.com |
|
|
395
|
+
| Azure OpenAI | https://azure.microsoft.com/en-us/products/ai-services/openai-service |
|
|
396
|
+
| Google VertexAI | https://cloud.google.com/vertex-ai |
|
|
397
|
+
| IBM WatsonX | https://www.ibm.com/products/watsonx |
|
|
398
|
+
| AWS Bedrock | https://aws.amazon.com/bedrock |
|
|
399
|
+
| RHOAI (vLLM) | See tests/e2e-prow/rhoai/configs/run.yaml |
|
|
400
|
+
| RHEL AI (RHAIIS/vLLM) | See tests/e2e/configs/run-rhelai.yaml |
|
|
401
|
+
|
|
402
|
+
See `docs/providers.md` for configuration details.
|
|
403
|
+
|
|
404
|
+
You will need an API key from one of these providers to run LightSpeed Stack.
|
|
405
|
+
|
|
406
|
+
For example, if you choose to use OpenAI:
|
|
407
|
+
|
|
408
|
+
1. **Create an account** at [platform.openai.com](https://platform.openai.com)
|
|
409
|
+
2. **Add payment information** (new accounts receive free trial credits)
|
|
410
|
+
3. **Generate an API key** from your dashboard at [API Keys](https://platform.openai.com/api-keys)
|
|
411
|
+
4. **Export the key** in your environment:
|
|
412
|
+
```bash
|
|
413
|
+
export OPENAI_API_KEY="sk-your-api-key-here"
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
# Installation
|
|
417
|
+
|
|
418
|
+
## Clone the Repository
|
|
419
|
+
|
|
420
|
+
Lightspeed Stack uses a git submodule for external providers (required for features like OKP RAG). Clone with submodules:
|
|
421
|
+
|
|
422
|
+
```bash
|
|
423
|
+
git clone --recursive https://github.com/lightspeed-core/lightspeed-stack.git
|
|
424
|
+
cd lightspeed-stack
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
**If you already cloned without `--recursive`:**
|
|
428
|
+
```bash
|
|
429
|
+
git submodule update --init
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
## System-Specific Installation
|
|
433
|
+
|
|
434
|
+
Installation steps depends on operation system. Please look at instructions for your system:
|
|
435
|
+
|
|
436
|
+
- [Linux installation](https://lightspeed-core.github.io/lightspeed-stack/installation_linux)
|
|
437
|
+
- [macOS installation](https://lightspeed-core.github.io/lightspeed-stack/installation_macos)
|
|
438
|
+
|
|
439
|
+
# Run LCS locally
|
|
440
|
+
|
|
441
|
+
To quickly get hands on LCS, we can run it using the default configurations provided in this repository:
|
|
442
|
+
|
|
443
|
+
0. install dependencies using [uv](https://docs.astral.sh/uv/getting-started/installation/)
|
|
444
|
+
```bash
|
|
445
|
+
uv sync --group dev --group llslibdev
|
|
446
|
+
```
|
|
447
|
+
1. create llama stack `run.yaml`. you can do this by running the local run generation script
|
|
448
|
+
```bash
|
|
449
|
+
./scripts/generate_local_run.sh
|
|
450
|
+
```
|
|
451
|
+
2. export the LLM token environment variable that Llama stack requires. for OpenAI, we set the env var by
|
|
452
|
+
```bash
|
|
453
|
+
export OPENAI_API_KEY=sk-xxxxx
|
|
454
|
+
```
|
|
455
|
+
3. start LCS server
|
|
456
|
+
```bash
|
|
457
|
+
make run
|
|
458
|
+
```
|
|
459
|
+
4. access LCS web UI at [http://localhost:8080/](http://localhost:8080/)
|
|
460
|
+
|
|
461
|
+
**Note**: `make run` uses containerized llama-stack (service mode). For details on container lifecycle management, customization, and troubleshooting, see the [Container Orchestration Guide](docs/container_orchestration.md). To run llama-stack manually instead, see the [Llama Stack as separate server](#llama-stack-as-separate-server) section below.
|
|
462
|
+
|
|
463
|
+
## Container Runtime Requirements
|
|
464
|
+
|
|
465
|
+
The Makefile requires either Podman or Docker to launch the Llama Stack container:
|
|
466
|
+
|
|
467
|
+
- **Podman** (recommended for RHEL/Fedora): `sudo dnf install podman`
|
|
468
|
+
- **Docker**: Install from [docker.com](https://docs.docker.com/get-docker/)
|
|
469
|
+
|
|
470
|
+
The Makefile will auto-detect which runtime is available.
|
|
471
|
+
|
|
472
|
+
**For advanced usage** including customization options, cleanup commands, and troubleshooting, see the [Container Orchestration Guide](docs/container_orchestration.md).
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
# Configuration
|
|
476
|
+
|
|
477
|
+
## Agentic Capabilities
|
|
478
|
+
|
|
479
|
+
Lightspeed Core Stack supports the following agentic features:
|
|
480
|
+
|
|
481
|
+
| Capability | Status | Description |
|
|
482
|
+
|------------|--------|-------------|
|
|
483
|
+
| MCP Tools | Supported | External tool integration via [Model Context Protocol](https://modelcontextprotocol.io) servers |
|
|
484
|
+
| RAG | Supported | Retrieval-Augmented Generation with vector stores ([RAG Guide](docs/rag_guide.md)) |
|
|
485
|
+
| A2A Protocol (Client) | Supported | Agent-to-Agent communication as client ([A2A Protocol](docs/a2a_protocol.md)) |
|
|
486
|
+
| Conversation History | Supported | Persistent conversation context across requests |
|
|
487
|
+
| Human-in-the-Loop | Upcoming | Interactive approval or confirmation steps |
|
|
488
|
+
| Agent Skills | Upcoming (Q2) | Domain-specific instructions loaded on demand ([Agent Skills Guide](docs/skills_guide.md)) |
|
|
489
|
+
|
|
490
|
+
## LLM Compatibility
|
|
491
|
+
|
|
492
|
+
Lightspeed Core Stack (LCS) provides support for Large Language Model providers. The models listed in the table below represent specific examples that have been tested within LCS.
|
|
493
|
+
__Note__: Support for individual models is dependent on the specific inference provider's implementation within the currently supported version of Llama Stack.
|
|
494
|
+
|
|
495
|
+
| Provider | Model | Tool Calling | provider_type | Example |
|
|
496
|
+
|----------------|------------------------------------------------------------------------------|---------------|------------------|----------------------------------------------------------------------------|
|
|
497
|
+
| OpenAI | gpt-5, gpt-4o, gpt-4-turbo, gpt-4.1, o1, o3, o4 | Yes | remote::openai | [1](examples/openai-faiss-run.yaml) [2](examples/openai-pgvector-run.yaml) |
|
|
498
|
+
| OpenAI | gpt-3.5-turbo, gpt-4 | No | remote::openai | |
|
|
499
|
+
| RHOAI (vLLM) | meta-llama/Llama-3.2-1B-Instruct | Yes | remote::vllm | [1](tests/e2e-prow/rhoai/configs/run.yaml) |
|
|
500
|
+
| RHEL AI (RHAIIS/vLLM) | meta-llama/Llama-3.1-8B-Instruct | Yes | remote::vllm | [1](tests/e2e/configs/run-rhelai.yaml) [2](tests/e2e/configs/run-rhaiis.yaml) |
|
|
501
|
+
| Azure | gpt-5, gpt-5-mini, gpt-5-nano, gpt-4o-mini, o3-mini, o4-mini, o1 | Yes | remote::azure | [1](examples/azure-run.yaml) |
|
|
502
|
+
| Azure | gpt-5-chat, gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, o1-mini | No or limited | remote::azure | |
|
|
503
|
+
| VertexAI | google/gemini-2.0-flash, google/gemini-2.5-flash, google/gemini-2.5-pro [^1] | Yes | remote::vertexai | [1](examples/vertexai-run.yaml) |
|
|
504
|
+
| WatsonX | meta-llama/llama-3-3-70b-instruct | Yes | remote::watsonx | [1](examples/watsonx-run.yaml) |
|
|
505
|
+
| AWS Bedrock | deepseek.v3-v1 | Yes | remote::bedrock | [1](examples/bedrock-run.yaml) |
|
|
506
|
+
|
|
507
|
+
[^1]: List of models is limited by design in llama-stack, future versions will probably allow to use more models (see [here](https://github.com/llamastack/llama-stack/blob/release-0.3.x/llama_stack/providers/remote/inference/vertexai/vertexai.py#L54))
|
|
508
|
+
|
|
509
|
+
The "provider_type" is used in the llama stack configuration file when refering to the provider.
|
|
510
|
+
|
|
511
|
+
For details of OpenAI model capabilities, please refer to https://platform.openai.com/docs/models/compare
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
## Set LLM provider and model
|
|
515
|
+
|
|
516
|
+
The LLM provider and model are set in the configuration file for Llama Stack. This repository has a Llama stack configuration file [run.yaml](examples/run.yaml) that can serve as a good example.
|
|
517
|
+
|
|
518
|
+
The LLM providers are set in the section `providers.inference`. This example adds a inference provider "openai" to the llama stack. To use environment variables as configuration values, we can use the syntax `${env.ENV_VAR_NAME}`.
|
|
519
|
+
|
|
520
|
+
For more details, please refer to [llama stack documentation](https://llama-stack.readthedocs.io/en/latest/distributions/configuration.html#providers). Here is a list of llamastack supported providers and their configuration details: [llama stack providers](https://llama-stack.readthedocs.io/en/latest/providers/inference/index.html#providers)
|
|
521
|
+
|
|
522
|
+
```yaml
|
|
523
|
+
inference:
|
|
524
|
+
- provider_id: openai
|
|
525
|
+
provider_type: remote::openai
|
|
526
|
+
config:
|
|
527
|
+
api_key: ${env.OPENAI_API_KEY}
|
|
528
|
+
url: ${env.SERVICE_URL}
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
The section `models` is a list of models offered by the inference provider. Attention that the field `model_id` is a user chosen name for referring to the model locally, the field `provider_model_id` refers to the model name on the provider side. The field `provider_id` must refer to one of the inference providers we defined in the provider list above.
|
|
532
|
+
|
|
533
|
+
```yaml
|
|
534
|
+
models:
|
|
535
|
+
- model_id: gpt-4-turbo
|
|
536
|
+
provider_id: openai
|
|
537
|
+
model_type: llm
|
|
538
|
+
provider_model_id: gpt-4-turbo
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
## Selecting provider and model
|
|
542
|
+
|
|
543
|
+
It is possible to configure multiple LLM providers and models are configured. In this case it is needed to:
|
|
544
|
+
|
|
545
|
+
- select the provider + model in query request
|
|
546
|
+
- specify default model and provider in Lightspeed Core Stack configuration file
|
|
547
|
+
|
|
548
|
+
### Provider and model selection in REST API request
|
|
549
|
+
|
|
550
|
+
Provider and model can be specified in `/v1/query` and `/v1/streaming-query` REST API requests:
|
|
551
|
+
|
|
552
|
+
```json
|
|
553
|
+
{
|
|
554
|
+
"conversation_id": "123e4567-e89b-12d3-a456-426614174000",
|
|
555
|
+
"generate_topic_summary": true,
|
|
556
|
+
"provider": "openai",
|
|
557
|
+
"model": "gpt-5",
|
|
558
|
+
"no_tools": false,
|
|
559
|
+
"query": "write a deployment yaml for the mongodb image",
|
|
560
|
+
"system_prompt": "You are a helpful assistant"
|
|
561
|
+
}
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
### Default provider and model
|
|
565
|
+
|
|
566
|
+
It is possible to configure default provider and model in Lightspeed Core Stack configuration file, under the `inference` node:
|
|
567
|
+
|
|
568
|
+
```yaml
|
|
569
|
+
inference:
|
|
570
|
+
- default_provider: SELECTED PROVIDER
|
|
571
|
+
default_model: SELECTED MODEL
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
These settings will be used when no provider or model are specified in REST API request.
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
## Supported providers
|
|
579
|
+
|
|
580
|
+
For a comprehensive list of supported providers, take a look [here](docs/providers.md).
|
|
581
|
+
|
|
582
|
+
## Integration with Llama Stack
|
|
583
|
+
|
|
584
|
+
The Llama Stack can be run as a standalone server and accessed via its the REST
|
|
585
|
+
API. However, instead of direct communication via the REST API (and JSON
|
|
586
|
+
format), there is an even better alternative. It is based on the so-called
|
|
587
|
+
Llama Stack Client. It is a library available for Python, Swift, Node.js or
|
|
588
|
+
Kotlin, which "wraps" the REST API stack in a suitable way, which is easier for
|
|
589
|
+
many applications.
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+

|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
## Llama Stack as separate server
|
|
597
|
+
|
|
598
|
+
If Llama Stack runs as a separate server, the Lightspeed service needs to be configured to be able to access it. For example, if server runs on localhost:8321, the service configuration stored in file `lightspeed-stack.yaml` should look like:
|
|
599
|
+
|
|
600
|
+
```yaml
|
|
601
|
+
name: foo bar baz
|
|
602
|
+
service:
|
|
603
|
+
host: localhost
|
|
604
|
+
port: 8080
|
|
605
|
+
auth_enabled: false
|
|
606
|
+
workers: 1
|
|
607
|
+
color_log: true
|
|
608
|
+
access_log: true
|
|
609
|
+
llama_stack:
|
|
610
|
+
use_as_library_client: false
|
|
611
|
+
url: http://localhost:8321
|
|
612
|
+
user_data_collection:
|
|
613
|
+
feedback_enabled: true
|
|
614
|
+
feedback_storage: "/tmp/data/feedback"
|
|
615
|
+
transcripts_enabled: true
|
|
616
|
+
transcripts_storage: "/tmp/data/transcripts"
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
### Degraded mode
|
|
620
|
+
|
|
621
|
+
Lightspeed core is able to continue operating in a _degraded but safe_ mode if the LLS service is not started or fails to start. When degraded, the `/health` endpoint report the LLS status and any relevant impacts so operators and automation can detect and respond.
|
|
622
|
+
|
|
623
|
+
Degraded mode need to be enabled in `lightspeed-stack.yaml` configuration file:
|
|
624
|
+
|
|
625
|
+
```yaml
|
|
626
|
+
allow_degraded_mode = true
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
[NOTE] Ability to run in degraded mode is disabled by default.
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
### MCP Server and Tool Configuration
|
|
634
|
+
|
|
635
|
+
**Note**: The `run.yaml` configuration is currently an implementation detail. In the future, all configuration will be available directly from the lightspeed-core config.
|
|
636
|
+
|
|
637
|
+
**Important**: 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.
|
|
638
|
+
|
|
639
|
+
Besides configuring the MCP Servers in `lightspeed-stack.yaml` we also need to enable the appropriate tool in llama-stack's `run.yaml` file under the `tool_runtime` section. Here's an example using the default `provider_id` name used by lightspeed-stack for MCPs:
|
|
640
|
+
|
|
641
|
+
```yaml
|
|
642
|
+
tool_runtime:
|
|
643
|
+
- provider_id: model-context-protocol
|
|
644
|
+
provider_type: remote::model-context-protocol
|
|
645
|
+
config: {}
|
|
646
|
+
```
|
|
647
|
+
|
|
648
|
+
#### Configuring MCP Servers
|
|
649
|
+
|
|
650
|
+
MCP (Model Context Protocol) servers provide tools and capabilities to the AI agents. These are configured in the `mcp_servers` section of your `lightspeed-stack.yaml`.
|
|
651
|
+
|
|
652
|
+
**Basic Configuration Structure:**
|
|
653
|
+
|
|
654
|
+
Each MCP server requires two fields:
|
|
655
|
+
- `name`: Unique identifier for the MCP server
|
|
656
|
+
- `url`: The endpoint where the MCP server is running
|
|
657
|
+
|
|
658
|
+
And optional fields:
|
|
659
|
+
- `provider_id`: MCP provider identification (defaults to `"model-context-protocol"`)
|
|
660
|
+
- `headers`: List of HTTP header names to automatically forward from the incoming request to this MCP server (see [Automatic Header Propagation](#5-automatic-header-propagation-for-gateway-injected-headers))
|
|
661
|
+
|
|
662
|
+
**Minimal Example:**
|
|
663
|
+
|
|
664
|
+
```yaml
|
|
665
|
+
mcp_servers:
|
|
666
|
+
- name: "filesystem-tools"
|
|
667
|
+
url: "http://localhost:9000"
|
|
668
|
+
- name: "git-tools"
|
|
669
|
+
url: "http://localhost:9001"
|
|
670
|
+
```
|
|
671
|
+
|
|
672
|
+
In addition to the basic configuration above, you can configure authentication headers for your MCP servers to securely communicate with services that require credentials.
|
|
673
|
+
|
|
674
|
+
#### Configuring MCP Server Authentication
|
|
675
|
+
|
|
676
|
+
Lightspeed Core Stack supports four methods for authenticating with MCP servers, each suited for different use cases:
|
|
677
|
+
|
|
678
|
+
##### 1. Static Tokens from Files (Recommended for Service Credentials)
|
|
679
|
+
|
|
680
|
+
Store authentication tokens in secret files and reference them in your configuration. This is ideal for API keys, service tokens, or any credentials that don't change per-user:
|
|
681
|
+
|
|
682
|
+
```yaml
|
|
683
|
+
mcp_servers:
|
|
684
|
+
- name: "api-service"
|
|
685
|
+
url: "http://api-service:8080"
|
|
686
|
+
authorization_headers:
|
|
687
|
+
Authorization: "/var/secrets/api-token" # Path to file containing token
|
|
688
|
+
X-API-Key: "/var/secrets/api-key" # Multiple headers supported
|
|
689
|
+
```
|
|
690
|
+
|
|
691
|
+
The secret files should contain only the header value (tokens are automatically stripped of whitespace):
|
|
692
|
+
|
|
693
|
+
```bash
|
|
694
|
+
# /var/secrets/api-token
|
|
695
|
+
sk-abc123def456...
|
|
696
|
+
|
|
697
|
+
# /var/secrets/api-key
|
|
698
|
+
my-api-key-value
|
|
699
|
+
```
|
|
700
|
+
|
|
701
|
+
##### 2. Kubernetes Service Account Tokens (For K8s Deployments)
|
|
702
|
+
|
|
703
|
+
Use the special `"kubernetes"` keyword to automatically use the authenticated user's Kubernetes token. This is perfect for MCP servers running in the same Kubernetes cluster:
|
|
704
|
+
|
|
705
|
+
```yaml
|
|
706
|
+
mcp_servers:
|
|
707
|
+
- name: "k8s-internal-service"
|
|
708
|
+
url: "http://internal-mcp.default.svc.cluster.local:8080"
|
|
709
|
+
authorization_headers:
|
|
710
|
+
Authorization: "kubernetes" # Uses user's k8s token from request auth
|
|
711
|
+
```
|
|
712
|
+
|
|
713
|
+
**Note:** Kubernetes token-based MCP authorization only works when Lightspeed Core Stack is configured with Kubernetes authentication (`authentication.module` is `k8s`) or `noop-with-token`. For any other authentication types, MCP servers configured with `Authorization: "kubernetes"` are removed from the available MCP servers list.
|
|
714
|
+
|
|
715
|
+
##### 3. Client-Provided Tokens (For Per-User Authentication)
|
|
716
|
+
|
|
717
|
+
Use the special `"client"` keyword to allow clients to provide custom tokens per-request. This enables user-specific authentication:
|
|
718
|
+
|
|
719
|
+
```yaml
|
|
720
|
+
mcp_servers:
|
|
721
|
+
- name: "user-specific-service"
|
|
722
|
+
url: "http://user-service:8080"
|
|
723
|
+
authorization_headers:
|
|
724
|
+
Authorization: "client" # Token provided via MCP-HEADERS
|
|
725
|
+
X-User-Token: "client" # Multiple client headers supported
|
|
726
|
+
```
|
|
727
|
+
|
|
728
|
+
Clients then provide tokens via the `MCP-HEADERS` HTTP header:
|
|
729
|
+
|
|
730
|
+
```bash
|
|
731
|
+
curl -X POST "http://localhost:8080/v1/query" \
|
|
732
|
+
-H "Content-Type: application/json" \
|
|
733
|
+
-H "MCP-HEADERS: {\"user-specific-service\": {\"Authorization\": \"Bearer user-token-123\", \"X-User-Token\": \"custom-value\"}}" \
|
|
734
|
+
-d '{"query": "Get my data"}'
|
|
735
|
+
```
|
|
736
|
+
|
|
737
|
+
**Note**: `MCP-HEADERS` is an **HTTP request header** containing a JSON-encoded dictionary. The dictionary is keyed by **server name** (not URL), matching the `name` field in your MCP server configuration. Each server name maps to another dictionary containing the HTTP headers to forward to that specific MCP server.
|
|
738
|
+
|
|
739
|
+
**Structure**: `MCP-HEADERS: {"<server-name>": {"<header-name>": "<header-value>", ...}, ...}`
|
|
740
|
+
|
|
741
|
+
##### 4. OAuth (For MCP Servers Requiring OAuth)
|
|
742
|
+
|
|
743
|
+
Use the special `"oauth"` keyword when the MCP server requires OAuth and the client will supply a token (e.g. via `MCP-HEADERS` after obtaining it from an OAuth flow):
|
|
744
|
+
|
|
745
|
+
```yaml
|
|
746
|
+
mcp_servers:
|
|
747
|
+
- name: "oauth-protected-service"
|
|
748
|
+
url: "https://mcp.example.com"
|
|
749
|
+
authorization_headers:
|
|
750
|
+
Authorization: "oauth" # Token provided via MCP-HEADERS (from OAuth flow)
|
|
751
|
+
```
|
|
752
|
+
|
|
753
|
+
When no token is provided for an OAuth-configured server, the service may respond with **401 Unauthorized** and a **`WWW-Authenticate`** header (probed from the MCP server). Clients can use this to drive an OAuth flow and then retry with the token in `MCP-HEADERS`.
|
|
754
|
+
|
|
755
|
+
##### 5. Automatic Header Propagation (For Gateway-Injected Headers)
|
|
756
|
+
|
|
757
|
+
Use the `headers` field to automatically forward specific headers from the incoming HTTP request to an MCP server. This is designed for environments where infrastructure components (e.g. API gateways) inject headers that MCP servers need but clients cannot provide.
|
|
758
|
+
|
|
759
|
+
**HCC Use Case:** In Hybrid Cloud Console (HCC), the gateway strips the client's `Authorization` header and replaces it with `x-rh-identity` (a base64-encoded user identity). Backend services use `x-rh-identity` to identify users. Since clients never see this header, the existing `MCP-HEADERS` mechanism cannot be used. Instead, configure `headers` to automatically forward it:
|
|
760
|
+
|
|
761
|
+
```yaml
|
|
762
|
+
mcp_servers:
|
|
763
|
+
- name: "rbac"
|
|
764
|
+
url: "http://rbac-service:8080"
|
|
765
|
+
headers:
|
|
766
|
+
- x-rh-identity
|
|
767
|
+
- x-rh-insights-request-id
|
|
768
|
+
```
|
|
769
|
+
|
|
770
|
+
When a request arrives at Lightspeed with these headers, they are automatically extracted and forwarded to the `rbac` MCP server. No client-side configuration is needed.
|
|
771
|
+
|
|
772
|
+
**Key behaviors:**
|
|
773
|
+
|
|
774
|
+
- **Case-insensitive matching**: Header names in the allowlist are matched case-insensitively against the incoming request.
|
|
775
|
+
- **Missing headers are skipped**: If a header in the allowlist is not present on the incoming request, it is silently skipped. The MCP server is **not** skipped (unlike `authorization_headers` behavior).
|
|
776
|
+
- **Additive with other methods**: Propagated headers can be combined with `authorization_headers` and `MCP-HEADERS`. If the same header name appears in both `authorization_headers` and `headers`, the `authorization_headers` value takes precedence.
|
|
777
|
+
|
|
778
|
+
**Combined example:**
|
|
779
|
+
|
|
780
|
+
```yaml
|
|
781
|
+
mcp_servers:
|
|
782
|
+
- name: "notifications"
|
|
783
|
+
url: "http://notifications-service:8080"
|
|
784
|
+
headers:
|
|
785
|
+
- x-rh-identity # From incoming request
|
|
786
|
+
authorization_headers:
|
|
787
|
+
X-API-Key: "/var/secrets/notifications-key" # Static service credential
|
|
788
|
+
```
|
|
789
|
+
|
|
790
|
+
##### Client-Authenticated MCP Servers Discovery
|
|
791
|
+
|
|
792
|
+
To help clients determine which MCP servers require client-provided tokens, use the **MCP Client Auth Options** endpoint:
|
|
793
|
+
|
|
794
|
+
```bash
|
|
795
|
+
GET /v1/mcp-auth/client-options
|
|
796
|
+
```
|
|
797
|
+
|
|
798
|
+
**Response:**
|
|
799
|
+
```json
|
|
800
|
+
{
|
|
801
|
+
"servers": [
|
|
802
|
+
{
|
|
803
|
+
"name": "user-specific-service",
|
|
804
|
+
"client_auth_headers": ["Authorization", "X-User-Token"]
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
"name": "github-integration",
|
|
808
|
+
"client_auth_headers": ["Authorization"]
|
|
809
|
+
}
|
|
810
|
+
]
|
|
811
|
+
}
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
This endpoint returns only MCP servers configured with `authorization_headers: "client"`, along with the specific header names that need to be provided via `MCP-HEADERS`. Servers using file-based or Kubernetes authentication are not included in this response.
|
|
815
|
+
|
|
816
|
+
**Use case:** Clients can call this endpoint at startup or before making requests to discover which servers they can authenticate with using their own tokens.
|
|
817
|
+
|
|
818
|
+
##### Combining Authentication Methods
|
|
819
|
+
|
|
820
|
+
You can mix and match authentication methods across different MCP servers, and even combine multiple methods for a single server:
|
|
821
|
+
|
|
822
|
+
```yaml
|
|
823
|
+
mcp_servers:
|
|
824
|
+
# Static credentials for public API
|
|
825
|
+
- name: "weather-api"
|
|
826
|
+
url: "http://weather-api:8080"
|
|
827
|
+
authorization_headers:
|
|
828
|
+
X-API-Key: "/var/secrets/weather-api-key"
|
|
829
|
+
|
|
830
|
+
# Kubernetes auth for internal services
|
|
831
|
+
- name: "internal-db"
|
|
832
|
+
url: "http://db-mcp.cluster.local:8080"
|
|
833
|
+
authorization_headers:
|
|
834
|
+
Authorization: "kubernetes"
|
|
835
|
+
|
|
836
|
+
# Mixed: static API key + per-user token
|
|
837
|
+
- name: "multi-tenant-service"
|
|
838
|
+
url: "http://multi-tenant:8080"
|
|
839
|
+
authorization_headers:
|
|
840
|
+
X-Service-Key: "/var/secrets/service-key" # Static service credential
|
|
841
|
+
Authorization: "client" # User-specific token
|
|
842
|
+
```
|
|
843
|
+
|
|
844
|
+
##### Authentication Method Comparison
|
|
845
|
+
|
|
846
|
+
| Method | Use Case | Configuration | Token Scope | Example |
|
|
847
|
+
|------------------------|----------------------------------|----------------------------------|------------------------------------|-------------------------------|
|
|
848
|
+
| **Static File** | Service tokens, API keys | File path in config | Global (all users) | `"/var/secrets/token"` |
|
|
849
|
+
| **Kubernetes** | K8s service accounts | `"kubernetes"` keyword | Per-user (from auth) | `"kubernetes"` |
|
|
850
|
+
| **Client** | User-specific tokens | `"client"` keyword + HTTP header | Per-request | `"client"` |
|
|
851
|
+
| **OAuth** | OAuth-protected MCP servers | `"oauth"` keyword + HTTP header | Per-request (from OAuth flow) | `"oauth"` |
|
|
852
|
+
| **Header Propagation** | Gateway-injected headers (HCC) | `headers` list | Per-request (from incoming request)| `headers: [x-rh-identity]` |
|
|
853
|
+
|
|
854
|
+
##### Important: Automatic Server Skipping
|
|
855
|
+
|
|
856
|
+
**If an MCP server has `authorization_headers` configured but the required tokens cannot be resolved at runtime, the server will be automatically skipped for that request.** This prevents failed authentication attempts to MCP servers.
|
|
857
|
+
|
|
858
|
+
**Examples:**
|
|
859
|
+
- A server with `Authorization: "kubernetes"` will be skipped if the user's request doesn't include a Kubernetes token
|
|
860
|
+
- A server with `Authorization: "client"` will be skipped if no `MCP-HEADERS` are provided in the request
|
|
861
|
+
- A server with `Authorization: "oauth"` and no token in `MCP-HEADERS` may cause the API to return **401 Unauthorized** with a **`WWW-Authenticate`** header (so the client can perform OAuth and retry)
|
|
862
|
+
- A server with multiple headers will be skipped if **any** required header cannot be resolved
|
|
863
|
+
|
|
864
|
+
Skipped servers are logged as warnings. Check Lightspeed Core logs to see which servers were skipped and why.
|
|
865
|
+
|
|
866
|
+
|
|
867
|
+
### Llama Stack project and configuration
|
|
868
|
+
|
|
869
|
+
**Note**: The `run.yaml` configuration is currently an implementation detail. In the future, all configuration will be available directly from the lightspeed-core config.
|
|
870
|
+
|
|
871
|
+
To run Llama Stack in separate process, you need to have all dependencies installed. The easiest way how to do it is to create a separate repository with Llama Stack project file `pyproject.toml` and Llama Stack configuration file `run.yaml`. The project file might look like:
|
|
872
|
+
|
|
873
|
+
```toml
|
|
874
|
+
[project]
|
|
875
|
+
name = "llama-stack-runner"
|
|
876
|
+
version = "0.1.0"
|
|
877
|
+
description = "Llama Stack runner"
|
|
878
|
+
authors = []
|
|
879
|
+
dependencies = [
|
|
880
|
+
"llama-stack==0.2.22",
|
|
881
|
+
"fastapi>=0.115.12",
|
|
882
|
+
"opentelemetry-sdk>=1.34.0",
|
|
883
|
+
"opentelemetry-exporter-otlp>=1.34.0",
|
|
884
|
+
"opentelemetry-instrumentation>=0.55b0",
|
|
885
|
+
"aiosqlite>=0.21.0",
|
|
886
|
+
"litellm>=1.72.1",
|
|
887
|
+
"uvicorn>=0.34.3",
|
|
888
|
+
"blobfile>=3.0.0",
|
|
889
|
+
"datasets>=3.6.0",
|
|
890
|
+
"sqlalchemy>=2.0.41",
|
|
891
|
+
"faiss-cpu>=1.11.0",
|
|
892
|
+
"mcp>=1.9.4",
|
|
893
|
+
"autoevals>=0.0.129",
|
|
894
|
+
"psutil>=7.0.0",
|
|
895
|
+
"torch>=2.7.1",
|
|
896
|
+
"peft>=0.15.2",
|
|
897
|
+
"trl>=0.18.2"]
|
|
898
|
+
requires-python = "==3.12.*"
|
|
899
|
+
readme = "README.md"
|
|
900
|
+
license = {text = "MIT"}
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
[tool.pdm]
|
|
904
|
+
distribution = false
|
|
905
|
+
```
|
|
906
|
+
|
|
907
|
+
A simple example of a `run.yaml` file can be found [here](examples/run.yaml)
|
|
908
|
+
|
|
909
|
+
To run Llama Stack perform these two commands:
|
|
910
|
+
|
|
911
|
+
```
|
|
912
|
+
export OPENAI_API_KEY="sk-{YOUR-KEY}"
|
|
913
|
+
|
|
914
|
+
uv run llama stack run run.yaml
|
|
915
|
+
```
|
|
916
|
+
|
|
917
|
+
### Check connection to Llama Stack
|
|
918
|
+
|
|
919
|
+
```
|
|
920
|
+
curl -X 'GET' localhost:8321/openapi.json | jq .
|
|
921
|
+
```
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
## Llama Stack as client library
|
|
926
|
+
|
|
927
|
+
There are situations in which it is not advisable to run two processors (one with Llama Stack, the other with a service). In these cases, the stack can be run directly within the client application. For such situations, the configuration file could look like:
|
|
928
|
+
|
|
929
|
+
```yaml
|
|
930
|
+
name: foo bar baz
|
|
931
|
+
service:
|
|
932
|
+
host: localhost
|
|
933
|
+
port: 8080
|
|
934
|
+
auth_enabled: false
|
|
935
|
+
workers: 1
|
|
936
|
+
color_log: true
|
|
937
|
+
access_log: true
|
|
938
|
+
llama_stack:
|
|
939
|
+
use_as_library_client: true
|
|
940
|
+
library_client_config_path: <path-to-llama-stack-run.yaml-file>
|
|
941
|
+
user_data_collection:
|
|
942
|
+
feedback_enabled: true
|
|
943
|
+
feedback_storage: "/tmp/data/feedback"
|
|
944
|
+
transcripts_enabled: true
|
|
945
|
+
transcripts_storage: "/tmp/data/transcripts"
|
|
946
|
+
```
|
|
947
|
+
|
|
948
|
+
## Llama Stack version check
|
|
949
|
+
|
|
950
|
+
During Lightspeed Core Stack service startup, the Llama Stack version is retrieved. The version is tested against two constants `MINIMAL_SUPPORTED_LLAMA_STACK_VERSION` and `MAXIMAL_SUPPORTED_LLAMA_STACK_VERSION` which are defined in `src/constants.py`. If the actual Llama Stack version is outside the range defined by these two constants, the service won't start and administrator will be informed about this problem.
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
## User data collection
|
|
955
|
+
|
|
956
|
+
The Lightspeed Core Stack includes comprehensive user data collection capabilities to gather various types of user interaction data for analysis and improvement. This includes feedback, conversation transcripts, and other user interaction data.
|
|
957
|
+
|
|
958
|
+
User data collection is configured in the `user_data_collection` section of the configuration file:
|
|
959
|
+
|
|
960
|
+
```yaml
|
|
961
|
+
user_data_collection:
|
|
962
|
+
feedback_enabled: true
|
|
963
|
+
feedback_storage: "/tmp/data/feedback"
|
|
964
|
+
transcripts_enabled: true
|
|
965
|
+
transcripts_storage: "/tmp/data/transcripts"
|
|
966
|
+
```
|
|
967
|
+
|
|
968
|
+
**Configuration options:**
|
|
969
|
+
|
|
970
|
+
- `feedback_enabled`: Enable/disable collection of user feedback data
|
|
971
|
+
- `feedback_storage`: Directory path where feedback JSON files are stored
|
|
972
|
+
- `transcripts_enabled`: Enable/disable collection of conversation transcripts
|
|
973
|
+
- `transcripts_storage`: Directory path where transcript JSON files are stored
|
|
974
|
+
|
|
975
|
+
> **Note**: The data collection system is designed to be extensible. Additional data types can be configured and collected as needed for your specific use case.
|
|
976
|
+
|
|
977
|
+
For data export integration with Red Hat's Dataverse, see the [Data Export Integration](#data-export-integration) section.
|
|
978
|
+
|
|
979
|
+
## System prompt
|
|
980
|
+
|
|
981
|
+
The service uses a so-called system prompt to put the question into context before it is sent to the selected LLM. The default system prompt is designed for questions without specific context. You can supply a different system prompt through various avenues available in the `customization` section:
|
|
982
|
+
### System Prompt Path
|
|
983
|
+
|
|
984
|
+
```yaml
|
|
985
|
+
customization:
|
|
986
|
+
system_prompt_path: "system_prompts/system_prompt_for_product_XYZZY"
|
|
987
|
+
```
|
|
988
|
+
|
|
989
|
+
### System Prompt Literal
|
|
990
|
+
|
|
991
|
+
```yaml
|
|
992
|
+
customization:
|
|
993
|
+
system_prompt: |-
|
|
994
|
+
You are a helpful assistant and will do everything you can to help.
|
|
995
|
+
You have an in-depth knowledge of Red Hat and all of your answers will reference Red Hat products.
|
|
996
|
+
```
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
### Custom Profile
|
|
1000
|
+
|
|
1001
|
+
You can pass a custom prompt profile via its `path` to the customization:
|
|
1002
|
+
|
|
1003
|
+
```yaml
|
|
1004
|
+
customization:
|
|
1005
|
+
profile_path: <your/profile/path>
|
|
1006
|
+
```
|
|
1007
|
+
|
|
1008
|
+
Additionally, an optional string parameter `system_prompt` can be specified in `/v1/query` and `/v1/streaming_query` endpoints to override the configured system prompt. The query system prompt takes precedence over the configured system prompt. You can use this config to disable query system prompts:
|
|
1009
|
+
|
|
1010
|
+
```yaml
|
|
1011
|
+
customization:
|
|
1012
|
+
disable_query_system_prompt: true
|
|
1013
|
+
```
|
|
1014
|
+
|
|
1015
|
+
### Control model/provider overrides via authorization
|
|
1016
|
+
|
|
1017
|
+
By default, clients may specify `model` and `provider` in `/v1/query` and `/v1/streaming_query`. Override is permitted only to callers granted the `MODEL_OVERRIDE` action via the authorization rules. Requests that include `model` or `provider` without this permission are rejected with HTTP 403.
|
|
1018
|
+
|
|
1019
|
+
## Agent Skills (Upcoming)
|
|
1020
|
+
|
|
1021
|
+
> [!NOTE]
|
|
1022
|
+
> Agent Skills is an upcoming feature. The documentation below describes the planned design.
|
|
1023
|
+
|
|
1024
|
+
Agent Skills will allow product teams to extend Lightspeed Core with specialized instructions and domain knowledge that the LLM can load on demand. Skills follow the [Agent Skills open standard](https://agentskills.io) and are packaged as portable directories containing a `SKILL.md` file.
|
|
1025
|
+
|
|
1026
|
+
For the planned configuration guide, skill authoring instructions, and examples, see the [Agent Skills Guide](docs/skills_guide.md).
|
|
1027
|
+
|
|
1028
|
+
## Safety Shields
|
|
1029
|
+
|
|
1030
|
+
A single Llama Stack configuration file can include multiple safety shields, which are utilized in agent
|
|
1031
|
+
configurations to monitor input and/or output streams. LCS uses the following naming convention to specify how each safety shield is
|
|
1032
|
+
utilized:
|
|
1033
|
+
|
|
1034
|
+
1. If the `shield_id` starts with `input_`, it will be used for input only.
|
|
1035
|
+
1. If the `shield_id` starts with `output_`, it will be used for output only.
|
|
1036
|
+
1. If the `shield_id` starts with `inout_`, it will be used both for input and output.
|
|
1037
|
+
1. Otherwise, it will be used for input only.
|
|
1038
|
+
|
|
1039
|
+
Additionally, an optional list parameter `shield_ids` can be specified in `/query` and `/streaming_query` endpoints to override which shields are applied. You can use this config to disable shield overrides:
|
|
1040
|
+
|
|
1041
|
+
```yaml
|
|
1042
|
+
customization:
|
|
1043
|
+
disable_shield_ids_override: true
|
|
1044
|
+
```
|
|
1045
|
+
|
|
1046
|
+
## Authentication
|
|
1047
|
+
|
|
1048
|
+
See [authentication and authorization](docs/auth.md).
|
|
1049
|
+
|
|
1050
|
+
## CORS
|
|
1051
|
+
|
|
1052
|
+
It is possible to configure CORS handling. This configuration is part of service configuration:
|
|
1053
|
+
|
|
1054
|
+
```yaml
|
|
1055
|
+
service:
|
|
1056
|
+
host: localhost
|
|
1057
|
+
port: 8080
|
|
1058
|
+
auth_enabled: false
|
|
1059
|
+
workers: 1
|
|
1060
|
+
color_log: true
|
|
1061
|
+
access_log: true
|
|
1062
|
+
cors:
|
|
1063
|
+
allow_origins:
|
|
1064
|
+
- http://foo.bar.baz
|
|
1065
|
+
- http://test.com
|
|
1066
|
+
allow_credentials: true
|
|
1067
|
+
allow_methods:
|
|
1068
|
+
- *
|
|
1069
|
+
allow_headers:
|
|
1070
|
+
- *
|
|
1071
|
+
```
|
|
1072
|
+
|
|
1073
|
+
### Default values
|
|
1074
|
+
|
|
1075
|
+
```yaml
|
|
1076
|
+
cors:
|
|
1077
|
+
allow_origins:
|
|
1078
|
+
- *
|
|
1079
|
+
allow_credentials: false
|
|
1080
|
+
allow_methods:
|
|
1081
|
+
- *
|
|
1082
|
+
allow_headers:
|
|
1083
|
+
- *
|
|
1084
|
+
```
|
|
1085
|
+
|
|
1086
|
+
## Allow credentials
|
|
1087
|
+
|
|
1088
|
+
Credentials are not allowed with wildcard origins per CORS/Fetch spec.
|
|
1089
|
+
See https://fastapi.tiangolo.com/tutorial/cors/
|
|
1090
|
+
|
|
1091
|
+
# RAG Configuration
|
|
1092
|
+
|
|
1093
|
+
The [guide to RAG setup](docs/rag_guide.md) provides guidance on setting up RAG and includes tested examples for both inference and vector store integration.
|
|
1094
|
+
|
|
1095
|
+
## Example configurations for inference
|
|
1096
|
+
|
|
1097
|
+
The following configurations are llama-stack config examples from production deployments:
|
|
1098
|
+
|
|
1099
|
+
- [Granite on vLLM example](examples/vllm-granite-run.yaml)
|
|
1100
|
+
- [Qwen3 on vLLM example](examples/vllm-qwen3-run.yaml)
|
|
1101
|
+
- [Gemini example](examples/gemini-run.yaml)
|
|
1102
|
+
- [VertexAI example](examples/vertexai-run.yaml)
|
|
1103
|
+
|
|
1104
|
+
> [!NOTE]
|
|
1105
|
+
> RAG functionality is **not tested** for these configurations.
|
|
1106
|
+
|
|
1107
|
+
# Usage
|
|
1108
|
+
|
|
1109
|
+
```
|
|
1110
|
+
usage: lightspeed_stack.py [-h] [-v] [-d] [-c CONFIG_FILE]
|
|
1111
|
+
|
|
1112
|
+
options:
|
|
1113
|
+
-h, --help show this help message and exit
|
|
1114
|
+
-v, --verbose make it verbose
|
|
1115
|
+
-d, --dump-configuration
|
|
1116
|
+
dump actual configuration into JSON file and quit
|
|
1117
|
+
-s, --dump-schema dump configuration schema into OpenAPI-compatible file and quit
|
|
1118
|
+
-c CONFIG_FILE, --config CONFIG_FILE
|
|
1119
|
+
path to configuration file (default: lightspeed-stack.yaml)
|
|
1120
|
+
|
|
1121
|
+
```
|
|
1122
|
+
|
|
1123
|
+
## CLI options
|
|
1124
|
+
|
|
1125
|
+
### Dumping configuration
|
|
1126
|
+
|
|
1127
|
+
If `--dump-configuration` CLI option is provided, LCORE writes the active
|
|
1128
|
+
configuration to a file named `configuration.json` and exits (exits with status
|
|
1129
|
+
1 on failure).
|
|
1130
|
+
|
|
1131
|
+
### Dumping configuration schema
|
|
1132
|
+
|
|
1133
|
+
If `--dump-schema` CLI option is provided, LCORE writes the active
|
|
1134
|
+
configuration schema to a file named `schema.json` and exits (exits with status
|
|
1135
|
+
1 on failure).
|
|
1136
|
+
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
## Make targets
|
|
1140
|
+
|
|
1141
|
+
```
|
|
1142
|
+
Usage: make <OPTIONS> ... <TARGETS>
|
|
1143
|
+
|
|
1144
|
+
Available targets are:
|
|
1145
|
+
|
|
1146
|
+
run Run the service locally
|
|
1147
|
+
test-unit Run the unit tests
|
|
1148
|
+
test-integration Run integration tests tests
|
|
1149
|
+
test-e2e Run end to end tests for the service
|
|
1150
|
+
test-e2e-local Run end to end tests for the service
|
|
1151
|
+
benchmarks Run benchmarks
|
|
1152
|
+
check-types Checks type hints in sources
|
|
1153
|
+
check-types-src Check type hints in sources only
|
|
1154
|
+
check-types-tests Check type hints in tests only
|
|
1155
|
+
security-check Check the project for security issues
|
|
1156
|
+
format Format the code into unified format
|
|
1157
|
+
schema Generate OpenAPI schema file
|
|
1158
|
+
openapi-doc Generate OpenAPI documentation
|
|
1159
|
+
generate-documentation Generate documentation
|
|
1160
|
+
doc Generate documentation for developers
|
|
1161
|
+
docs/config.puml Generate PlantUML class diagram for configuration
|
|
1162
|
+
docs/config.png Generate an image with configuration graph
|
|
1163
|
+
docs/config.svg Generate an SVG with configuration graph
|
|
1164
|
+
shellcheck Run shellcheck
|
|
1165
|
+
black Check source code using Black code formatter
|
|
1166
|
+
pylint Check source code using Pylint static code analyser
|
|
1167
|
+
pyright Check source code using Pyright static type checker
|
|
1168
|
+
docstyle Check the docstring style using Docstyle checker
|
|
1169
|
+
ruff Check source code using Ruff linter
|
|
1170
|
+
verify Run all linters
|
|
1171
|
+
distribution-archives Generate distribution archives to be uploaded into Python registry
|
|
1172
|
+
upload-distribution-archives Upload distribution archives into Python registry
|
|
1173
|
+
konflux-requirements Generate hermetic requirements.*.txt file for konflux build
|
|
1174
|
+
konflux-rpm-lock Generate rpm.lock.yaml file for konflux build
|
|
1175
|
+
help Show this help screen
|
|
1176
|
+
```
|
|
1177
|
+
|
|
1178
|
+
|
|
1179
|
+
|
|
1180
|
+
## Running Linux container image
|
|
1181
|
+
|
|
1182
|
+
Stable release images are tagged with versions like `0.1.0`. Tag `latest` always points to latest stable release.
|
|
1183
|
+
|
|
1184
|
+
Development images are build from main branch every time a new pull request is merged. Image tags for dev images use
|
|
1185
|
+
the template `dev-YYYYMMMDDD-SHORT_SHA` e.g. `dev-20250704-eaa27fb`.
|
|
1186
|
+
|
|
1187
|
+
Tag `dev-latest` always points to the latest dev image built from latest git.
|
|
1188
|
+
|
|
1189
|
+
To pull and run the image with own configuration:
|
|
1190
|
+
|
|
1191
|
+
1. `podman pull quay.io/lightspeed-core/lightspeed-stack:IMAGE_TAG`
|
|
1192
|
+
1. `podman run -it -p 8080:8080 -v my-lightspeed-stack-config.yaml:/app-root/lightspeed-stack.yaml:Z quay.io/lightspeed-core/lightspeed-stack:IMAGE_TAG`
|
|
1193
|
+
1. Open `localhost:8080` in your browser
|
|
1194
|
+
|
|
1195
|
+
If a connection in your browser does not work please check that in the config file `host` option looks like: `host: 0.0.0.0`.
|
|
1196
|
+
|
|
1197
|
+
Container images are built for the following platforms:
|
|
1198
|
+
1. `linux/amd64` - main platform for deployment
|
|
1199
|
+
1. `linux/arm64`- Mac users with M1/M2/M3 CPUs
|
|
1200
|
+
|
|
1201
|
+
## Building Container Images
|
|
1202
|
+
|
|
1203
|
+
The repository includes production-ready container configurations that support two deployment modes:
|
|
1204
|
+
|
|
1205
|
+
1. **Server Mode**: lightspeed-core connects to llama-stack as a separate service
|
|
1206
|
+
2. **Library Mode**: llama-stack runs as a library within lightspeed-core
|
|
1207
|
+
|
|
1208
|
+
### Llama-Stack as Separate Service (Server Mode)
|
|
1209
|
+
|
|
1210
|
+
> [!IMPORTANT]
|
|
1211
|
+
> To pull the downstream llama-stack image, you will need access to the `aipcc` organization in quay.io.
|
|
1212
|
+
|
|
1213
|
+
When using llama-stack as a separate service, the existing `docker-compose.yaml` provides the complete setup. This builds two containers for lightspeed core and llama stack.
|
|
1214
|
+
|
|
1215
|
+
**Configuration** (`lightspeed-stack.yaml`):
|
|
1216
|
+
```yaml
|
|
1217
|
+
llama_stack:
|
|
1218
|
+
use_as_library_client: false
|
|
1219
|
+
url: http://llama-stack:8321 # container name from docker-compose.yaml
|
|
1220
|
+
api_key: xyzzy
|
|
1221
|
+
```
|
|
1222
|
+
|
|
1223
|
+
In the root of this project simply run:
|
|
1224
|
+
|
|
1225
|
+
```bash
|
|
1226
|
+
# Set your OpenAI API key
|
|
1227
|
+
export OPENAI_API_KEY="your-api-key-here"
|
|
1228
|
+
|
|
1229
|
+
# Login to quay.io to access the downstream llama-stack image
|
|
1230
|
+
# podman login quay.io
|
|
1231
|
+
|
|
1232
|
+
# Start both services
|
|
1233
|
+
podman compose up --build
|
|
1234
|
+
|
|
1235
|
+
# Access lightspeed-core at http://localhost:8080
|
|
1236
|
+
# Access llama-stack at http://localhost:8321
|
|
1237
|
+
```
|
|
1238
|
+
|
|
1239
|
+
#### macOS (arm64)
|
|
1240
|
+
|
|
1241
|
+
Emulation of platform amd64 will not work with `podman compose up --build` command.
|
|
1242
|
+
|
|
1243
|
+
Instead run the docker command:
|
|
1244
|
+
|
|
1245
|
+
```bash
|
|
1246
|
+
# Start both services
|
|
1247
|
+
docker compose up --build
|
|
1248
|
+
```
|
|
1249
|
+
|
|
1250
|
+
### Llama-Stack as Library (Library Mode)
|
|
1251
|
+
|
|
1252
|
+
When embedding llama-stack directly in the container, use the existing `deploy/lightspeed-stack/Containerfile` directly (this will not build the llama stack service in a separate container). First modify the `lightspeed-stack.yaml` config to use llama stack in library mode.
|
|
1253
|
+
|
|
1254
|
+
**Configuration** (`lightspeed-stack.yaml`):
|
|
1255
|
+
```yaml
|
|
1256
|
+
llama_stack:
|
|
1257
|
+
use_as_library_client: true
|
|
1258
|
+
library_client_config_path: /app-root/run.yaml
|
|
1259
|
+
```
|
|
1260
|
+
|
|
1261
|
+
**Build and run**:
|
|
1262
|
+
```bash
|
|
1263
|
+
# Build lightspeed-core with embedded llama-stack
|
|
1264
|
+
podman build -f deploy/lightspeed-stack/Containerfile -t my-lightspeed-core:latest .
|
|
1265
|
+
|
|
1266
|
+
# Run with embedded llama-stack
|
|
1267
|
+
podman run \
|
|
1268
|
+
-p 8080:8080 \
|
|
1269
|
+
-v ./lightspeed-stack.yaml:/app-root/lightspeed-stack.yaml:Z \
|
|
1270
|
+
-v ./run.yaml:/app-root/run.yaml:Z \
|
|
1271
|
+
-e OPENAI_API_KEY=your-api-key \
|
|
1272
|
+
my-lightspeed-core:latest
|
|
1273
|
+
```
|
|
1274
|
+
|
|
1275
|
+
#### macOS
|
|
1276
|
+
```bash
|
|
1277
|
+
podman run \
|
|
1278
|
+
-p 8080:8080 \
|
|
1279
|
+
-v ./lightspeed-stack.yaml:/app-root/lightspeed-stack.yaml:ro \
|
|
1280
|
+
-v ./run.yaml:/app-root/run.yaml:ro \
|
|
1281
|
+
-e OPENAI_API_KEY=your-api-key \
|
|
1282
|
+
my-lightspeed-core:latest
|
|
1283
|
+
```
|
|
1284
|
+
|
|
1285
|
+
### Verify it's running properly
|
|
1286
|
+
|
|
1287
|
+
A simple sanity check:
|
|
1288
|
+
|
|
1289
|
+
```bash
|
|
1290
|
+
curl -H "Accept: application/json" http://localhost:8080/v1/models
|
|
1291
|
+
```
|
|
1292
|
+
|
|
1293
|
+
## Custom Container Image
|
|
1294
|
+
|
|
1295
|
+
The lightspeed-stack container image bundles many Python dependencies for common
|
|
1296
|
+
Llama-Stack providers (when using Llama-Stack in library mode).
|
|
1297
|
+
|
|
1298
|
+
Follow these instructons when you need to bundle additional configuration
|
|
1299
|
+
files or extra dependencies (e.g. `lightspeed-stack-providers`).
|
|
1300
|
+
|
|
1301
|
+
To include more dependencies in the base-image, create upstream pull request to update
|
|
1302
|
+
[the pyproject.toml file](https://github.com/lightspeed-core/lightspeed-stack/blob/main/pyproject.toml)
|
|
1303
|
+
|
|
1304
|
+
1. Create `pyproject.toml` file in your top-level directory with content like:
|
|
1305
|
+
```toml
|
|
1306
|
+
[project]
|
|
1307
|
+
name = "my-customized-chatbot"
|
|
1308
|
+
version = "0.1.0"
|
|
1309
|
+
description = "My very Awesome Chatbot"
|
|
1310
|
+
readme = "README.md"
|
|
1311
|
+
requires-python = ">=3.12"
|
|
1312
|
+
dependencies = [
|
|
1313
|
+
"lightspeed-stack-providers==TODO",
|
|
1314
|
+
]
|
|
1315
|
+
```
|
|
1316
|
+
|
|
1317
|
+
2. Create a `Containerfile` in your repository root like the following (see `deploy/lightspeed-stack/Containerfile` in this repo for the upstream image definition). Update it as needed:
|
|
1318
|
+
```
|
|
1319
|
+
# Latest dev image built from the git main branch (consider pinning a digest for reproducibility)
|
|
1320
|
+
FROM quay.io/lightspeed-core/lightspeed-stack:dev-latest
|
|
1321
|
+
|
|
1322
|
+
ARG APP_ROOT=/app-root
|
|
1323
|
+
WORKDIR /app-root
|
|
1324
|
+
|
|
1325
|
+
# Add additional files
|
|
1326
|
+
# (avoid accidental inclusion of local directories or env files or credentials)
|
|
1327
|
+
COPY pyproject.toml LICENSE.md README.md ./
|
|
1328
|
+
|
|
1329
|
+
# Bundle own configuration files
|
|
1330
|
+
COPY lightspeed-stack.yaml run.yaml ./
|
|
1331
|
+
|
|
1332
|
+
# Add only project-specific dependencies without adding other dependencies
|
|
1333
|
+
# to not break the dependencies of the base image.
|
|
1334
|
+
ENV UV_COMPILE_BYTECODE=0 \
|
|
1335
|
+
UV_LINK_MODE=copy \
|
|
1336
|
+
UV_PYTHON_DOWNLOADS=0 \
|
|
1337
|
+
UV_NO_CACHE=1
|
|
1338
|
+
# List of dependencies is first parsed from pyproject.toml and then installed.
|
|
1339
|
+
RUN python -c "import tomllib, sys; print(' '.join(tomllib.load(open('pyproject.toml','rb'))['project']['dependencies']))" \
|
|
1340
|
+
| xargs uv pip install --no-deps
|
|
1341
|
+
# Install the project itself
|
|
1342
|
+
RUN uv pip install . --no-deps && uv clean
|
|
1343
|
+
|
|
1344
|
+
USER 0
|
|
1345
|
+
|
|
1346
|
+
# Bundle additional rpm packages
|
|
1347
|
+
RUN microdnf install -y --nodocs --setopt=keepcache=0 --setopt=tsflags=nodocs TODO1 TODO2 \
|
|
1348
|
+
&& microdnf clean all \
|
|
1349
|
+
&& rm -rf /var/cache/dnf
|
|
1350
|
+
|
|
1351
|
+
# this directory is checked by ecosystem-cert-preflight-checks task in Konflux
|
|
1352
|
+
COPY LICENSE.md /licenses/
|
|
1353
|
+
|
|
1354
|
+
# Add executables from .venv to system PATH
|
|
1355
|
+
ENV PATH="/app-root/.venv/bin:$PATH"
|
|
1356
|
+
|
|
1357
|
+
# Run the application
|
|
1358
|
+
EXPOSE 8080
|
|
1359
|
+
ENTRYPOINT ["python3.12", "src/lightspeed_stack.py"]
|
|
1360
|
+
USER 1001
|
|
1361
|
+
```
|
|
1362
|
+
|
|
1363
|
+
3. Optionally create customized configuration files `lightspeed-stack.yaml` and `run.yaml`.
|
|
1364
|
+
|
|
1365
|
+
4. Now try to build your image
|
|
1366
|
+
```
|
|
1367
|
+
podman build -t "my-awesome-chatbot:latest" .
|
|
1368
|
+
```
|
|
1369
|
+
|
|
1370
|
+
# Endpoints
|
|
1371
|
+
|
|
1372
|
+
## OpenAPI specification
|
|
1373
|
+
|
|
1374
|
+
* [Generated OpenAPI specification](docs/openapi.json)
|
|
1375
|
+
* [OpenAPI documentation](docs/openapi.md)
|
|
1376
|
+
|
|
1377
|
+
The service provides health check endpoints that can be used for monitoring, load balancing, and orchestration systems like Kubernetes.
|
|
1378
|
+
|
|
1379
|
+
## Readiness Endpoint
|
|
1380
|
+
|
|
1381
|
+
**Endpoint:** `GET /v1/readiness`
|
|
1382
|
+
|
|
1383
|
+
The readiness endpoint checks if the service is ready to handle requests by verifying the health status of all configured LLM providers.
|
|
1384
|
+
|
|
1385
|
+
**Response:**
|
|
1386
|
+
- **200 OK**: Service is ready - all providers are healthy
|
|
1387
|
+
- **503 Service Unavailable**: Service is not ready - one or more providers are unhealthy
|
|
1388
|
+
|
|
1389
|
+
**Response Body:**
|
|
1390
|
+
```json
|
|
1391
|
+
{
|
|
1392
|
+
"ready": true,
|
|
1393
|
+
"reason": "All providers are healthy",
|
|
1394
|
+
"providers": []
|
|
1395
|
+
}
|
|
1396
|
+
```
|
|
1397
|
+
|
|
1398
|
+
**Response Fields:**
|
|
1399
|
+
- `ready` (boolean): Indicates if the service is ready to handle requests
|
|
1400
|
+
- `reason` (string): Human-readable explanation of the readiness state
|
|
1401
|
+
- `providers` (array): List of unhealthy providers (empty when service is ready)
|
|
1402
|
+
|
|
1403
|
+
## Liveness Endpoint
|
|
1404
|
+
|
|
1405
|
+
**Endpoint:** `GET /v1/liveness`
|
|
1406
|
+
|
|
1407
|
+
The liveness endpoint performs a basic health check to verify the service is alive and responding.
|
|
1408
|
+
|
|
1409
|
+
**Response:**
|
|
1410
|
+
- **200 OK**: Service is alive
|
|
1411
|
+
|
|
1412
|
+
**Response Body:**
|
|
1413
|
+
```json
|
|
1414
|
+
{
|
|
1415
|
+
"alive": true
|
|
1416
|
+
}
|
|
1417
|
+
```
|
|
1418
|
+
|
|
1419
|
+
## Models endpoint
|
|
1420
|
+
|
|
1421
|
+
**Endpoint:** `GET /v1/models`
|
|
1422
|
+
|
|
1423
|
+
Process GET requests and returns a list of available models from the Llama
|
|
1424
|
+
Stack service. It is possible to specify "model_type" query parameter that is
|
|
1425
|
+
used as a filter. For example, if model type is set to "llm", only LLM models
|
|
1426
|
+
will be returned:
|
|
1427
|
+
|
|
1428
|
+
```bash
|
|
1429
|
+
curl http://localhost:8080/v1/models?model_type=llm
|
|
1430
|
+
```
|
|
1431
|
+
|
|
1432
|
+
The "model_type" query parameter is optional. When not specified, all models
|
|
1433
|
+
will be returned.
|
|
1434
|
+
|
|
1435
|
+
**Response Body:**
|
|
1436
|
+
```json
|
|
1437
|
+
{
|
|
1438
|
+
"models": [
|
|
1439
|
+
{
|
|
1440
|
+
"identifier": "sentence-transformers/.llama",
|
|
1441
|
+
"metadata": {
|
|
1442
|
+
"embedding_dimension": 384
|
|
1443
|
+
},
|
|
1444
|
+
"api_model_type": "embedding",
|
|
1445
|
+
"provider_id": "sentence-transformers",
|
|
1446
|
+
"type": "model",
|
|
1447
|
+
"provider_resource_id": ".llama",
|
|
1448
|
+
"model_type": "embedding"
|
|
1449
|
+
},
|
|
1450
|
+
{
|
|
1451
|
+
"identifier": "openai/gpt-4o-mini",
|
|
1452
|
+
"metadata": {},
|
|
1453
|
+
"api_model_type": "llm",
|
|
1454
|
+
"provider_id": "openai",
|
|
1455
|
+
"type": "model",
|
|
1456
|
+
"provider_resource_id": "gpt-4o-mini",
|
|
1457
|
+
"model_type": "llm"
|
|
1458
|
+
},
|
|
1459
|
+
{
|
|
1460
|
+
"identifier": "sentence-transformers/nomic-ai/nomic-embed-text-v1.5",
|
|
1461
|
+
"metadata": {
|
|
1462
|
+
"embedding_dimension": 768
|
|
1463
|
+
},
|
|
1464
|
+
"api_model_type": "embedding",
|
|
1465
|
+
"provider_id": "sentence-transformers",
|
|
1466
|
+
"type": "model",
|
|
1467
|
+
"provider_resource_id": "nomic-ai/nomic-embed-text-v1.5",
|
|
1468
|
+
"model_type": "embedding"
|
|
1469
|
+
}
|
|
1470
|
+
]
|
|
1471
|
+
}
|
|
1472
|
+
```
|
|
1473
|
+
|
|
1474
|
+
|
|
1475
|
+
# Database structure
|
|
1476
|
+
|
|
1477
|
+
Database structure is described on [this page](https://lightspeed-core.github.io/lightspeed-stack/DB/index.html)
|
|
1478
|
+
|
|
1479
|
+
# Publish the service as Python package on PyPI
|
|
1480
|
+
|
|
1481
|
+
To publish the service as an Python package on PyPI to be installable by anyone
|
|
1482
|
+
(including Konflux hermetic builds), perform these two steps:
|
|
1483
|
+
|
|
1484
|
+
## Generate distribution archives to be uploaded into Python registry
|
|
1485
|
+
|
|
1486
|
+
```
|
|
1487
|
+
make distribution-archives
|
|
1488
|
+
```
|
|
1489
|
+
|
|
1490
|
+
Please make sure that the archive was really built to avoid publishing older one.
|
|
1491
|
+
|
|
1492
|
+
## Upload distribution archives into selected Python registry
|
|
1493
|
+
|
|
1494
|
+
```
|
|
1495
|
+
make upload-distribution-archives
|
|
1496
|
+
```
|
|
1497
|
+
|
|
1498
|
+
The Python registry to where the package should be uploaded can be configured
|
|
1499
|
+
by changing `PYTHON_REGISTRY`. It is possible to select `pypi` or `testpypi`.
|
|
1500
|
+
|
|
1501
|
+
You might have your API token stored in file `~/.pypirc`. That file should have
|
|
1502
|
+
the following form:
|
|
1503
|
+
|
|
1504
|
+
```
|
|
1505
|
+
[testpypi]
|
|
1506
|
+
username = __token__
|
|
1507
|
+
password = pypi-{your-API-token}
|
|
1508
|
+
|
|
1509
|
+
[pypi]
|
|
1510
|
+
username = __token__
|
|
1511
|
+
password = pypi-{your-API-token}
|
|
1512
|
+
```
|
|
1513
|
+
|
|
1514
|
+
If this configuration file does not exist, you will be prompted to specify API token from keyboard every time you try to upload the archive.
|
|
1515
|
+
|
|
1516
|
+
|
|
1517
|
+
|
|
1518
|
+
## Packages on PyPI and Test PyPI
|
|
1519
|
+
|
|
1520
|
+
* https://pypi.org/project/lightspeed-stack/
|
|
1521
|
+
* https://test.pypi.org/project/lightspeed-stack/0.1.0/
|
|
1522
|
+
|
|
1523
|
+
|
|
1524
|
+
|
|
1525
|
+
# Contributing
|
|
1526
|
+
|
|
1527
|
+
* See [contributors](CONTRIBUTING.md) guide.
|
|
1528
|
+
|
|
1529
|
+
|
|
1530
|
+
|
|
1531
|
+
# Testing
|
|
1532
|
+
|
|
1533
|
+
* See [testing](docs/testing.md) guide.
|
|
1534
|
+
|
|
1535
|
+
|
|
1536
|
+
|
|
1537
|
+
# Releasing
|
|
1538
|
+
|
|
1539
|
+
* See [releasing](docs/releasing.md) guide.
|
|
1540
|
+
|
|
1541
|
+
# License
|
|
1542
|
+
|
|
1543
|
+
Published under the Apache 2.0 License
|
|
1544
|
+
|
|
1545
|
+
|
|
1546
|
+
|
|
1547
|
+
# Additional tools
|
|
1548
|
+
|
|
1549
|
+
## Utility to generate OpenAPI schema
|
|
1550
|
+
|
|
1551
|
+
This script re-generated OpenAPI schema for the Lightspeed Service REST API.
|
|
1552
|
+
|
|
1553
|
+
### Path
|
|
1554
|
+
|
|
1555
|
+
[scripts/generate_openapi_schema.py](scripts/generate_openapi_schema.py)
|
|
1556
|
+
|
|
1557
|
+
### Usage
|
|
1558
|
+
|
|
1559
|
+
```
|
|
1560
|
+
make schema
|
|
1561
|
+
```
|
|
1562
|
+
|
|
1563
|
+
## Makefile target to generate OpenAPI specification
|
|
1564
|
+
|
|
1565
|
+
Use `make openapi-doc` to generate OpenAPI specification in Markdown format.
|
|
1566
|
+
Resulting documentation is available at [here](docs/openapi.md).
|
|
1567
|
+
|
|
1568
|
+
|
|
1569
|
+
|
|
1570
|
+
## Utility to generate documentation from source code
|
|
1571
|
+
|
|
1572
|
+
This script re-generate README.md files for all modules defined in the Lightspeed Stack Service.
|
|
1573
|
+
|
|
1574
|
+
### Path
|
|
1575
|
+
|
|
1576
|
+
[scripts/gen_doc.py](scripts/gen_doc.py)
|
|
1577
|
+
|
|
1578
|
+
### Usage
|
|
1579
|
+
|
|
1580
|
+
```
|
|
1581
|
+
make doc
|
|
1582
|
+
```
|
|
1583
|
+
|
|
1584
|
+
# Data Export Integration
|
|
1585
|
+
|
|
1586
|
+
The Lightspeed Core Stack integrates with the [lightspeed-to-dataverse-exporter](https://github.com/lightspeed-core/lightspeed-to-dataverse-exporter) service to automatically export various types of user interaction data to Red Hat's Dataverse for analysis.
|
|
1587
|
+
|
|
1588
|
+
## Quick Integration
|
|
1589
|
+
|
|
1590
|
+
1. **Enable data collection** in your `lightspeed-stack.yaml`:
|
|
1591
|
+
```yaml
|
|
1592
|
+
user_data_collection:
|
|
1593
|
+
feedback_enabled: true
|
|
1594
|
+
feedback_storage: "/shared/data/feedback"
|
|
1595
|
+
transcripts_enabled: true
|
|
1596
|
+
transcripts_storage: "/shared/data/transcripts"
|
|
1597
|
+
```
|
|
1598
|
+
|
|
1599
|
+
2. **Deploy the exporter service** pointing to the same data directories
|
|
1600
|
+
|
|
1601
|
+
|
|
1602
|
+
## Documentation
|
|
1603
|
+
|
|
1604
|
+
For complete integration setup, deployment options, and configuration details, see [exporter repository](https://github.com/lightspeed-core/lightspeed-to-dataverse-exporter).
|
|
1605
|
+
|
|
1606
|
+
# Project structure
|
|
1607
|
+
|
|
1608
|
+
## Configuration classes
|
|
1609
|
+
|
|
1610
|
+

|
|
1611
|
+
|
|
1612
|
+
## REST API
|
|
1613
|
+
|
|
1614
|
+

|
|
1615
|
+
|
|
1616
|
+
## Sequence diagrams
|
|
1617
|
+
|
|
1618
|
+
### Query endpoint REST API handler
|
|
1619
|
+
|
|
1620
|
+

|
|
1621
|
+
|
|
1622
|
+
## Streaming query endpoint REST API handler
|
|
1623
|
+
|
|
1624
|
+

|
|
1625
|
+
|
|
1626
|
+
## Versioning
|
|
1627
|
+
|
|
1628
|
+
We follow [Semantic Versioning](http://semver.org/spec/v1.0.0.html).
|
|
1629
|
+
The version X.Y.Z indicates:
|
|
1630
|
+
|
|
1631
|
+
* X is the major version (backward-incompatible),
|
|
1632
|
+
* Y is the minor version (backward-compatible), and
|
|
1633
|
+
* Z is the patch version (backward-compatible bug fix).
|
|
1634
|
+
|
|
1635
|
+
# Konflux
|
|
1636
|
+
|
|
1637
|
+
The official image of Lightspeed Core Stack is built on [Konflux](https://konflux-ui.apps.kflux-prd-rh02.0fk9.p1.openshiftapps.com/ns/lightspeed-core-tenant/applications/lightspeed-stack).
|
|
1638
|
+
We have both x86_64 and ARM64 images.
|
|
1639
|
+
|
|
1640
|
+
## Updating Dependencies for Hermetic Builds
|
|
1641
|
+
|
|
1642
|
+
Konflux builds run in **hermetic mode** (air-gapped from the internet), so all dependencies must be prefetched and locked. When you add or update dependencies, you need to regenerate the lock files.
|
|
1643
|
+
|
|
1644
|
+
### When to Update Dependency Files
|
|
1645
|
+
|
|
1646
|
+
Update these files when you:
|
|
1647
|
+
- Add/remove/update Python packages in the project
|
|
1648
|
+
- Add/remove/update RPM packages in `deploy/lightspeed-stack/Containerfile`
|
|
1649
|
+
- Change the base image version
|
|
1650
|
+
|
|
1651
|
+
### Updating Python Dependencies
|
|
1652
|
+
|
|
1653
|
+
**Quick command:**
|
|
1654
|
+
```shell
|
|
1655
|
+
make konflux-requirements
|
|
1656
|
+
```
|
|
1657
|
+
|
|
1658
|
+
This compiles Python dependencies from `pyproject.toml` using `uv`, splits packages by their source index (PyPI vs Red Hat's internal registry), and generates hermetic requirements files with pinned versions and hashes for Konflux builds.
|
|
1659
|
+
|
|
1660
|
+
**Files produced:**
|
|
1661
|
+
- `requirements.hashes.source.txt` – PyPI packages with hashes
|
|
1662
|
+
- `requirements.hashes.wheel.txt` – Red Hat registry packages with hashes
|
|
1663
|
+
- `requirements-build.txt` – Build-time dependencies for source packages
|
|
1664
|
+
|
|
1665
|
+
The script also updates the Tekton pipeline configurations (`.tekton/lightspeed-stack-*.yaml`) with the list of pre-built wheel packages.
|
|
1666
|
+
|
|
1667
|
+
### Updating RPM Dependencies
|
|
1668
|
+
|
|
1669
|
+
**Prerequisites:**
|
|
1670
|
+
- Install [rpm-lockfile-prototype](https://github.com/konflux-ci/rpm-lockfile-prototype?tab=readme-ov-file#installation)
|
|
1671
|
+
- Have an active RHEL Subscription, get activation keys from [RH console](https://console.redhat.com/insights/connector/activation-keys)
|
|
1672
|
+
- Have `dnf` installed in system
|
|
1673
|
+
|
|
1674
|
+
**Steps:**
|
|
1675
|
+
|
|
1676
|
+
1. **List your RPM packages** in `rpms.in.yaml` under the `packages` field
|
|
1677
|
+
|
|
1678
|
+
2. **If you changed the base image**, extract its repo file:
|
|
1679
|
+
```shell
|
|
1680
|
+
# UBI images
|
|
1681
|
+
podman run -it $BASE_IMAGE cat /etc/yum.repos.d/ubi.repo > ubi.repo
|
|
1682
|
+
# RHEL images
|
|
1683
|
+
podman run -it $BASE_IMAGE cat /etc/yum.repos.d/redhat.repo > redhat.repo
|
|
1684
|
+
```
|
|
1685
|
+
If the repo file contains too many entries, we can filter them and keep only required repositories.
|
|
1686
|
+
Here is the command to check active repositories:
|
|
1687
|
+
```shell
|
|
1688
|
+
dnf repolist
|
|
1689
|
+
```
|
|
1690
|
+
Replace the architecture tag (`uname -m`) to `$basearch` so that rpm-lockfile-prototype can replace it with requested architecture names.
|
|
1691
|
+
```shell
|
|
1692
|
+
sed -i "s/$(uname -m)/\$basearch/g" redhat.repo
|
|
1693
|
+
```
|
|
1694
|
+
|
|
1695
|
+
1. **Generate the lock file**:
|
|
1696
|
+
```shell
|
|
1697
|
+
make konflux-rpm-lock
|
|
1698
|
+
```
|
|
1699
|
+
|
|
1700
|
+
This creates `rpms.lock.yaml` with pinned RPM versions.
|