lightspeed-stack 0.4.0__tar.gz → 0.4.1__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.
Files changed (400) hide show
  1. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/PKG-INFO +61 -9
  2. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/README.md +57 -6
  3. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/pyproject.toml +5 -6
  4. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/database.py +73 -6
  5. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/README.md +3 -0
  6. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/a2a.py +22 -23
  7. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/authorized.py +2 -0
  8. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/config.py +2 -0
  9. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/conversations_v3.py +4 -5
  10. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/feedback.py +3 -0
  11. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/health.py +18 -1
  12. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/info.py +6 -0
  13. lightspeed_stack-0.4.1/src/app/endpoints/mcp_auth.py +92 -0
  14. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/metrics.py +4 -0
  15. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/models.py +38 -2
  16. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/query.py +17 -350
  17. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/query_v2.py +66 -101
  18. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/rags.py +3 -3
  19. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/rlsapi_v1.py +119 -3
  20. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/streaming_query.py +4 -433
  21. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/streaming_query_v2.py +7 -7
  22. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/main.py +35 -3
  23. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/routers.py +10 -2
  24. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/authentication/noop.py +3 -1
  25. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/authentication/noop_with_token.py +3 -1
  26. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/authentication/rh_identity.py +11 -0
  27. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/authorization/README.md +3 -0
  28. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/metrics/utils.py +7 -43
  29. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/models/config.py +129 -10
  30. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/models/requests.py +3 -19
  31. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/models/responses.py +48 -3
  32. lightspeed_stack-0.4.1/src/observability/README.md +97 -0
  33. lightspeed_stack-0.4.1/src/observability/__init__.py +14 -0
  34. lightspeed_stack-0.4.1/src/observability/formats/README.md +8 -0
  35. lightspeed_stack-0.4.1/src/observability/formats/__init__.py +9 -0
  36. lightspeed_stack-0.4.1/src/observability/formats/rlsapi.py +57 -0
  37. lightspeed_stack-0.4.1/src/observability/splunk.py +90 -0
  38. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/quota/quota_limiter.py +7 -0
  39. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/utils/README.md +9 -0
  40. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/utils/common.py +1 -1
  41. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/utils/mcp_auth_headers.py +6 -4
  42. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/utils/query.py +4 -5
  43. lightspeed_stack-0.4.1/src/utils/schema_dumper.py +79 -0
  44. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/utils/shields.py +1 -1
  45. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/utils/suid.py +5 -1
  46. lightspeed_stack-0.4.1/src/utils/token_counter.py +39 -0
  47. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/utils/types.py +7 -58
  48. lightspeed_stack-0.4.1/tests/benchmarks/README.md +1 -0
  49. lightspeed_stack-0.4.1/tests/benchmarks/test_app_database.py +513 -0
  50. lightspeed_stack-0.4.1/tests/configuration/benchmarks-lightspeed-stack.yaml +42 -0
  51. lightspeed_stack-0.4.1/tests/configuration/run.yaml +150 -0
  52. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/configs/run-azure.yaml +0 -12
  53. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/configs/run-ci.yaml +9 -16
  54. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/configs/run-rhaiis.yaml +0 -12
  55. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/configs/run-rhelai.yaml +0 -12
  56. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/configs/run-vertexai.yaml +0 -12
  57. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/configs/run-watsonx.yaml +1 -13
  58. lightspeed_stack-0.4.1/tests/e2e/configuration/README.md +32 -0
  59. lightspeed_stack-0.4.0/tests/e2e/configuration/library-mode/lightspeed-stack.yaml → lightspeed_stack-0.4.1/tests/e2e/configuration/library-mode/lightspeed-stack-auth-rh-identity.yaml +9 -4
  60. lightspeed_stack-0.4.1/tests/e2e/configuration/library-mode/lightspeed-stack-rbac.yaml +94 -0
  61. lightspeed_stack-0.4.1/tests/e2e/configuration/library-mode/lightspeed-stack.yaml +36 -0
  62. lightspeed_stack-0.4.0/tests/e2e/configuration/server-mode/lightspeed-stack.yaml → lightspeed_stack-0.4.1/tests/e2e/configuration/server-mode/lightspeed-stack-auth-rh-identity.yaml +9 -4
  63. lightspeed_stack-0.4.1/tests/e2e/configuration/server-mode/lightspeed-stack-rbac.yaml +95 -0
  64. lightspeed_stack-0.4.1/tests/e2e/configuration/server-mode/lightspeed-stack.yaml +37 -0
  65. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/authorized_noop.feature +3 -3
  66. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/authorized_noop_token.feature +3 -3
  67. lightspeed_stack-0.4.1/tests/e2e/features/authorized_rh_identity.feature +163 -0
  68. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/environment.py +28 -0
  69. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/faiss.feature +1 -1
  70. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/info.feature +12 -2
  71. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/query.feature +59 -16
  72. lightspeed_stack-0.4.1/tests/e2e/features/rbac.feature +155 -0
  73. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/steps/README.md +3 -0
  74. lightspeed_stack-0.4.1/tests/e2e/features/steps/auth.py +191 -0
  75. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/steps/info.py +61 -0
  76. lightspeed_stack-0.4.1/tests/e2e/features/steps/rbac.py +40 -0
  77. lightspeed_stack-0.4.1/tests/e2e/features/steps/token_counters.py +204 -0
  78. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/streaming_query.feature +51 -18
  79. lightspeed_stack-0.4.1/tests/e2e/mock_jwks_server/Dockerfile +5 -0
  80. lightspeed_stack-0.4.1/tests/e2e/mock_jwks_server/README.md +8 -0
  81. lightspeed_stack-0.4.1/tests/e2e/mock_jwks_server/generate_tokens.py +85 -0
  82. lightspeed_stack-0.4.1/tests/e2e/mock_jwks_server/server.py +66 -0
  83. lightspeed_stack-0.4.1/tests/e2e/rag/README.md +2 -0
  84. lightspeed_stack-0.4.1/tests/e2e/rag/kv_store.db +0 -0
  85. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/test_list.txt +2 -0
  86. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/configs/run.yaml +0 -12
  87. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/integration/endpoints/test_health_integration.py +7 -7
  88. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/integration/endpoints/test_query_v2_integration.py +6 -4
  89. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/integration/endpoints/test_rlsapi_v1_integration.py +63 -6
  90. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/integration/test_configuration.py +1 -1
  91. lightspeed_stack-0.4.1/tests/test_results/.coverage.integration +0 -0
  92. lightspeed_stack-0.4.1/tests/test_results/.coverage.unit +0 -0
  93. lightspeed_stack-0.4.1/tests/test_results/coverage_integration.json +1 -0
  94. lightspeed_stack-0.4.1/tests/test_results/coverage_unit.json +1 -0
  95. lightspeed_stack-0.4.1/tests/test_results/junit_integration.xml +1 -0
  96. lightspeed_stack-0.4.1/tests/test_results/junit_unit.xml +1 -0
  97. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/README.md +1 -1
  98. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/endpoints/README.md +3 -0
  99. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/endpoints/test_a2a.py +19 -9
  100. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/endpoints/test_feedback.py +18 -6
  101. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/endpoints/test_health.py +1 -1
  102. lightspeed_stack-0.4.1/tests/unit/app/endpoints/test_mcp_auth.py +339 -0
  103. lightspeed_stack-0.4.1/tests/unit/app/endpoints/test_query.py +486 -0
  104. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/endpoints/test_query_v2.py +38 -27
  105. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/endpoints/test_rags.py +3 -3
  106. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/endpoints/test_rlsapi_v1.py +206 -15
  107. lightspeed_stack-0.4.1/tests/unit/app/endpoints/test_streaming_query.py +654 -0
  108. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/endpoints/test_streaming_query_v2.py +1 -1
  109. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/endpoints/test_tools.py +11 -11
  110. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/test_database.py +1 -1
  111. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/test_routers.py +5 -2
  112. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/authentication/test_api_key_token.py +2 -2
  113. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/authentication/test_jwk_token.py +1 -1
  114. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/authentication/test_noop.py +18 -1
  115. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/authentication/test_noop_with_token.py +23 -0
  116. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/authentication/test_rh_identity.py +48 -1
  117. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/authorization/README.md +3 -0
  118. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/authorization/test_azure_token_manager.py +1 -0
  119. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/authorization/test_middleware.py +1 -0
  120. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/authorization/test_resolvers.py +10 -1
  121. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/cache/test_cache_factory.py +13 -9
  122. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/cache/test_postgres_cache.py +8 -10
  123. lightspeed_stack-0.4.1/tests/unit/metrics/test_utis.py +74 -0
  124. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/README.md +3 -0
  125. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/test_a2a_state_configuration.py +19 -4
  126. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/test_authentication_configuration.py +125 -20
  127. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/test_byok_rag.py +7 -7
  128. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/test_conversation_history.py +31 -21
  129. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/test_cors.py +1 -1
  130. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/test_customization.py +8 -4
  131. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/test_database_configuration.py +7 -5
  132. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/test_dump_configuration.py +15 -0
  133. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/test_inference_configuration.py +3 -3
  134. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/test_jwt_role_rule.py +1 -1
  135. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/test_llama_stack_configuration.py +55 -7
  136. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/test_model_context_protocol_server.py +7 -3
  137. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/test_postgresql_database_configuration.py +9 -7
  138. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/test_quota_handlers_config.py +5 -1
  139. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/test_quota_limiter_config.py +1 -1
  140. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/test_quota_scheduler_config.py +15 -7
  141. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/test_service_configuration.py +5 -5
  142. lightspeed_stack-0.4.1/tests/unit/models/config/test_splunk_configuration.py +113 -0
  143. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/test_tls_configuration.py +8 -1
  144. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/test_user_data_collection.py +20 -6
  145. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/requests/test_feedback_request.py +15 -1
  146. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/requests/test_query_request.py +15 -77
  147. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/responses/test_rag_chunk.py +16 -8
  148. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/responses/test_successful_responses.py +26 -9
  149. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/rlsapi/test_requests.py +1 -1
  150. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/rlsapi/test_responses.py +3 -1
  151. lightspeed_stack-0.4.1/tests/unit/observability/README.md +8 -0
  152. lightspeed_stack-0.4.1/tests/unit/observability/__init__.py +1 -0
  153. lightspeed_stack-0.4.1/tests/unit/observability/formats/README.md +8 -0
  154. lightspeed_stack-0.4.1/tests/unit/observability/formats/__init__.py +1 -0
  155. lightspeed_stack-0.4.1/tests/unit/observability/formats/test_rlsapi.py +74 -0
  156. lightspeed_stack-0.4.1/tests/unit/observability/test_splunk.py +155 -0
  157. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/quota/test_cluster_quota_limiter.py +1 -1
  158. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/quota/test_connect_pg.py +13 -2
  159. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/quota/test_quota_limiter_factory.py +54 -20
  160. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/quota/test_user_quota_limiter.py +1 -1
  161. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/runners/test_uvicorn_runner.py +8 -4
  162. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/test_client.py +6 -0
  163. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/test_configuration.py +1 -1
  164. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/test_configuration_unknown_fields.py +3 -1
  165. lightspeed_stack-0.4.1/tests/unit/test_llama_stack_configuration.py +309 -0
  166. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/utils/README.md +3 -0
  167. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/utils/test_checks.py +13 -7
  168. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/utils/test_common.py +137 -28
  169. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/utils/test_endpoints.py +4 -547
  170. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/utils/test_shields.py +5 -5
  171. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/utils/test_suid.py +25 -0
  172. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/utils/test_types.py +2 -1
  173. lightspeed_stack-0.4.0/src/utils/token_counter.py +0 -136
  174. lightspeed_stack-0.4.0/tests/configuration/run.yaml +0 -125
  175. lightspeed_stack-0.4.0/tests/e2e/configuration/README.md +0 -2
  176. lightspeed_stack-0.4.0/tests/e2e/features/steps/auth.py +0 -75
  177. lightspeed_stack-0.4.0/tests/e2e/rag/kv_store.db +0 -0
  178. lightspeed_stack-0.4.0/tests/unit/app/endpoints/test_query.py +0 -2557
  179. lightspeed_stack-0.4.0/tests/unit/app/endpoints/test_streaming_query.py +0 -2468
  180. lightspeed_stack-0.4.0/tests/unit/metrics/test_utis.py +0 -134
  181. lightspeed_stack-0.4.0/tests/unit/test_llama_stack_configuration.py +0 -182
  182. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/LICENSE +0 -0
  183. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/a2a_storage/README.md +0 -0
  184. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/a2a_storage/__init__.py +0 -0
  185. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/a2a_storage/context_store.py +0 -0
  186. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/a2a_storage/in_memory_context_store.py +0 -0
  187. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/a2a_storage/postgres_context_store.py +0 -0
  188. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/a2a_storage/sqlite_context_store.py +0 -0
  189. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/a2a_storage/storage_factory.py +0 -0
  190. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/README.md +0 -0
  191. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/__init__.py +0 -0
  192. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/__init__.py +0 -0
  193. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/conversations.py +0 -0
  194. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/conversations_v2.py +0 -0
  195. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/providers.py +0 -0
  196. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/root.py +0 -0
  197. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/shields.py +0 -0
  198. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/app/endpoints/tools.py +0 -0
  199. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/authentication/README.md +0 -0
  200. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/authentication/__init__.py +0 -0
  201. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/authentication/api_key_token.py +0 -0
  202. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/authentication/interface.py +0 -0
  203. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/authentication/jwk_token.py +0 -0
  204. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/authentication/k8s.py +0 -0
  205. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/authentication/utils.py +0 -0
  206. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/authorization/__init__.py +0 -0
  207. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/authorization/azure_token_manager.py +0 -0
  208. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/authorization/middleware.py +0 -0
  209. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/authorization/resolvers.py +0 -0
  210. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/cache/README.md +0 -0
  211. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/cache/__init__.py +0 -0
  212. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/cache/cache.py +0 -0
  213. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/cache/cache_error.py +0 -0
  214. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/cache/cache_factory.py +0 -0
  215. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/cache/in_memory_cache.py +0 -0
  216. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/cache/noop_cache.py +0 -0
  217. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/cache/postgres_cache.py +0 -0
  218. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/cache/sqlite_cache.py +0 -0
  219. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/metrics/README.md +0 -0
  220. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/metrics/__init__.py +0 -0
  221. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/models/README.md +0 -0
  222. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/models/__init__.py +0 -0
  223. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/models/cache_entry.py +0 -0
  224. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/models/context.py +0 -0
  225. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/models/database/README.md +0 -0
  226. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/models/database/__init__.py +0 -0
  227. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/models/database/base.py +0 -0
  228. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/models/database/conversations.py +0 -0
  229. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/models/rlsapi/README.md +0 -0
  230. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/models/rlsapi/__init__.py +0 -0
  231. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/models/rlsapi/requests.py +0 -0
  232. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/models/rlsapi/responses.py +0 -0
  233. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/quota/README.md +0 -0
  234. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/quota/__init__.py +0 -0
  235. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/quota/cluster_quota_limiter.py +0 -0
  236. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/quota/connect_pg.py +0 -0
  237. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/quota/connect_sqlite.py +0 -0
  238. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/quota/quota_exceed_error.py +0 -0
  239. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/quota/quota_limiter_factory.py +0 -0
  240. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/quota/revokable_quota_limiter.py +0 -0
  241. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/quota/sql.py +0 -0
  242. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/quota/token_usage_history.py +0 -0
  243. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/quota/user_quota_limiter.py +0 -0
  244. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/runners/README.md +0 -0
  245. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/runners/__init__.py +0 -0
  246. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/runners/quota_scheduler.py +0 -0
  247. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/runners/uvicorn.py +0 -0
  248. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/utils/__init__.py +0 -0
  249. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/utils/checks.py +0 -0
  250. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/utils/connection_decorator.py +0 -0
  251. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/utils/endpoints.py +0 -0
  252. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/utils/llama_stack_version.py +0 -0
  253. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/utils/mcp_headers.py +0 -0
  254. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/utils/quota.py +0 -0
  255. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/utils/responses.py +0 -0
  256. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/utils/tool_formatter.py +0 -0
  257. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/src/utils/transcripts.py +0 -0
  258. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/__init__.py +0 -0
  259. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/configuration/lightspeed-stack-proper-name.yaml +0 -0
  260. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/configuration/lightspeed-stack.yaml +0 -0
  261. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/configuration/minimal-stack.yaml +0 -0
  262. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/configuration/multiline_system_prompt.txt +0 -0
  263. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/configuration/password +0 -0
  264. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/configuration/rag.txt +0 -0
  265. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/configuration/rh-identity-config.yaml +0 -0
  266. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/configuration/server.crt +0 -0
  267. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/configuration/server.key +0 -0
  268. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/configuration/system_prompt.txt +0 -0
  269. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/.pdm-python +0 -0
  270. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/README.md +0 -0
  271. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/__init__.py +0 -0
  272. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/configs/README.md +0 -0
  273. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/configuration/library-mode/README.md +0 -0
  274. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/configuration/library-mode/lightspeed-stack-auth-noop-token.yaml +0 -0
  275. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/configuration/library-mode/lightspeed-stack-invalid-feedback-storage.yaml +0 -0
  276. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/configuration/library-mode/lightspeed-stack-no-cache.yaml +0 -0
  277. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/configuration/server-mode/README.md +0 -0
  278. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/configuration/server-mode/lightspeed-stack-auth-noop-token.yaml +0 -0
  279. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/configuration/server-mode/lightspeed-stack-invalid-feedback-storage.yaml +0 -0
  280. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/configuration/server-mode/lightspeed-stack-no-cache.yaml +0 -0
  281. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/README.md +0 -0
  282. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/conversation_cache_v2.feature +0 -0
  283. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/conversations.feature +0 -0
  284. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/feedback.feature +0 -0
  285. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/health.feature +0 -0
  286. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/rest_api.feature +0 -0
  287. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/smoketests.feature +0 -0
  288. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/steps/__init__.py +0 -0
  289. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/steps/common.py +0 -0
  290. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/steps/common_http.py +0 -0
  291. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/steps/conversation.py +0 -0
  292. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/steps/feedback.py +0 -0
  293. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/steps/health.py +0 -0
  294. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/features/steps/llm_query_response.py +0 -0
  295. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/gen_scenario_list.py +0 -0
  296. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/test_api.py +0 -0
  297. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/utils/README.md +0 -0
  298. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e/utils/utils.py +0 -0
  299. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/configs/lightspeed-stack.yaml +0 -0
  300. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/manifests/gpu/cluster-policy.yaml +0 -0
  301. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/manifests/gpu/create-nfd.yaml +0 -0
  302. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/manifests/lightspeed/lightspeed-stack.yaml +0 -0
  303. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/manifests/lightspeed/llama-stack.yaml +0 -0
  304. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/manifests/namespaces/nfd.yaml +0 -0
  305. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/manifests/namespaces/nvidia-operator.yaml +0 -0
  306. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/manifests/operators/ds-cluster.yaml +0 -0
  307. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/manifests/operators/operatorgroup.yaml +0 -0
  308. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/manifests/operators/operators.yaml +0 -0
  309. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/manifests/test-pod/spin-up.yaml +0 -0
  310. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/manifests/vllm/vllm-inference-service-cpu.yaml +0 -0
  311. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/manifests/vllm/vllm-inference-service-gpu.yaml +0 -0
  312. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/manifests/vllm/vllm-runtime-cpu.yaml +0 -0
  313. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/manifests/vllm/vllm-runtime-gpu.yaml +0 -0
  314. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/pipeline-services.sh +0 -0
  315. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/pipeline-test-pod.sh +0 -0
  316. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/pipeline-vllm.sh +0 -0
  317. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/pipeline.sh +0 -0
  318. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/run-tests.sh +0 -0
  319. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/scripts/bootstrap.sh +0 -0
  320. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/scripts/deploy-vllm.sh +0 -0
  321. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/scripts/fetch-vllm-image.sh +0 -0
  322. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/scripts/get-vllm-pod-info.sh +0 -0
  323. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/e2e-prow/rhoai/scripts/gpu-setup.sh +0 -0
  324. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/integration/README.md +0 -0
  325. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/integration/__init__.py +0 -0
  326. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/integration/conftest.py +0 -0
  327. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/integration/endpoints/README.md +0 -0
  328. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/integration/endpoints/__init__.py +0 -0
  329. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/integration/endpoints/test_config_integration.py +0 -0
  330. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/integration/endpoints/test_info_integration.py +0 -0
  331. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/integration/test_middleware_integration.py +0 -0
  332. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/integration/test_openapi_json.py +0 -0
  333. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/integration/test_rh_identity_integration.py +0 -0
  334. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/integration/test_version.py +0 -0
  335. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/profiles/test/profile.py +0 -0
  336. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/profiles/test_three/profile.py +0 -0
  337. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/profiles/test_two/test.txt +0 -0
  338. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/__init__.py +0 -0
  339. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/a2a_storage/README.md +0 -0
  340. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/a2a_storage/__init__.py +0 -0
  341. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/a2a_storage/test_in_memory_context_store.py +0 -0
  342. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/a2a_storage/test_sqlite_context_store.py +0 -0
  343. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/a2a_storage/test_storage_factory.py +0 -0
  344. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/README.md +0 -0
  345. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/__init__.py +0 -0
  346. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/endpoints/__init__.py +0 -0
  347. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/endpoints/test_authorized.py +0 -0
  348. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/endpoints/test_config.py +0 -0
  349. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/endpoints/test_conversations.py +0 -0
  350. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/endpoints/test_conversations_v2.py +0 -0
  351. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/endpoints/test_info.py +0 -0
  352. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/endpoints/test_metrics.py +0 -0
  353. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/endpoints/test_models.py +0 -0
  354. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/endpoints/test_providers.py +0 -0
  355. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/endpoints/test_root.py +0 -0
  356. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/endpoints/test_shields.py +0 -0
  357. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/app/test_main_middleware.py +0 -0
  358. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/authentication/README.md +0 -0
  359. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/authentication/__init__.py +0 -0
  360. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/authentication/test_auth.py +0 -0
  361. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/authentication/test_k8s.py +0 -0
  362. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/authentication/test_utils.py +0 -0
  363. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/authorization/__init__.py +0 -0
  364. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/cache/README.md +0 -0
  365. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/cache/__init__.py +0 -0
  366. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/cache/test_noop_cache.py +0 -0
  367. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/cache/test_sqlite_cache.py +0 -0
  368. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/conftest.py +0 -0
  369. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/metrics/README.md +0 -0
  370. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/metrics/__init__.py +0 -0
  371. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/README.md +0 -0
  372. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/__init__.py +0 -0
  373. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/config/__init__.py +0 -0
  374. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/requests/README.md +0 -0
  375. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/requests/__init__.py +0 -0
  376. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/requests/test_attachment.py +0 -0
  377. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/requests/test_feedback_status_update_request.py +0 -0
  378. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/responses/README.md +0 -0
  379. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/responses/__init__.py +0 -0
  380. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/responses/test_authorized_response.py +0 -0
  381. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/responses/test_error_responses.py +0 -0
  382. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/responses/test_query_response.py +0 -0
  383. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/rlsapi/README.md +0 -0
  384. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/models/rlsapi/__init__.py +0 -0
  385. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/quota/README.md +0 -0
  386. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/quota/__init__.py +0 -0
  387. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/quota/test_connect_sqlite.py +0 -0
  388. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/quota/test_quota_exceed_error.py +0 -0
  389. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/runners/README.md +0 -0
  390. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/runners/__init__.py +0 -0
  391. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/test_lightspeed_stack.py +0 -0
  392. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/test_log.py +0 -0
  393. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/utils/__init__.py +0 -0
  394. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/utils/auth_helpers.py +0 -0
  395. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/utils/test_connection_decorator.py +0 -0
  396. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/utils/test_llama_stack_version.py +0 -0
  397. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/utils/test_mcp_auth_headers.py +0 -0
  398. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/utils/test_mcp_headers.py +0 -0
  399. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/utils/test_responses.py +0 -0
  400. {lightspeed_stack-0.4.0 → lightspeed_stack-0.4.1}/tests/unit/utils/test_transcripts.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lightspeed-stack
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: LLM tooling stack
5
5
  Keywords: LLM,RAG
6
6
  Maintainer-Email: =?utf-8?b?UGF2ZWwgVGnFoW5vdnNrw70=?= <tisnik@centrum.cz>
@@ -218,8 +218,8 @@ Requires-Python: <3.14,>=3.12
218
218
  Requires-Dist: fastapi>=0.115.12
219
219
  Requires-Dist: uvicorn>=0.34.3
220
220
  Requires-Dist: kubernetes>=30.1.0
221
- Requires-Dist: llama-stack==0.3.5
222
- Requires-Dist: llama-stack-client==0.3.5
221
+ Requires-Dist: llama-stack==0.4.3
222
+ Requires-Dist: llama-stack-client==0.4.3
223
223
  Requires-Dist: rich>=14.0.0
224
224
  Requires-Dist: cachetools>=6.1.0
225
225
  Requires-Dist: prometheus-client>=0.22.1
@@ -241,6 +241,7 @@ Requires-Dist: PyYAML>=6.0.0
241
241
  Requires-Dist: einops>=0.8.1
242
242
  Requires-Dist: azure-core>=1.38.0
243
243
  Requires-Dist: azure-identity
244
+ Requires-Dist: pyasn1>=0.6.2
244
245
  Description-Content-Type: text/markdown
245
246
 
246
247
  # lightspeed-stack
@@ -251,7 +252,7 @@ Description-Content-Type: text/markdown
251
252
  [![License](https://img.shields.io/badge/license-Apache-blue)](https://github.com/lightspeed-core/lightspeed-stack/blob/main/LICENSE)
252
253
  [![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)
253
254
  [![Required Python version](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Flightspeed-core%2Flightspeed-stack%2Frefs%2Fheads%2Fmain%2Fpyproject.toml)](https://www.python.org/)
254
- [![Tag](https://img.shields.io/github/v/tag/lightspeed-core/lightspeed-stack)](https://github.com/lightspeed-core/lightspeed-stack/releases/tag/0.4.0)
255
+ [![Tag](https://img.shields.io/github/v/tag/lightspeed-core/lightspeed-stack)](https://github.com/lightspeed-core/lightspeed-stack/releases/tag/0.4.1)
255
256
 
256
257
  Lightspeed Core Stack (LCS) is an AI-powered assistant that provides answers to product questions using backend LLM services, agents, and RAG databases.
257
258
 
@@ -281,6 +282,7 @@ The service includes comprehensive user data collection capabilities for various
281
282
  * [1. Static Tokens from Files (Recommended for Service Credentials)](#1-static-tokens-from-files-recommended-for-service-credentials)
282
283
  * [2. Kubernetes Service Account Tokens (For K8s Deployments)](#2-kubernetes-service-account-tokens-for-k8s-deployments)
283
284
  * [3. Client-Provided Tokens (For Per-User Authentication)](#3-client-provided-tokens-for-per-user-authentication)
285
+ * [Client-Authenticated MCP Servers Discovery](#client-authenticated-mcp-servers-discovery)
284
286
  * [Combining Authentication Methods](#combining-authentication-methods)
285
287
  * [Authentication Method Comparison](#authentication-method-comparison)
286
288
  * [Important: Automatic Server Skipping](#important-automatic-server-skipping)
@@ -635,7 +637,7 @@ mcp_servers:
635
637
  Authorization: "kubernetes" # Uses user's k8s token from request auth
636
638
  ```
637
639
 
638
- The user's Kubernetes token is extracted from the incoming request's `Authorization` header and forwarded to the MCP server.
640
+ **Note:** Kubernetes token-based MCP authorization only works when Lightspeed Core Stack is configured with Kubernetes authentication (`authentication.k8s`). For any other authentication types, MCP servers configured with `Authorization: "kubernetes"` are removed from the available MCP servers list.
639
641
 
640
642
  ##### 3. Client-Provided Tokens (For Per-User Authentication)
641
643
 
@@ -663,6 +665,34 @@ curl -X POST "http://localhost:8080/v1/query" \
663
665
 
664
666
  **Structure**: `MCP-HEADERS: {"<server-name>": {"<header-name>": "<header-value>", ...}, ...}`
665
667
 
668
+ ##### Client-Authenticated MCP Servers Discovery
669
+
670
+ To help clients determine which MCP servers require client-provided tokens, use the **MCP Client Auth Options** endpoint:
671
+
672
+ ```bash
673
+ GET /v1/mcp-auth/client-options
674
+ ```
675
+
676
+ **Response:**
677
+ ```json
678
+ {
679
+ "servers": [
680
+ {
681
+ "name": "user-specific-service",
682
+ "client_auth_headers": ["Authorization", "X-User-Token"]
683
+ },
684
+ {
685
+ "name": "github-integration",
686
+ "client_auth_headers": ["Authorization"]
687
+ }
688
+ ]
689
+ }
690
+ ```
691
+
692
+ 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.
693
+
694
+ **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.
695
+
666
696
  ##### Combining Authentication Methods
667
697
 
668
698
  You can mix and match authentication methods across different MCP servers, and even combine multiple methods for a single server:
@@ -943,6 +973,7 @@ options:
943
973
  -v, --verbose make it verbose
944
974
  -d, --dump-configuration
945
975
  dump actual configuration into JSON file and quit
976
+ -s, --dump-schema dump configuration schema into OpenAPI-compatible file and quit
946
977
  -c CONFIG_FILE, --config CONFIG_FILE
947
978
  path to configuration file (default: lightspeed-stack.yaml)
948
979
 
@@ -956,14 +987,19 @@ Usage: make <OPTIONS> ... <TARGETS>
956
987
  Available targets are:
957
988
 
958
989
  run Run the service locally
990
+ help Show this help screen
991
+ run-llama-stack Start Llama Stack with enriched config (for local service mode)
959
992
  test-unit Run the unit tests
960
993
  test-integration Run integration tests tests
961
994
  test-e2e Run end to end tests for the service
995
+ test-e2e-local Run end to end tests for the service
996
+ benchmarks Run benchmarks
962
997
  check-types Checks type hints in sources
963
998
  security-check Check the project for security issues
964
999
  format Format the code into unified format
965
1000
  schema Generate OpenAPI schema file
966
1001
  openapi-doc Generate OpenAPI documentation
1002
+ generate-documentation Generate documentation
967
1003
  requirements.txt Generate requirements.txt file containing hashes for all non-devel packages
968
1004
  doc Generate documentation for developers
969
1005
  docs/config.puml Generate PlantUML class diagram for configuration
@@ -978,7 +1014,8 @@ ruff Check source code using Ruff linter
978
1014
  verify Run all linters
979
1015
  distribution-archives Generate distribution archives to be uploaded into Python registry
980
1016
  upload-distribution-archives Upload distribution archives into Python registry
981
- help Show this help screen
1017
+ konflux-requirements generate hermetic requirements.*.txt file for konflux build
1018
+ konflux-rpm-lock generate rpm.lock.yaml file for konflux build
982
1019
  ```
983
1020
 
984
1021
  ## Running Linux container image
@@ -1440,7 +1477,10 @@ The script also updates the Tekton pipeline configurations (`.tekton/lightspeed-
1440
1477
 
1441
1478
  ### Updating RPM Dependencies
1442
1479
 
1443
- **Prerequisites:** Install [rpm-lockfile-prototype](https://github.com/konflux-ci/rpm-lockfile-prototype?tab=readme-ov-file#installation)
1480
+ **Prerequisites:**
1481
+ - Install [rpm-lockfile-prototype](https://github.com/konflux-ci/rpm-lockfile-prototype?tab=readme-ov-file#installation)
1482
+ - Have an active RHEL Subscription, get activation keys from [RH console](https://console.redhat.com/insights/connector/activation-keys)
1483
+ - Have `dnf` installed in system
1444
1484
 
1445
1485
  **Steps:**
1446
1486
 
@@ -1448,12 +1488,24 @@ The script also updates the Tekton pipeline configurations (`.tekton/lightspeed-
1448
1488
 
1449
1489
  2. **If you changed the base image**, extract its repo file:
1450
1490
  ```shell
1491
+ # UBI images
1451
1492
  podman run -it $BASE_IMAGE cat /etc/yum.repos.d/ubi.repo > ubi.repo
1493
+ # RHEL images
1494
+ podman run -it $BASE_IMAGE cat /etc/yum.repos.d/redhat.repo > redhat.repo
1495
+ ```
1496
+ If the repo file contains too many entries, we can filter them and keep only required repositories.
1497
+ Here is the command to check active repositories:
1498
+ ```shell
1499
+ dnf repolist
1500
+ ```
1501
+ Replace the architecture tag (`uname -m`) to `$basearch` so that rpm-lockfile-prototype can replace it with requested architecture names.
1502
+ ```shell
1503
+ sed -i "s/$(uname -m)/\$basearch/g" redhat.repo
1452
1504
  ```
1453
1505
 
1454
- 3. **Generate the lock file**:
1506
+ 1. **Generate the lock file**:
1455
1507
  ```shell
1456
- rpm-lockfile-prototype --image $BASE_IMAGE rpms.in.yaml
1508
+ make konflux-rpm-lock
1457
1509
  ```
1458
1510
 
1459
1511
  This creates `rpms.lock.yaml` with pinned RPM versions.
@@ -6,7 +6,7 @@
6
6
  [![License](https://img.shields.io/badge/license-Apache-blue)](https://github.com/lightspeed-core/lightspeed-stack/blob/main/LICENSE)
7
7
  [![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)
8
8
  [![Required Python version](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Flightspeed-core%2Flightspeed-stack%2Frefs%2Fheads%2Fmain%2Fpyproject.toml)](https://www.python.org/)
9
- [![Tag](https://img.shields.io/github/v/tag/lightspeed-core/lightspeed-stack)](https://github.com/lightspeed-core/lightspeed-stack/releases/tag/0.4.0)
9
+ [![Tag](https://img.shields.io/github/v/tag/lightspeed-core/lightspeed-stack)](https://github.com/lightspeed-core/lightspeed-stack/releases/tag/0.4.1)
10
10
 
11
11
  Lightspeed Core Stack (LCS) is an AI-powered assistant that provides answers to product questions using backend LLM services, agents, and RAG databases.
12
12
 
@@ -36,6 +36,7 @@ The service includes comprehensive user data collection capabilities for various
36
36
  * [1. Static Tokens from Files (Recommended for Service Credentials)](#1-static-tokens-from-files-recommended-for-service-credentials)
37
37
  * [2. Kubernetes Service Account Tokens (For K8s Deployments)](#2-kubernetes-service-account-tokens-for-k8s-deployments)
38
38
  * [3. Client-Provided Tokens (For Per-User Authentication)](#3-client-provided-tokens-for-per-user-authentication)
39
+ * [Client-Authenticated MCP Servers Discovery](#client-authenticated-mcp-servers-discovery)
39
40
  * [Combining Authentication Methods](#combining-authentication-methods)
40
41
  * [Authentication Method Comparison](#authentication-method-comparison)
41
42
  * [Important: Automatic Server Skipping](#important-automatic-server-skipping)
@@ -390,7 +391,7 @@ mcp_servers:
390
391
  Authorization: "kubernetes" # Uses user's k8s token from request auth
391
392
  ```
392
393
 
393
- The user's Kubernetes token is extracted from the incoming request's `Authorization` header and forwarded to the MCP server.
394
+ **Note:** Kubernetes token-based MCP authorization only works when Lightspeed Core Stack is configured with Kubernetes authentication (`authentication.k8s`). For any other authentication types, MCP servers configured with `Authorization: "kubernetes"` are removed from the available MCP servers list.
394
395
 
395
396
  ##### 3. Client-Provided Tokens (For Per-User Authentication)
396
397
 
@@ -418,6 +419,34 @@ curl -X POST "http://localhost:8080/v1/query" \
418
419
 
419
420
  **Structure**: `MCP-HEADERS: {"<server-name>": {"<header-name>": "<header-value>", ...}, ...}`
420
421
 
422
+ ##### Client-Authenticated MCP Servers Discovery
423
+
424
+ To help clients determine which MCP servers require client-provided tokens, use the **MCP Client Auth Options** endpoint:
425
+
426
+ ```bash
427
+ GET /v1/mcp-auth/client-options
428
+ ```
429
+
430
+ **Response:**
431
+ ```json
432
+ {
433
+ "servers": [
434
+ {
435
+ "name": "user-specific-service",
436
+ "client_auth_headers": ["Authorization", "X-User-Token"]
437
+ },
438
+ {
439
+ "name": "github-integration",
440
+ "client_auth_headers": ["Authorization"]
441
+ }
442
+ ]
443
+ }
444
+ ```
445
+
446
+ 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.
447
+
448
+ **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.
449
+
421
450
  ##### Combining Authentication Methods
422
451
 
423
452
  You can mix and match authentication methods across different MCP servers, and even combine multiple methods for a single server:
@@ -698,6 +727,7 @@ options:
698
727
  -v, --verbose make it verbose
699
728
  -d, --dump-configuration
700
729
  dump actual configuration into JSON file and quit
730
+ -s, --dump-schema dump configuration schema into OpenAPI-compatible file and quit
701
731
  -c CONFIG_FILE, --config CONFIG_FILE
702
732
  path to configuration file (default: lightspeed-stack.yaml)
703
733
 
@@ -711,14 +741,19 @@ Usage: make <OPTIONS> ... <TARGETS>
711
741
  Available targets are:
712
742
 
713
743
  run Run the service locally
744
+ help Show this help screen
745
+ run-llama-stack Start Llama Stack with enriched config (for local service mode)
714
746
  test-unit Run the unit tests
715
747
  test-integration Run integration tests tests
716
748
  test-e2e Run end to end tests for the service
749
+ test-e2e-local Run end to end tests for the service
750
+ benchmarks Run benchmarks
717
751
  check-types Checks type hints in sources
718
752
  security-check Check the project for security issues
719
753
  format Format the code into unified format
720
754
  schema Generate OpenAPI schema file
721
755
  openapi-doc Generate OpenAPI documentation
756
+ generate-documentation Generate documentation
722
757
  requirements.txt Generate requirements.txt file containing hashes for all non-devel packages
723
758
  doc Generate documentation for developers
724
759
  docs/config.puml Generate PlantUML class diagram for configuration
@@ -733,7 +768,8 @@ ruff Check source code using Ruff linter
733
768
  verify Run all linters
734
769
  distribution-archives Generate distribution archives to be uploaded into Python registry
735
770
  upload-distribution-archives Upload distribution archives into Python registry
736
- help Show this help screen
771
+ konflux-requirements generate hermetic requirements.*.txt file for konflux build
772
+ konflux-rpm-lock generate rpm.lock.yaml file for konflux build
737
773
  ```
738
774
 
739
775
  ## Running Linux container image
@@ -1195,7 +1231,10 @@ The script also updates the Tekton pipeline configurations (`.tekton/lightspeed-
1195
1231
 
1196
1232
  ### Updating RPM Dependencies
1197
1233
 
1198
- **Prerequisites:** Install [rpm-lockfile-prototype](https://github.com/konflux-ci/rpm-lockfile-prototype?tab=readme-ov-file#installation)
1234
+ **Prerequisites:**
1235
+ - Install [rpm-lockfile-prototype](https://github.com/konflux-ci/rpm-lockfile-prototype?tab=readme-ov-file#installation)
1236
+ - Have an active RHEL Subscription, get activation keys from [RH console](https://console.redhat.com/insights/connector/activation-keys)
1237
+ - Have `dnf` installed in system
1199
1238
 
1200
1239
  **Steps:**
1201
1240
 
@@ -1203,12 +1242,24 @@ The script also updates the Tekton pipeline configurations (`.tekton/lightspeed-
1203
1242
 
1204
1243
  2. **If you changed the base image**, extract its repo file:
1205
1244
  ```shell
1245
+ # UBI images
1206
1246
  podman run -it $BASE_IMAGE cat /etc/yum.repos.d/ubi.repo > ubi.repo
1247
+ # RHEL images
1248
+ podman run -it $BASE_IMAGE cat /etc/yum.repos.d/redhat.repo > redhat.repo
1249
+ ```
1250
+ If the repo file contains too many entries, we can filter them and keep only required repositories.
1251
+ Here is the command to check active repositories:
1252
+ ```shell
1253
+ dnf repolist
1254
+ ```
1255
+ Replace the architecture tag (`uname -m`) to `$basearch` so that rpm-lockfile-prototype can replace it with requested architecture names.
1256
+ ```shell
1257
+ sed -i "s/$(uname -m)/\$basearch/g" redhat.repo
1207
1258
  ```
1208
1259
 
1209
- 3. **Generate the lock file**:
1260
+ 1. **Generate the lock file**:
1210
1261
  ```shell
1211
- rpm-lockfile-prototype --image $BASE_IMAGE rpms.in.yaml
1262
+ make konflux-rpm-lock
1212
1263
  ```
1213
1264
 
1214
1265
  This creates `rpms.lock.yaml` with pinned RPM versions.
@@ -24,8 +24,8 @@ dependencies = [
24
24
  "fastapi>=0.115.12",
25
25
  "uvicorn>=0.34.3",
26
26
  "kubernetes>=30.1.0",
27
- "llama-stack==0.3.5",
28
- "llama-stack-client==0.3.5",
27
+ "llama-stack==0.4.3",
28
+ "llama-stack-client==0.4.3",
29
29
  "rich>=14.0.0",
30
30
  "cachetools>=6.1.0",
31
31
  "prometheus-client>=0.22.1",
@@ -47,8 +47,9 @@ dependencies = [
47
47
  "einops>=0.8.1",
48
48
  "azure-core>=1.38.0",
49
49
  "azure-identity",
50
+ "pyasn1>=0.6.2",
50
51
  ]
51
- version = "0.4.0"
52
+ version = "0.4.1"
52
53
 
53
54
  [project.license]
54
55
  file = "LICENSE"
@@ -64,9 +65,6 @@ Issues = "https://github.com/lightspeed-core/lightspeed-stack/issues"
64
65
  exclude = [
65
66
  "src/authentication/k8s.py",
66
67
  "src/app/endpoints/conversations.py",
67
- "src/app/endpoints/query.py",
68
- "src/app/endpoints/streaming_query.py",
69
- "src/utils/endpoints.py",
70
68
  ]
71
69
  extraPaths = [
72
70
  "./src",
@@ -152,6 +150,7 @@ dev = [
152
150
  "bandit>=1.8.6",
153
151
  "pybuild-deps>=0.5.0",
154
152
  "pip==24.3.1",
153
+ "pytest-benchmark>=5.2.3",
155
154
  ]
156
155
  llslibdev = [
157
156
  "tree_sitter>=0.24.0",
@@ -19,7 +19,15 @@ session_local: Optional[sessionmaker] = None
19
19
 
20
20
 
21
21
  def get_engine() -> Engine:
22
- """Get the database engine. Raises an error if not initialized."""
22
+ """Get the database engine. Raises an error if not initialized.
23
+
24
+ Returns:
25
+ Engine: The initialized SQLAlchemy Engine instance.
26
+
27
+ Raises:
28
+ RuntimeError: If the database engine has not been initialized; call
29
+ initialize_database() first.
30
+ """
23
31
  if engine is None:
24
32
  raise RuntimeError(
25
33
  "Database engine not initialized. Call initialize_database() first."
@@ -28,12 +36,29 @@ def get_engine() -> Engine:
28
36
 
29
37
 
30
38
  def create_tables() -> None:
31
- """Create tables."""
39
+ """Create tables.
40
+
41
+ Create all ORM tables defined on Base.metadata using the currently initialized engine.
42
+
43
+ Raises:
44
+ RuntimeError: If the global database engine is not initialized (call
45
+ initialize_database() first).
46
+ """
32
47
  Base.metadata.create_all(get_engine())
33
48
 
34
49
 
35
50
  def get_session() -> Session:
36
- """Get a database session. Raises an error if not initialized."""
51
+ """Get a database session. Raises an error if not initialized.
52
+
53
+ Provide a new ORM Session bound to the configured engine.
54
+
55
+ Returns:
56
+ Session: A SQLAlchemy ORM Session instance bound to the initialized engine.
57
+
58
+ Raises:
59
+ RuntimeError: If the database has not been initialized; call
60
+ initialize_database() first.
61
+ """
37
62
  if session_local is None:
38
63
  raise RuntimeError(
39
64
  "Database session not initialized. Call initialize_database() first."
@@ -42,7 +67,20 @@ def get_session() -> Session:
42
67
 
43
68
 
44
69
  def _create_sqlite_engine(config: SQLiteDatabaseConfiguration, **kwargs: Any) -> Engine:
45
- """Create SQLite database engine."""
70
+ """Create SQLite database engine.
71
+
72
+ Parameters:
73
+ config (SQLiteDatabaseConfiguration): Configuration containing
74
+ `db_path` for the SQLite file.
75
+ **kwargs: Additional keyword arguments forwarded to SQLAlchemy's create_engine.
76
+
77
+ Returns:
78
+ Engine: A SQLAlchemy Engine bound to the specified SQLite database file.
79
+
80
+ Raises:
81
+ FileNotFoundError: If the parent directory of `config.db_path` does not exist.
82
+ RuntimeError: If engine creation fails.
83
+ """
46
84
  if not Path(config.db_path).parent.exists():
47
85
  raise FileNotFoundError(
48
86
  f"SQLite database directory does not exist: {config.db_path}"
@@ -58,7 +96,25 @@ def _create_sqlite_engine(config: SQLiteDatabaseConfiguration, **kwargs: Any) ->
58
96
  def _create_postgres_engine(
59
97
  config: PostgreSQLDatabaseConfiguration, **kwargs: Any
60
98
  ) -> Engine:
61
- """Create PostgreSQL database engine."""
99
+ """Create PostgreSQL database engine.
100
+
101
+ Builds a connection URL from the configuration and creates an Engine. If
102
+ the configuration specifies a non-default namespace (a schema other than
103
+ "public"), ensures that schema exists by creating it if necessary. If a CA
104
+ certificate path is provided, the engine will be configured to use it for
105
+ SSL.
106
+
107
+ Parameters:
108
+ config (PostgreSQLDatabaseConfiguration): Connection and database
109
+ settings (user, password, host, port, db, ssl/gss options, optional
110
+ namespace and ca_cert_path).
111
+
112
+ Returns:
113
+ Engine: A SQLAlchemy Engine connected to the configured PostgreSQL database.
114
+
115
+ Raises:
116
+ RuntimeError: If engine creation fails or if creating the specified schema fails.
117
+ """
62
118
  postgres_url = (
63
119
  f"postgresql://{config.user}:{config.password.get_secret_value()}@"
64
120
  f"{config.host}:{config.port}/{config.db}"
@@ -100,7 +156,18 @@ def _create_postgres_engine(
100
156
 
101
157
 
102
158
  def initialize_database() -> None:
103
- """Initialize the database engine."""
159
+ """Initialize the database engine.
160
+
161
+ Initialize module-level database engine and session factory from the
162
+ application's configuration.
163
+
164
+ Reads configuration.database_configuration to determine the database type
165
+ (SQLite or PostgreSQL), creates and assigns a module-level `engine`, and
166
+ initializes `session_local` as a sessionmaker bound to that engine. The
167
+ engine is configured to echo SQL when the logger is at DEBUG level and to
168
+ use connection pre-ping. May raise RuntimeError if engine creation or
169
+ required schema creation fails.
170
+ """
104
171
  db_config = configuration.database_configuration
105
172
 
106
173
  global engine, session_local # pylint: disable=global-statement
@@ -30,6 +30,9 @@ Handlers for health REST API endpoints.
30
30
  ## [info.py](info.py)
31
31
  Handler for REST API call to provide info.
32
32
 
33
+ ## [mcp_auth.py](mcp_auth.py)
34
+ Handler for REST API calls related to MCP server authentication.
35
+
33
36
  ## [metrics.py](metrics.py)
34
37
  Handler for REST API call to provide metrics.
35
38
 
@@ -7,18 +7,17 @@ import uuid
7
7
  from datetime import datetime, timezone
8
8
  from typing import Annotated, Any, AsyncIterator, MutableMapping, Optional
9
9
 
10
- from fastapi import APIRouter, Depends, HTTPException, Request, status
11
- from llama_stack.apis.agents.openai_responses import (
12
- OpenAIResponseObjectStream,
13
- )
14
- from llama_stack_client import APIConnectionError
15
- from starlette.responses import Response, StreamingResponse
16
-
10
+ from a2a.server.agent_execution import AgentExecutor, RequestContext
11
+ from a2a.server.apps import A2AStarletteApplication
12
+ from a2a.server.events import EventQueue
13
+ from a2a.server.request_handlers import DefaultRequestHandler
14
+ from a2a.server.tasks import TaskStore
15
+ from a2a.server.tasks.task_updater import TaskUpdater
17
16
  from a2a.types import (
17
+ AgentCapabilities,
18
18
  AgentCard,
19
- AgentSkill,
20
19
  AgentProvider,
21
- AgentCapabilities,
20
+ AgentSkill,
22
21
  Artifact,
23
22
  Message,
24
23
  Part,
@@ -28,27 +27,27 @@ from a2a.types import (
28
27
  TaskStatusUpdateEvent,
29
28
  TextPart,
30
29
  )
31
- from a2a.server.agent_execution import AgentExecutor, RequestContext
32
- from a2a.server.events import EventQueue
33
- from a2a.server.request_handlers import DefaultRequestHandler
34
- from a2a.server.tasks import TaskStore
35
- from a2a.server.tasks.task_updater import TaskUpdater
36
- from a2a.server.apps import A2AStarletteApplication
37
30
  from a2a.utils import new_agent_text_message, new_task
31
+ from fastapi import APIRouter, Depends, HTTPException, Request, status
32
+ from llama_stack_api.openai_responses import (
33
+ OpenAIResponseObjectStream,
34
+ )
35
+ from llama_stack_client import APIConnectionError
36
+ from starlette.responses import Response, StreamingResponse
38
37
 
39
- from authentication.interface import AuthTuple
40
- from authentication import get_auth_dependency
41
- from authorization.middleware import authorize
42
- from configuration import configuration
43
- from a2a_storage import A2AStorageFactory, A2AContextStore
44
- from models.config import Action
45
- from models.requests import QueryRequest
38
+ from a2a_storage import A2AContextStore, A2AStorageFactory
46
39
  from app.endpoints.query import (
47
- select_model_and_provider_id,
48
40
  evaluate_model_hints,
41
+ select_model_and_provider_id,
49
42
  )
50
43
  from app.endpoints.streaming_query_v2 import retrieve_response
44
+ from authentication import get_auth_dependency
45
+ from authentication.interface import AuthTuple
46
+ from authorization.middleware import authorize
51
47
  from client import AsyncLlamaStackClientHolder
48
+ from configuration import configuration
49
+ from models.config import Action
50
+ from models.requests import QueryRequest
52
51
  from utils.mcp_headers import mcp_headers_dependency
53
52
  from utils.responses import extract_text_from_response_output_item
54
53
  from version import __version__
@@ -31,6 +31,8 @@ async def authorized_endpoint_handler(
31
31
  Process POST requests to the /authorized endpoint, returning
32
32
  the authenticated user's ID and username.
33
33
 
34
+ The response intentionally omits any authentication token.
35
+
34
36
  Returns:
35
37
  AuthorizedResponse: Contains the user ID and username of the authenticated user.
36
38
  """
@@ -44,6 +44,8 @@ async def config_endpoint_handler(
44
44
  Process GET requests to the /config endpoint and returns the
45
45
  current service configuration.
46
46
 
47
+ Ensures the application configuration is loaded before returning it.
48
+
47
49
  Returns:
48
50
  ConfigurationResponse: The loaded service configuration response.
49
51
  """
@@ -7,7 +7,6 @@ from fastapi import APIRouter, Depends, HTTPException, Request, status
7
7
  from llama_stack_client import (
8
8
  APIConnectionError,
9
9
  APIStatusError,
10
- NOT_GIVEN,
11
10
  )
12
11
  from sqlalchemy.exc import SQLAlchemyError
13
12
 
@@ -332,10 +331,10 @@ async def get_conversation_endpoint_handler(
332
331
  # Use Conversations API to retrieve conversation items
333
332
  conversation_items_response = await client.conversations.items.list(
334
333
  conversation_id=llama_stack_conv_id,
335
- after=NOT_GIVEN,
336
- include=NOT_GIVEN,
337
- limit=NOT_GIVEN,
338
- order=NOT_GIVEN,
334
+ after=None,
335
+ include=None,
336
+ limit=None,
337
+ order=None,
339
338
  )
340
339
  items = (
341
340
  conversation_items_response.data
@@ -151,6 +151,9 @@ def store_feedback(user_id: str, feedback: dict) -> None:
151
151
  Parameters:
152
152
  user_id (str): Unique identifier of the user submitting feedback.
153
153
  feedback (dict): Feedback data to be stored, merged with user ID and timestamp.
154
+
155
+ Raises:
156
+ HTTPException: If writing the feedback file fails (HTTP 500).
154
157
  """
155
158
  logger.debug("Storing feedback for user %s", user_id)
156
159
  # Creates storage path only if it doesn't exist. The `exist_ok=True` prevents
@@ -6,10 +6,10 @@ methods. For HEAD HTTP method, just the HTTP response code is used.
6
6
  """
7
7
 
8
8
  import logging
9
+ from enum import Enum
9
10
  from typing import Annotated, Any
10
11
 
11
12
  from fastapi import APIRouter, Depends, Response, status
12
- from llama_stack.providers.datatypes import HealthStatus
13
13
  from llama_stack_client import APIConnectionError
14
14
 
15
15
  from authentication import get_auth_dependency
@@ -30,6 +30,18 @@ logger = logging.getLogger("app.endpoints.handlers")
30
30
  router = APIRouter(tags=["health"])
31
31
 
32
32
 
33
+ # HealthStatus enum was removed from llama_stack in newer versions
34
+ # Defining locally for compatibility
35
+ class HealthStatus(str, Enum):
36
+ """Health status enum for provider health checks."""
37
+
38
+ OK = "ok"
39
+ ERROR = "Error"
40
+ NOT_IMPLEMENTED = "not_implemented"
41
+ HEALTHY = "healthy"
42
+ UNKNOWN = "unknown"
43
+
44
+
33
45
  get_readiness_responses: dict[int | str, dict[str, Any]] = {
34
46
  200: ReadinessResponse.openapi_response(),
35
47
  401: UnauthorizedResponse.openapi_response(
@@ -96,6 +108,11 @@ async def readiness_probe_get_method(
96
108
  If any provider reports an error status, responds with HTTP 503
97
109
  and details of unhealthy providers; otherwise, indicates the
98
110
  service is ready.
111
+
112
+ Returns:
113
+ ReadinessResponse: Object with `ready` indicating overall readiness,
114
+ `reason` explaining the outcome, and `providers` containing the list of
115
+ unhealthy ProviderHealthStatus entries (empty when ready).
99
116
  """
100
117
  # Used only for authorization
101
118
  _ = auth
@@ -44,6 +44,12 @@ async def info_endpoint_handler(
44
44
  Process GET requests to the /info endpoint, returning the
45
45
  service name, version and Llama-stack version.
46
46
 
47
+ Raises:
48
+ HTTPException: with status 500 and a detail object
49
+ containing `response` and `cause` when unable to connect to
50
+ Llama Stack. It can also return status 401 or 403 for
51
+ unauthorized access.
52
+
47
53
  Returns:
48
54
  InfoResponse: An object containing the service's name and version.
49
55
  """