diff --git a/scripts/gen_doc.py b/scripts/gen_doc.py index 6637a8ec9..2b10eeb47 100755 --- a/scripts/gen_doc.py +++ b/scripts/gen_doc.py @@ -44,6 +44,7 @@ def generate_docfile(directory: Path) -> None: for file in files: if file.endswith(".py"): print(f"## [{file}]({file})", file=indexfile) + print(file=indexfile) with open(file, encoding="utf-8") as fin: source = fin.read() try: diff --git a/src/README.md b/src/README.md index 5472b7b3a..5fc8b0f16 100644 --- a/src/README.md +++ b/src/README.md @@ -1,29 +1,38 @@ # List of source files stored in `src` directory ## [__init__.py](__init__.py) + Main classes for the Lightspeed Core Stack REST API service. ## [client.py](client.py) + Llama Stack client retrieval class. ## [configuration.py](configuration.py) + Configuration loader. ## [constants.py](constants.py) + Constants used in business logic. ## [lightspeed_stack.py](lightspeed_stack.py) + Entry point to the Lightspeed Core Stack REST API service. ## [llama_stack_configuration.py](llama_stack_configuration.py) + Llama Stack configuration enrichment and synthesis. ## [log.py](log.py) + Log utilities. ## [sentry.py](sentry.py) + Sentry error tracking initialization and configuration. ## [version.py](version.py) + Service version that is read by project manager tools. diff --git a/src/a2a_storage/README.md b/src/a2a_storage/README.md index 85b946791..5a50bfb29 100644 --- a/src/a2a_storage/README.md +++ b/src/a2a_storage/README.md @@ -1,20 +1,26 @@ # List of source files stored in `src/a2a_storage` directory ## [__init__.py](__init__.py) + A2A protocol persistent storage components. ## [context_store.py](context_store.py) + Abstract base class for A2A context-to-conversation mapping storage. ## [in_memory_context_store.py](in_memory_context_store.py) + In-memory implementation of A2A context store. ## [postgres_context_store.py](postgres_context_store.py) + PostgreSQL implementation of A2A context store. ## [sqlite_context_store.py](sqlite_context_store.py) + SQLite implementation of A2A context store. ## [storage_factory.py](storage_factory.py) + Factory for creating A2A storage backends. diff --git a/src/app/README.md b/src/app/README.md index 5fd8395fc..db3484aa6 100644 --- a/src/app/README.md +++ b/src/app/README.md @@ -1,14 +1,18 @@ # List of source files stored in `src/app` directory ## [__init__.py](__init__.py) + REST API service based on FastAPI. ## [database.py](database.py) + Database engine management. ## [main.py](main.py) + Definition of FastAPI based web service. ## [routers.py](routers.py) + REST API routers. diff --git a/src/app/endpoints/README.md b/src/app/endpoints/README.md index c1ac3c2eb..477b59762 100644 --- a/src/app/endpoints/README.md +++ b/src/app/endpoints/README.md @@ -1,86 +1,114 @@ # List of source files stored in `src/app/endpoints` directory ## [__init__.py](__init__.py) + Implementation of all endpoints. ## [a2a.py](a2a.py) + Handler for A2A (Agent-to-Agent) protocol endpoints using Responses API. ## [a2a_openapi.py](a2a_openapi.py) + OpenAPI-only metadata for A2A JSON-RPC routes. ## [authorized.py](authorized.py) + Handler for REST API call to authorized endpoint. ## [config.py](config.py) + Handler for REST API call to retrieve service configuration. ## [conversations_v1.py](conversations_v1.py) + Handler for REST API calls to manage conversation history using Conversations API. ## [conversations_v2.py](conversations_v2.py) + Handler for REST API calls to manage conversation history. ## [feedback.py](feedback.py) + Handler for REST API endpoint for user feedback. ## [health.py](health.py) + Handlers for health REST API endpoints. ## [info.py](info.py) + Handler for REST API call to provide info. ## [mcp_auth.py](mcp_auth.py) + Handler for REST API calls related to MCP server authentication. ## [mcp_servers.py](mcp_servers.py) + Handler for REST API calls to dynamically manage MCP servers. ## [metrics.py](metrics.py) + Handler for REST API call to provide metrics. ## [models.py](models.py) + Handler for REST API call to list available models. ## [prompts.py](prompts.py) + Handler for REST API calls to manage Llama Stack stored prompt templates. ## [providers.py](providers.py) + Handler for REST API calls to list and retrieve available providers. ## [query.py](query.py) + Handler for REST API call to provide answer to query using Response API. ## [rags.py](rags.py) + Handler for REST API calls to list and retrieve available RAGs. ## [responses.py](responses.py) + Handler for REST API call to provide answer using Responses API (LCORE specification). ## [responses_telemetry.py](responses_telemetry.py) + Splunk telemetry helpers for the Responses API endpoint. ## [rlsapi_v1.py](rlsapi_v1.py) + Handler for RHEL Lightspeed rlsapi v1 REST API endpoints. ## [root.py](root.py) + Handler for the / endpoint. ## [saved_prompts.py](saved_prompts.py) + Handler for REST API calls to manage saved prompts. ## [shields.py](shields.py) + Handler for REST API call to list available shields. ## [stream_interrupt.py](stream_interrupt.py) + Endpoint for interrupting in-progress streaming query requests. ## [streaming_query.py](streaming_query.py) + Streaming query handler using Responses API. ## [tools.py](tools.py) + Handler for REST API call to list available tools from MCP servers. ## [vector_stores.py](vector_stores.py) + Handler for REST API calls to manage vector stores and files. diff --git a/src/authentication/README.md b/src/authentication/README.md index 230767cfe..00aadbcf4 100644 --- a/src/authentication/README.md +++ b/src/authentication/README.md @@ -1,32 +1,42 @@ # List of source files stored in `src/authentication` directory ## [__init__.py](__init__.py) + This package contains authentication code and modules. ## [api_key_token.py](api_key_token.py) + Authentication flow for FastAPI endpoints with a provided API key. ## [interface.py](interface.py) + Abstract base class for all authentication method implementations. ## [jwk_token.py](jwk_token.py) + Manage authentication flow for FastAPI endpoints with JWK based JWT auth. ## [k8s.py](k8s.py) + Manage authentication flow for FastAPI endpoints with K8S/OCP. ## [noop.py](noop.py) + Manage authentication flow for FastAPI endpoints with no-op auth. ## [noop_with_token.py](noop_with_token.py) + Manage authentication flow for FastAPI endpoints with no-op auth and provided user token. ## [rh_identity.py](rh_identity.py) + Red Hat Identity header authentication for FastAPI endpoints. ## [trusted_proxy.py](trusted_proxy.py) + Trusted-proxy authentication module for requests forwarded by a K8s proxy. ## [utils.py](utils.py) + Authentication utility functions. diff --git a/src/authorization/README.md b/src/authorization/README.md index 414fb905f..300800e06 100644 --- a/src/authorization/README.md +++ b/src/authorization/README.md @@ -1,14 +1,18 @@ # List of source files stored in `src/authorization` directory ## [__init__.py](__init__.py) + Authorization module for role-based access control. ## [azure_token_manager.py](azure_token_manager.py) + Azure Entra ID token manager for Azure OpenAI authentication. ## [middleware.py](middleware.py) + Authorization middleware and decorators. ## [resolvers.py](resolvers.py) + Authorization resolvers for role evaluation and access control. diff --git a/src/cache/README.md b/src/cache/README.md index 022a3f333..1da341bd4 100644 --- a/src/cache/README.md +++ b/src/cache/README.md @@ -1,29 +1,38 @@ # List of source files stored in `src/cache` directory ## [__init__.py](__init__.py) + Various cache implementations. ## [cache.py](cache.py) + Abstract class that is parent for all cache implementations. ## [cache_entry.py](cache_entry.py) + Model for conversation history cache entry. ## [cache_error.py](cache_error.py) + Any exception that can occur during cache operations. ## [cache_factory.py](cache_factory.py) + Cache factory class. ## [in_memory_cache.py](in_memory_cache.py) + In-memory cache implementation. ## [noop_cache.py](noop_cache.py) + No-operation cache implementation. ## [postgres_cache.py](postgres_cache.py) + PostgreSQL cache implementation. ## [sqlite_cache.py](sqlite_cache.py) + Cache that uses SQLite to store cached values. diff --git a/src/data/README.md b/src/data/README.md index e9db52608..1448c2fd8 100644 --- a/src/data/README.md +++ b/src/data/README.md @@ -1,5 +1,6 @@ # List of source files stored in `src/data` directory ## [__init__.py](__init__.py) + Package-shipped data files for Lightspeed Core Stack. diff --git a/src/metrics/README.md b/src/metrics/README.md index 49a1b604d..ebc2e38c3 100644 --- a/src/metrics/README.md +++ b/src/metrics/README.md @@ -1,11 +1,14 @@ # List of source files stored in `src/metrics` directory ## [__init__.py](__init__.py) + Metrics module for Lightspeed Core Stack. ## [recording.py](recording.py) + Recording helpers for Prometheus metrics. ## [utils.py](utils.py) + Utility functions for metrics handling. diff --git a/src/models/README.md b/src/models/README.md index a474cc866..bc6ed86f0 100644 --- a/src/models/README.md +++ b/src/models/README.md @@ -1,11 +1,14 @@ # List of source files stored in `src/models` directory ## [__init__.py](__init__.py) + Pydantic models. ## [compaction.py](compaction.py) + Pydantic models for conversation compaction. ## [config.py](config.py) + Model with service configuration. diff --git a/src/models/api/README.md b/src/models/api/README.md index 58243fa92..1efb6f5fc 100644 --- a/src/models/api/README.md +++ b/src/models/api/README.md @@ -1,5 +1,6 @@ # List of source files stored in `src/models/api` directory ## [__init__.py](__init__.py) + Typed HTTP API models (OpenAPI-oriented) for FastAPI routes. diff --git a/src/models/api/requests/README.md b/src/models/api/requests/README.md index 1f7cef7f6..0935904a6 100644 --- a/src/models/api/requests/README.md +++ b/src/models/api/requests/README.md @@ -1,35 +1,46 @@ # List of source files stored in `src/models/api/requests` directory ## [__init__.py](__init__.py) + Concrete REST API request models grouped by domain. ## [catalog.py](catalog.py) + Request models for catalog-related endpoints. ## [conversations.py](conversations.py) + Request models for conversation endpoints. ## [feedback.py](feedback.py) + Request models for feedback endpoints. ## [mcp_servers.py](mcp_servers.py) + Request models for MCP server registration. ## [prompts.py](prompts.py) + Request models for prompt template endpoints. ## [query.py](query.py) + Request models for query and streaming interrupt endpoints. ## [responses_openai.py](responses_openai.py) + Request model for the OpenAI-compatible Responses API. ## [rlsapi.py](rlsapi.py) + Models for rlsapi v1 REST API requests. ## [saved_prompts.py](saved_prompts.py) + Request models for saved prompts endpoints. ## [vector_stores.py](vector_stores.py) + Request models for vector store and file endpoints. diff --git a/src/models/api/responses/README.md b/src/models/api/responses/README.md index dff4ff4c1..c1b6083d2 100644 --- a/src/models/api/responses/README.md +++ b/src/models/api/responses/README.md @@ -1,8 +1,10 @@ # List of source files stored in `src/models/api/responses` directory ## [__init__.py](__init__.py) + HTTP response models and shared OpenAPI description constants. ## [constants.py](constants.py) + OpenAPI description strings and shared example-label lists for API responses. diff --git a/src/models/api/responses/error/README.md b/src/models/api/responses/error/README.md index 6dcaa4ca9..35a151eb0 100644 --- a/src/models/api/responses/error/README.md +++ b/src/models/api/responses/error/README.md @@ -1,38 +1,50 @@ # List of source files stored in `src/models/api/responses/error` directory ## [__init__.py](__init__.py) + Structured HTTP error response models for OpenAPI documentation. ## [bad_request.py](bad_request.py) + OpenAPI-aligned error response models: HTTP 400 Bad Request. ## [bases.py](bases.py) + Base Pydantic types for OpenAPI-aligned structured API error responses. ## [conflict.py](conflict.py) + OpenAPI-aligned error response models: HTTP 409 Conflict. ## [content_too_large.py](content_too_large.py) + OpenAPI-aligned error response models: HTTP 413 Payload Too Large. ## [forbidden.py](forbidden.py) + OpenAPI-aligned error response models: HTTP 403 Forbidden. ## [internal.py](internal.py) + OpenAPI-aligned error response models: HTTP 500 Internal Server Error. ## [not_found.py](not_found.py) + OpenAPI-aligned error response models: HTTP 404 Not Found. ## [service_unavailable.py](service_unavailable.py) + OpenAPI-aligned error response models: HTTP 503 Service Unavailable. ## [too_many_requests.py](too_many_requests.py) + OpenAPI-aligned error response models: HTTP 429 Too Many Requests. ## [unauthorized.py](unauthorized.py) + OpenAPI-aligned error response models: HTTP 401 Unauthorized. ## [unprocessable_entity.py](unprocessable_entity.py) + OpenAPI-aligned error response models: HTTP 422 Unprocessable Entity. diff --git a/src/models/api/responses/successful/README.md b/src/models/api/responses/successful/README.md index ce3d5d0bc..fb3ab3594 100644 --- a/src/models/api/responses/successful/README.md +++ b/src/models/api/responses/successful/README.md @@ -1,44 +1,58 @@ # List of source files stored in `src/models/api/responses/successful` directory ## [__init__.py](__init__.py) + Concrete successful HTTP response models grouped by domain. ## [bases.py](bases.py) + Base classes for successful API response models. ## [catalog.py](catalog.py) + Successful response bodies for catalog-style endpoints. ## [configuration.py](configuration.py) + Successful response model for the configuration endpoint. ## [conversations.py](conversations.py) + Successful responses for conversation CRUD and listing. ## [feedback.py](feedback.py) + Successful responses for feedback and feedback status endpoints. ## [mcp_servers.py](mcp_servers.py) + Successful responses for MCP server registration and listing. ## [probes.py](probes.py) + Successful probe-related API responses (info, readiness, liveness, status, auth). ## [prompts.py](prompts.py) + Successful responses for stored prompt templates. ## [query.py](query.py) + Successful response models for synchronous query and streaming query documentation. ## [responses_openai.py](responses_openai.py) + Successful response model for the OpenAI-compatible Responses API. ## [rlsapi.py](rlsapi.py) + Models for rlsapi v1 REST API responses. ## [saved_prompts.py](saved_prompts.py) + Successful responses for saved prompts configuration, listing, and delete. ## [vector_stores.py](vector_stores.py) + Successful responses for vector stores and vector store files. diff --git a/src/models/common/README.md b/src/models/common/README.md index c7aae797a..bc7cf1578 100644 --- a/src/models/common/README.md +++ b/src/models/common/README.md @@ -1,38 +1,50 @@ # List of source files stored in `src/models/common` directory ## [__init__.py](__init__.py) + Shared Pydantic models and types used across API layers. ## [conversation.py](conversation.py) + Conversation list rows, metadata, and simplified turn/message shapes for APIs. ## [feedback.py](feedback.py) + Predefined feedback categories for AI response quality signals. ## [health.py](health.py) + Health-related shared models for readiness and diagnostics. ## [mcp.py](mcp.py) + MCP server metadata models shared by registration and list responses. ## [models.py](models.py) + Backend-agnostic model catalog types. ## [moderation.py](moderation.py) + Shield moderation outcomes for the responses pipeline. ## [query.py](query.py) + Shared query-related request primitives. ## [shields.py](shields.py) + Catalog models for the ``/shields`` endpoint. ## [tools.py](tools.py) + Backend-agnostic tool listing models. ## [transcripts.py](transcripts.py) + Pydantic models for persisted query/response transcript entries. ## [turn_summary.py](turn_summary.py) + RAG context, chunks, document refs, tool summaries, and per-turn aggregation. diff --git a/src/models/common/agents/README.md b/src/models/common/agents/README.md index 1ddcb18e5..55c1c57ee 100644 --- a/src/models/common/agents/README.md +++ b/src/models/common/agents/README.md @@ -1,11 +1,14 @@ # List of source files stored in `src/models/common/agents` directory ## [__init__.py](__init__.py) + Streaming payload models and event type exports. ## [stream_payloads.py](stream_payloads.py) + Typed JSON bodies for SSE streaming events. ## [turn_accumulator.py](turn_accumulator.py) + Mutable per-turn state for agent response processing. diff --git a/src/models/common/responses/README.md b/src/models/common/responses/README.md index e7bedc1d6..7988b61a5 100644 --- a/src/models/common/responses/README.md +++ b/src/models/common/responses/README.md @@ -1,17 +1,22 @@ # List of source files stored in `src/models/common/responses` directory ## [__init__.py](__init__.py) + Shared models for the OpenAI-compatible Responses API pipeline. ## [contexts.py](contexts.py) + Context objects for the responses endpoint pipeline and streaming query generators. ## [responses_api_params.py](responses_api_params.py) + Request parameter model for Llama Stack responses API calls. ## [responses_conversation_context.py](responses_conversation_context.py) + Conversation resolution result model for the OpenAI-compatible responses endpoint. ## [types.py](types.py) + Type aliases for OpenAI-compatible Responses API input shapes. diff --git a/src/models/database/README.md b/src/models/database/README.md index 813bfaefe..cf76bc700 100644 --- a/src/models/database/README.md +++ b/src/models/database/README.md @@ -1,14 +1,18 @@ # List of source files stored in `src/models/database` directory ## [__init__.py](__init__.py) + Database models package. ## [base.py](base.py) + Base model for SQLAlchemy ORM classes. ## [conversations.py](conversations.py) + User conversation models. ## [saved_prompts.py](saved_prompts.py) + User saved prompt models. diff --git a/src/observability/README.md b/src/observability/README.md index 6a4e966d4..1e1f206ae 100644 --- a/src/observability/README.md +++ b/src/observability/README.md @@ -1,8 +1,10 @@ # List of source files stored in `src/observability` directory ## [__init__.py](__init__.py) + Observability module for telemetry and event collection. ## [splunk.py](splunk.py) + Async Splunk HEC client for sending telemetry events. diff --git a/src/observability/formats/README.md b/src/observability/formats/README.md index f51ca05d3..6978956db 100644 --- a/src/observability/formats/README.md +++ b/src/observability/formats/README.md @@ -1,11 +1,14 @@ # List of source files stored in `src/observability/formats` directory ## [__init__.py](__init__.py) + Event format builders for Splunk telemetry. ## [responses.py](responses.py) + Event builders for Responses API Splunk format. ## [rlsapi.py](rlsapi.py) + Event builders for rlsapi v1 Splunk format. diff --git a/src/pydantic_ai_lightspeed/README.md b/src/pydantic_ai_lightspeed/README.md index b5ec5166e..c997021d3 100644 --- a/src/pydantic_ai_lightspeed/README.md +++ b/src/pydantic_ai_lightspeed/README.md @@ -1,5 +1,6 @@ # List of source files stored in `src/pydantic_ai_lightspeed` directory ## [__init__.py](__init__.py) + Pydantic AI integrations/extensions for Lightspeed Core Stack. diff --git a/src/pydantic_ai_lightspeed/capabilities/README.md b/src/pydantic_ai_lightspeed/capabilities/README.md index 0b6ffc607..c7e5f07be 100644 --- a/src/pydantic_ai_lightspeed/capabilities/README.md +++ b/src/pydantic_ai_lightspeed/capabilities/README.md @@ -1,8 +1,10 @@ # List of source files stored in `src/pydantic_ai_lightspeed/capabilities` directory ## [__init__.py](__init__.py) + Pluggable capabilities for pydantic-ai agents in Lightspeed. ## [base.py](base.py) + Abstract base for safety capabilities with a standalone run interface. diff --git a/src/pydantic_ai_lightspeed/capabilities/question_validity/README.md b/src/pydantic_ai_lightspeed/capabilities/question_validity/README.md index d6d9e2768..3e51fc9eb 100644 --- a/src/pydantic_ai_lightspeed/capabilities/question_validity/README.md +++ b/src/pydantic_ai_lightspeed/capabilities/question_validity/README.md @@ -1,8 +1,10 @@ # List of source files stored in `src/pydantic_ai_lightspeed/capabilities/question_validity` directory ## [__init__.py](__init__.py) + Question validity capability for agent input validation. ## [_capability.py](_capability.py) + Question validity capability for filtering off-topic user queries. diff --git a/src/pydantic_ai_lightspeed/capabilities/redaction/README.md b/src/pydantic_ai_lightspeed/capabilities/redaction/README.md index 60a374464..ed56a9cfd 100644 --- a/src/pydantic_ai_lightspeed/capabilities/redaction/README.md +++ b/src/pydantic_ai_lightspeed/capabilities/redaction/README.md @@ -1,11 +1,14 @@ # List of source files stored in `src/pydantic_ai_lightspeed/capabilities/redaction` directory ## [__init__.py](__init__.py) + PII redaction capability for Pydantic AI agents. ## [_capability.py](_capability.py) + Pydantic AI capability for PII redaction of model messages. ## [core.py](core.py) + Core redaction logic for PII detection and replacement. diff --git a/src/pydantic_ai_lightspeed/llamastack/README.md b/src/pydantic_ai_lightspeed/llamastack/README.md index 0ed6b4e07..31d479e46 100644 --- a/src/pydantic_ai_lightspeed/llamastack/README.md +++ b/src/pydantic_ai_lightspeed/llamastack/README.md @@ -1,14 +1,18 @@ # List of source files stored in `src/pydantic_ai_lightspeed/llamastack` directory ## [__init__.py](__init__.py) + Pydantic AI provider for Llama Stack. ## [_model.py](_model.py) + Custom OpenAI Responses model that works around Llama Stack streaming quirks. ## [_provider.py](_provider.py) + Llama Stack provider implementation for Pydantic AI. ## [_transport.py](_transport.py) + httpx transports for Llama Stack library and server modes. diff --git a/src/quota/README.md b/src/quota/README.md index 7b7ed798c..fc7edee27 100644 --- a/src/quota/README.md +++ b/src/quota/README.md @@ -1,35 +1,46 @@ # List of source files stored in `src/quota` directory ## [__init__.py](__init__.py) + Quota management. ## [cluster_quota_limiter.py](cluster_quota_limiter.py) + Simple cluster quota limiter where quota is fixed for the whole cluster. ## [connect_pg.py](connect_pg.py) + PostgreSQL connection handler. ## [connect_sqlite.py](connect_sqlite.py) + SQLite connection handler. ## [quota_exceed_error.py](quota_exceed_error.py) + Any exception that can occur when a user does not have enough tokens available. ## [quota_limiter.py](quota_limiter.py) + Abstract class that is the parent for all quota limiter implementations. ## [quota_limiter_factory.py](quota_limiter_factory.py) + Quota limiter factory class. ## [revokable_quota_limiter.py](revokable_quota_limiter.py) + Simple quota limiter where quota can be revoked. ## [sql.py](sql.py) + SQL commands used by quota management package. ## [token_usage_history.py](token_usage_history.py) + Class with implementation of storage for token usage history. ## [user_quota_limiter.py](user_quota_limiter.py) + Simple user quota limiter where each user has a fixed quota. diff --git a/src/runners/README.md b/src/runners/README.md index ec6696921..498c49a95 100644 --- a/src/runners/README.md +++ b/src/runners/README.md @@ -1,11 +1,14 @@ # List of source files stored in `src/runners` directory ## [__init__.py](__init__.py) + Runners. ## [quota_scheduler.py](quota_scheduler.py) + User and cluster quota scheduler runner. ## [uvicorn.py](uvicorn.py) + Uvicorn runner. diff --git a/src/telemetry/README.md b/src/telemetry/README.md index 316e3c325..ffbf1d88b 100644 --- a/src/telemetry/README.md +++ b/src/telemetry/README.md @@ -1,8 +1,10 @@ # List of source files stored in `src/telemetry` directory ## [__init__.py](__init__.py) + Telemetry module for configuration snapshot collection. ## [configuration_snapshot.py](configuration_snapshot.py) + Configuration snapshot with PII masking for telemetry. diff --git a/src/utils/README.md b/src/utils/README.md index 34efddcb3..8beddf44d 100644 --- a/src/utils/README.md +++ b/src/utils/README.md @@ -1,119 +1,158 @@ # List of source files stored in `src/utils` directory ## [__init__.py](__init__.py) + Utility classes and functions for the Lightspeed Stack core service. ## [builtin_tools.py](builtin_tools.py) + Discover builtin file-search tools when that provider is configured. ## [checks.py](checks.py) + Checks that are performed to configuration options. ## [common.py](common.py) + Common utilities for the project. ## [compaction.py](compaction.py) + Conversation compaction — partitioning, summarization, additive fold-up. ## [config_dumper.py](config_dumper.py) + Function to dump the configuration schema into OpenAPI-compatible format. ## [connection_decorator.py](connection_decorator.py) + Decorator that makes sure the object is 'connected' according to it's connected predicate. ## [conversation_compaction.py](conversation_compaction.py) + Runtime integration of conversation compaction into the request flow. ## [conversations.py](conversations.py) + Utilities for conversations. ## [degraded_mode.py](degraded_mode.py) + Degraded mode state tracking. ## [endpoints.py](endpoints.py) + Utility functions for endpoint handlers. ## [json_schema_updater.py](json_schema_updater.py) + Function to transform a JSON Schema-like dictionary into an OpenAPI-compatible schema. ## [llama_stack_version.py](llama_stack_version.py) + Check if the Llama Stack version is supported by the LCS. ## [markdown_repair.py](markdown_repair.py) + Utilities for repairing truncated markdown content. ## [mcp_auth_headers.py](mcp_auth_headers.py) + Utilities for resolving MCP server authorization headers. ## [mcp_headers.py](mcp_headers.py) + MCP headers handling. ## [mcp_oauth_probe.py](mcp_oauth_probe.py) + Probe MCP servers for OAuth and raise 401 with WWW-Authenticate when required. ## [mcp_tools.py](mcp_tools.py) + Utilities for discovering tools from remote MCP servers without Llama Stack. ## [model_list.py](model_list.py) + Helpers for normalizing OGX ``models.list()`` union responses. ## [models_dumper.py](models_dumper.py) + Function to dump the schema of all data models into OpenAPI-compatible format. ## [openapi_schema_dumper.py](openapi_schema_dumper.py) + Utility function to dump schema with list of models into OpenAPI-compatible JSON format. ## [prompts.py](prompts.py) + Utility functions for system prompts. ## [pydantic_ai_helpers.py](pydantic_ai_helpers.py) + Helpers for running Pydantic AI agents against Llama Stack (Responses API compatibility). ## [query.py](query.py) + Utility functions for working with queries. ## [quota_utils.py](quota_utils.py) + Quota handling helper functions. ## [reranker.py](reranker.py) + Reranker utilities for RAG chunk reranking. ## [responses.py](responses.py) + Utility functions for processing Responses API output. ## [rh_identity.py](rh_identity.py) + Utility functions for extracting RH Identity context for telemetry. ## [saved_prompts.py](saved_prompts.py) + Validation helpers and data access for saved prompts. ## [shields.py](shields.py) + Utility helpers for shield override validation and moderation. ## [stream_interrupts.py](stream_interrupts.py) + Stream interrupt registry and persistence utilities. ## [streaming_sse.py](streaming_sse.py) + SSE formatting helpers for streaming query responses. ## [suid.py](suid.py) + Session ID utility functions. ## [token_counter.py](token_counter.py) + Helper classes to count tokens sent and received by the LLM. ## [token_estimator.py](token_estimator.py) + Pre-LLM-call token estimation. ## [tool_formatter.py](tool_formatter.py) + Utility functions for formatting and parsing MCP tool descriptions. ## [transcripts.py](transcripts.py) + Transcript handling. ## [types.py](types.py) + Common types for the project. ## [vector_search.py](vector_search.py) + Vector search utilities for query endpoints. diff --git a/src/utils/agents/README.md b/src/utils/agents/README.md index 65b247af9..ca09f7b20 100644 --- a/src/utils/agents/README.md +++ b/src/utils/agents/README.md @@ -1,17 +1,22 @@ # List of source files stored in `src/utils/agents` directory ## [__init__.py](__init__.py) + Agent helpers. ## [error_handler.py](error_handler.py) + Error mapping for agent inference failures to structured API error responses. ## [query.py](query.py) + Non-streaming agent helpers and shared turn-summary builders for agent runs. ## [streaming.py](streaming.py) + Agent streaming helpers for the streaming_query flow. ## [tool_processor.py](tool_processor.py) + Process and record pydantic-ai tool parts during agent stream dispatch. diff --git a/tests/e2e/features/README.md b/tests/e2e/features/README.md index 33a566064..d9cdf399f 100644 --- a/tests/e2e/features/README.md +++ b/tests/e2e/features/README.md @@ -1,5 +1,6 @@ # List of source files stored in `tests/e2e/features` directory ## [environment.py](environment.py) + Code to be called before and after certain events during testing. diff --git a/tests/e2e/features/steps/README.md b/tests/e2e/features/steps/README.md index 183cdba3c..248940d49 100644 --- a/tests/e2e/features/steps/README.md +++ b/tests/e2e/features/steps/README.md @@ -1,59 +1,78 @@ # List of source files stored in `tests/e2e/features/steps` directory ## [__init__.py](__init__.py) + Implementation of end-to-end tests steps. ## [auth.py](auth.py) + Implementation of common test steps. ## [common.py](common.py) + Implementation of common test steps. ## [common_http.py](common_http.py) + Common steps for HTTP-related operations. ## [conversation.py](conversation.py) + Implementation of common test steps. ## [feedback.py](feedback.py) + Implementation of common test steps for the feedback API. ## [health.py](health.py) + Implementation of common test steps. ## [info.py](info.py) + Implementation of common test steps. ## [llm_query_response.py](llm_query_response.py) + LLM query and response steps. ## [models.py](models.py) + Steps for /models endpoint. ## [place_holder.py](place_holder.py) + Implementation of placeholder test steps. ## [prompts.py](prompts.py) + Behave steps for /v1/prompts endpoint end-to-end tests. ## [proxy.py](proxy.py) + Step definitions for proxy and TLS networking e2e tests. ## [rbac.py](rbac.py) + Step definitions for RBAC E2E tests. ## [responses_steps.py](responses_steps.py) + Behave steps for POST /v1/responses (LCORE Responses API) multi-turn tests. ## [rlsapi_v1.py](rlsapi_v1.py) + rlsapi v1 endpoint test steps. ## [shields.py](shields.py) + Behave steps for temporarily disabling Llama Stack shields in e2e (server mode). ## [tls.py](tls.py) + Step definitions for TLS configuration e2e tests. ## [token_counters.py](token_counters.py) + Step definitions for token counter validation. diff --git a/tests/e2e/mock_jwks_server/README.md b/tests/e2e/mock_jwks_server/README.md index 48d931d68..603424345 100644 --- a/tests/e2e/mock_jwks_server/README.md +++ b/tests/e2e/mock_jwks_server/README.md @@ -1,8 +1,10 @@ # List of source files stored in `tests/e2e/mock_jwks_server` directory ## [generate_tokens.py](generate_tokens.py) + One-time script to generate JWKS and test tokens. ## [server.py](server.py) + Simple mock JWKS server for E2E RBAC tests. diff --git a/tests/e2e/mock_mcp_server/README.md b/tests/e2e/mock_mcp_server/README.md index 4236f7a14..6650f7ddc 100644 --- a/tests/e2e/mock_mcp_server/README.md +++ b/tests/e2e/mock_mcp_server/README.md @@ -1,5 +1,6 @@ # List of source files stored in `tests/e2e/mock_mcp_server` directory ## [server.py](server.py) + Minimal mock MCP server for E2E tests with OAuth support. diff --git a/tests/e2e/mock_tls_inference_server/README.md b/tests/e2e/mock_tls_inference_server/README.md index 63094a1af..b165ff9c9 100644 --- a/tests/e2e/mock_tls_inference_server/README.md +++ b/tests/e2e/mock_tls_inference_server/README.md @@ -1,5 +1,6 @@ # List of source files stored in `tests/e2e/mock_tls_inference_server` directory ## [server.py](server.py) + Mock OpenAI-compatible HTTPS inference server for TLS e2e testing. diff --git a/tests/e2e/proxy/README.md b/tests/e2e/proxy/README.md index b3d88d75d..429218ebc 100644 --- a/tests/e2e/proxy/README.md +++ b/tests/e2e/proxy/README.md @@ -1,11 +1,14 @@ # List of source files stored in `tests/e2e/proxy` directory ## [__init__.py](__init__.py) + Test proxy infrastructure for e2e networking tests. ## [interception_proxy.py](interception_proxy.py) + Minimal TLS-intercepting (MITM) proxy for e2e testing. ## [tunnel_proxy.py](tunnel_proxy.py) + Minimal HTTP CONNECT tunnel proxy for e2e testing. diff --git a/tests/e2e/utils/README.md b/tests/e2e/utils/README.md index 1ae5059af..218d5be7f 100644 --- a/tests/e2e/utils/README.md +++ b/tests/e2e/utils/README.md @@ -1,17 +1,22 @@ # List of source files stored in `tests/e2e/utils` directory ## [llama_config_utils.py](llama_config_utils.py) + Helpers for reading and updating Llama Stack run.yaml across environments. ## [llama_prow_utils.py](llama_prow_utils.py) + Thin Prow/OpenShift wrappers for Llama Stack run.yaml ConfigMap operations. ## [llama_stack_utils.py](llama_stack_utils.py) + E2E test utilities for Llama Stack shields. ## [prow_utils.py](prow_utils.py) + Prow/OpenShift-specific utility functions for E2E tests. ## [utils.py](utils.py) + Unsorted utility functions to be used from other sources and test step definitions. diff --git a/tests/integration/container_lifecycle/README.md b/tests/integration/container_lifecycle/README.md index 220b00955..090db711a 100644 --- a/tests/integration/container_lifecycle/README.md +++ b/tests/integration/container_lifecycle/README.md @@ -1,5 +1,6 @@ # List of source files stored in `tests/integration/container_lifecycle` directory ## [test_container_lifecycle.py](test_container_lifecycle.py) + Integration tests for Llama Stack container lifecycle management. diff --git a/tests/integration/endpoints/README.md b/tests/integration/endpoints/README.md index 4e4876188..604a13aaa 100644 --- a/tests/integration/endpoints/README.md +++ b/tests/integration/endpoints/README.md @@ -1,59 +1,78 @@ # List of source files stored in `tests/integration/endpoints` directory ## [__init__.py](__init__.py) + Integration tests for API endpoints. ## [test_authorized_endpoint.py](test_authorized_endpoint.py) + Integration tests for the /authorized endpoint. ## [test_config_integration.py](test_config_integration.py) + Integration tests for the /config endpoint. ## [test_conversations_v1_integration.py](test_conversations_v1_integration.py) + Integration tests for the /v1/conversations REST API endpoints. ## [test_conversations_v2_integration.py](test_conversations_v2_integration.py) + Integration tests for the /v2/conversations REST API endpoints (cache-based). ## [test_health_integration.py](test_health_integration.py) + Integration tests for the /health endpoint. ## [test_info_integration.py](test_info_integration.py) + Integration tests for the /info endpoint. ## [test_model_list.py](test_model_list.py) + Integration tests for the /models endpoint (using Responses API). ## [test_query_byok_integration.py](test_query_byok_integration.py) + Integration tests for the /query endpoint BYOK inline and tool RAG functionality. ## [test_query_integration.py](test_query_integration.py) + Integration tests for the /query endpoint (using Responses API). ## [test_responses_byok_integration.py](test_responses_byok_integration.py) + Integration tests for the /responses endpoint BYOK RAG functionality. ## [test_responses_integration.py](test_responses_integration.py) + Integration tests for the /v1/responses endpoint. ## [test_rlsapi_v1_integration.py](test_rlsapi_v1_integration.py) + Integration tests for the rlsapi v1 /infer endpoint. ## [test_root_endpoint.py](test_root_endpoint.py) + Integration tests for the /root endpoint. ## [test_saved_prompts_integration.py](test_saved_prompts_integration.py) + Integration tests for the /v1/saved-prompts REST API endpoints. ## [test_stream_interrupt_integration.py](test_stream_interrupt_integration.py) + Integration tests for the streaming query interrupt lifecycle. ## [test_streaming_query_byok_integration.py](test_streaming_query_byok_integration.py) + Integration tests for the /streaming_query endpoint BYOK inline and tool RAG functionality. ## [test_streaming_query_integration.py](test_streaming_query_integration.py) + Integration tests for the /streaming_query endpoint (using Responses API). ## [test_tools_integration.py](test_tools_integration.py) + Integration tests for the /tools endpoint. diff --git a/tests/unit/README.md b/tests/unit/README.md index 3f4725c5d..0c0d45eb2 100644 --- a/tests/unit/README.md +++ b/tests/unit/README.md @@ -1,35 +1,46 @@ # List of source files stored in `tests/unit` directory ## [__init__.py](__init__.py) + Unit tests. ## [conftest.py](conftest.py) + Shared pytest fixtures for unit tests. ## [test_client.py](test_client.py) + Unit tests for functions defined in src/client.py. ## [test_configuration.py](test_configuration.py) + Unit tests for functions defined in src/configuration.py. ## [test_configuration_unknown_fields.py](test_configuration_unknown_fields.py) + Test configuration validation for unknown fields. ## [test_degraded_mode.py](test_degraded_mode.py) + Unit tests for the degraded mode tracker. ## [test_lightspeed_stack.py](test_lightspeed_stack.py) + Unit tests for functions defined in src/lightspeed_stack.py. ## [test_llama_stack_configuration.py](test_llama_stack_configuration.py) + Unit tests for src/llama_stack_configuration.py. ## [test_llama_stack_synthesize.py](test_llama_stack_synthesize.py) + Unit tests for unified-mode Llama Stack configuration synthesis (LCORE-2336). ## [test_log.py](test_log.py) + Unit tests for functions defined in src/log.py. ## [test_sentry.py](test_sentry.py) + Unit tests for functions defined in src/sentry.py. diff --git a/tests/unit/a2a_storage/README.md b/tests/unit/a2a_storage/README.md index 9fdae62ab..2573ed13a 100644 --- a/tests/unit/a2a_storage/README.md +++ b/tests/unit/a2a_storage/README.md @@ -1,14 +1,18 @@ # List of source files stored in `tests/unit/a2a_storage` directory ## [__init__.py](__init__.py) + Unit tests for A2A storage module. ## [test_in_memory_context_store.py](test_in_memory_context_store.py) + Unit tests for InMemoryA2AContextStore. ## [test_sqlite_context_store.py](test_sqlite_context_store.py) + Unit tests for SQLiteA2AContextStore. ## [test_storage_factory.py](test_storage_factory.py) + Unit tests for A2AStorageFactory. diff --git a/tests/unit/app/README.md b/tests/unit/app/README.md index f06dc9fb7..5fcadf112 100644 --- a/tests/unit/app/README.md +++ b/tests/unit/app/README.md @@ -1,14 +1,18 @@ # List of source files stored in `tests/unit/app` directory ## [__init__.py](__init__.py) + Init of tests/unit/app. ## [test_database.py](test_database.py) + Unit tests for app.database module. ## [test_main_middleware.py](test_main_middleware.py) + Unit tests for the pure ASGI middlewares in main.py. ## [test_routers.py](test_routers.py) + Unit tests for routers.py. diff --git a/tests/unit/app/endpoints/README.md b/tests/unit/app/endpoints/README.md index fec5a5b37..2e75c8c92 100644 --- a/tests/unit/app/endpoints/README.md +++ b/tests/unit/app/endpoints/README.md @@ -1,86 +1,114 @@ # List of source files stored in `tests/unit/app/endpoints` directory ## [__init__.py](__init__.py) + Unit tests for endpoints implementations. ## [conftest.py](conftest.py) + Shared pytest fixtures for endpoint unit tests. ## [test_a2a.py](test_a2a.py) + Unit tests for the A2A (Agent-to-Agent) protocol endpoints. ## [test_authorized.py](test_authorized.py) + Unit tests for the /authorized REST API endpoint. ## [test_config.py](test_config.py) + Unit tests for the /config REST API endpoint. ## [test_conversations.py](test_conversations.py) + Unit tests for the /conversations REST API endpoints. ## [test_conversations_v2.py](test_conversations_v2.py) + Unit tests for the /conversations REST API endpoints. ## [test_feedback.py](test_feedback.py) + Unit tests for the /feedback REST API endpoint. ## [test_health.py](test_health.py) + Unit tests for the /health REST API endpoint. ## [test_info.py](test_info.py) + Unit tests for the /info REST API endpoint. ## [test_mcp_auth.py](test_mcp_auth.py) + Unit tests for MCP auth endpoint. ## [test_mcp_servers.py](test_mcp_servers.py) + Unit tests for the MCP servers dynamic registration endpoint. ## [test_metrics.py](test_metrics.py) + Unit tests for the /metrics REST API endpoint. ## [test_models.py](test_models.py) + Unit tests for the /models REST API endpoint. ## [test_prompts.py](test_prompts.py) + Unit tests for the /prompts REST API endpoints. ## [test_providers.py](test_providers.py) + Unit tests for the /providers REST API endpoints. ## [test_query.py](test_query.py) + Unit tests for the /query (v2) REST API endpoint using Responses API. ## [test_rags.py](test_rags.py) + Unit tests for the /rags REST API endpoints. ## [test_responses.py](test_responses.py) + Unit tests for the /responses REST API endpoint (LCORE Responses API). ## [test_responses_splunk.py](test_responses_splunk.py) + Unit tests for Splunk telemetry in the /responses endpoint. ## [test_rlsapi_v1.py](test_rlsapi_v1.py) + Unit tests for the rlsapi v1 /infer REST API endpoint. ## [test_root.py](test_root.py) + Unit tests for the / endpoint handler. ## [test_saved_prompts.py](test_saved_prompts.py) + Unit tests for the /saved-prompts REST API endpoints. ## [test_shields.py](test_shields.py) + Unit tests for the /shields REST API endpoint. ## [test_stream_interrupt.py](test_stream_interrupt.py) + Unit tests for streaming query interrupt endpoint. ## [test_streaming_query.py](test_streaming_query.py) + Unit tests for the /streaming_query (v2) endpoint using Responses API. ## [test_tools.py](test_tools.py) + Unit tests for tools endpoint. ## [test_vector_stores.py](test_vector_stores.py) + Unit tests for the /vector-stores REST API endpoints. diff --git a/tests/unit/authentication/README.md b/tests/unit/authentication/README.md index 1690e99cb..7968e03a1 100644 --- a/tests/unit/authentication/README.md +++ b/tests/unit/authentication/README.md @@ -1,32 +1,42 @@ # List of source files stored in `tests/unit/authentication` directory ## [__init__.py](__init__.py) + Authentication unit tests package. ## [test_api_key_token.py](test_api_key_token.py) + Unit tests for functions defined in authentication/api_key_token.py ## [test_auth.py](test_auth.py) + Unit tests for functions defined in authentication/__init__.py ## [test_jwk_token.py](test_jwk_token.py) + Unit tests for functions defined in authentication/jwk_token.py ## [test_k8s.py](test_k8s.py) + Unit tests for authentication/k8s module. ## [test_noop.py](test_noop.py) + Unit tests for functions defined in authentication/noop.py ## [test_noop_with_token.py](test_noop_with_token.py) + Unit tests for functions defined in authentication/noop_with_token.py ## [test_rh_identity.py](test_rh_identity.py) + Unit tests for Red Hat Identity authentication module. ## [test_trusted_proxy.py](test_trusted_proxy.py) + Unit tests for authentication/trusted_proxy module. ## [test_utils.py](test_utils.py) + Unit tests for functions defined in authentication/utils.py diff --git a/tests/unit/authorization/README.md b/tests/unit/authorization/README.md index d6395e887..63d648432 100644 --- a/tests/unit/authorization/README.md +++ b/tests/unit/authorization/README.md @@ -1,14 +1,18 @@ # List of source files stored in `tests/unit/authorization` directory ## [__init__.py](__init__.py) + Unit tests for authorization module. ## [test_azure_token_manager.py](test_azure_token_manager.py) + Unit test for Authentication with Azure Entra ID Credentials. ## [test_middleware.py](test_middleware.py) + Unit tests for the authorization middleware. ## [test_resolvers.py](test_resolvers.py) + Unit tests for the authorization resolvers. diff --git a/tests/unit/cache/README.md b/tests/unit/cache/README.md index 5c3ba497e..bbdfc48b6 100644 --- a/tests/unit/cache/README.md +++ b/tests/unit/cache/README.md @@ -1,20 +1,26 @@ # List of source files stored in `tests/unit/cache` directory ## [__init__.py](__init__.py) + Test cases for conversation history cache implementations. ## [test_cache_factory.py](test_cache_factory.py) + Unit tests for CacheFactory class. ## [test_in_memory_cache.py](test_in_memory_cache.py) + Unit tests for InMemoryCache class — conversation compaction summaries (LCORE-1571). ## [test_noop_cache.py](test_noop_cache.py) + Unit tests for NoopCache class. ## [test_postgres_cache.py](test_postgres_cache.py) + Unit tests for PostgreSQL cache implementation. ## [test_sqlite_cache.py](test_sqlite_cache.py) + Unit tests for SQLite cache implementation. diff --git a/tests/unit/metrics/README.md b/tests/unit/metrics/README.md index 3d9c0e37b..7bf2f7155 100644 --- a/tests/unit/metrics/README.md +++ b/tests/unit/metrics/README.md @@ -1,11 +1,14 @@ # List of source files stored in `tests/unit/metrics` directory ## [__init__.py](__init__.py) + Unit tests for metrics. ## [test_recording.py](test_recording.py) + Unit tests for Prometheus metric recording helpers. ## [test_utis.py](test_utis.py) + Unit tests for functions defined in metrics/utils.py diff --git a/tests/unit/models/README.md b/tests/unit/models/README.md index 906c006a2..053dfdb8b 100644 --- a/tests/unit/models/README.md +++ b/tests/unit/models/README.md @@ -1,14 +1,18 @@ # List of source files stored in `tests/unit/models` directory ## [__init__.py](__init__.py) + Unit tests for models. ## [test_compaction.py](test_compaction.py) + Unit tests for the ConversationSummary model. ## [test_saved_prompts_config.py](test_saved_prompts_config.py) + Unit tests for SavedPromptsConfiguration. ## [test_saved_prompts_list_response.py](test_saved_prompts_list_response.py) + Unit tests for saved prompts list response models. diff --git a/tests/unit/models/config/README.md b/tests/unit/models/config/README.md index 210e40a87..6bbc662ce 100644 --- a/tests/unit/models/config/README.md +++ b/tests/unit/models/config/README.md @@ -1,95 +1,126 @@ # List of source files stored in `tests/unit/models/config` directory ## [__init__.py](__init__.py) + Unit tests for models defined in config.py. ## [test_a2a_state_configuration.py](test_a2a_state_configuration.py) + Unit tests for A2AStateConfiguration. ## [test_approvals_configuration.py](test_approvals_configuration.py) + Unit tests for human-in-the-loop approvals configuration models. ## [test_authentication_configuration.py](test_authentication_configuration.py) + Unit tests for AuthenticationConfiguration model. ## [test_byok_rag.py](test_byok_rag.py) + Unit tests for ByokRag model. ## [test_compaction_configuration.py](test_compaction_configuration.py) + Unit tests for CompactionConfiguration and its placement on Configuration. ## [test_conversation_history.py](test_conversation_history.py) + Unit tests for ConversationHistoryConfiguration model. ## [test_cors.py](test_cors.py) + Unit tests for CORSConfiguration model. ## [test_customization.py](test_customization.py) + Unit tests for Customization model. ## [test_database_configuration.py](test_database_configuration.py) + Unit tests for DatabaseConfiguration model. ## [test_dump_configuration.py](test_dump_configuration.py) + Unit tests checking ability to dump configuration. ## [test_in_memory_cache_configuration.py](test_in_memory_cache_configuration.py) + Unit tests for InMemoryCache model. ## [test_inference_configuration.py](test_inference_configuration.py) + Unit tests for InferenceConfiguration model. ## [test_jwt_role_rule.py](test_jwt_role_rule.py) + Unit tests for JwtRoleRule model. ## [test_llama_stack_configuration.py](test_llama_stack_configuration.py) + Unit tests for LlamaStackConfiguration model. ## [test_model_context_protocol_server.py](test_model_context_protocol_server.py) + Unit tests for ModelContextProtocolServer model. ## [test_observability_configuration.py](test_observability_configuration.py) + Unit tests for ObservabilityConfiguration model. ## [test_postgresql_database_configuration.py](test_postgresql_database_configuration.py) + Unit tests for PostgreSQLDatabaseConfiguration model. ## [test_quota_handlers_config.py](test_quota_handlers_config.py) + Unit tests for QuotaHandlersConfiguration model. ## [test_quota_limiter_config.py](test_quota_limiter_config.py) + Unit tests for QuotaLimiterConfig model. ## [test_quota_scheduler_config.py](test_quota_scheduler_config.py) + Unit tests for QuotaSchedulerConfig model. ## [test_rag_configuration.py](test_rag_configuration.py) + Unit tests for RAG and OKP configuration models. ## [test_reranker_configuration.py](test_reranker_configuration.py) + Unit tests for RerankerConfiguration model. ## [test_rlsapi_v1_configuration.py](test_rlsapi_v1_configuration.py) + Unit tests for RlsapiV1Configuration and related startup validators. ## [test_service_configuration.py](test_service_configuration.py) + Unit tests for ServiceConfiguration model. ## [test_shields_configuration.py](test_shields_configuration.py) + Unit tests for ShieldConfiguration model and the Configuration.shields list. ## [test_skills_configuration.py](test_skills_configuration.py) + Unit tests for SkillsConfiguration model. ## [test_splunk_configuration.py](test_splunk_configuration.py) + Unit tests for SplunkConfiguration model. ## [test_tls_configuration.py](test_tls_configuration.py) + Unit tests for TLSConfiguration model. ## [test_user_data_collection.py](test_user_data_collection.py) + Unit tests for UserDataCollection model. ## [test_vector_store.py](test_vector_store.py) + Unit tests for vector_store configuration models. diff --git a/tests/unit/models/database/README.md b/tests/unit/models/database/README.md index 694564ced..19fc88f9b 100644 --- a/tests/unit/models/database/README.md +++ b/tests/unit/models/database/README.md @@ -1,8 +1,10 @@ # List of source files stored in `tests/unit/models/database` directory ## [__init__.py](__init__.py) + Unit tests for database models. ## [test_saved_prompts.py](test_saved_prompts.py) + Unit tests for SavedPrompt database model. diff --git a/tests/unit/models/requests/README.md b/tests/unit/models/requests/README.md index a07744eb8..d7a74a1ac 100644 --- a/tests/unit/models/requests/README.md +++ b/tests/unit/models/requests/README.md @@ -1,23 +1,30 @@ # List of source files stored in `tests/unit/models/requests` directory ## [__init__.py](__init__.py) + Unit tests for REST API request models under ``models.api.requests``. ## [test_attachment.py](test_attachment.py) + Unit tests for Attachment model. ## [test_feedback_request.py](test_feedback_request.py) + Unit tests for FeedbackRequest model. ## [test_feedback_status_update_request.py](test_feedback_status_update_request.py) + Unit tests for FeedbackStatusUpdateRequest model. ## [test_query_request.py](test_query_request.py) + Unit tests for QueryRequest model. ## [test_responses_request.py](test_responses_request.py) + Unit tests for ResponsesRequest body-size validation. ## [test_vector_store_requests.py](test_vector_store_requests.py) + Unit tests for Vector Store request models. diff --git a/tests/unit/models/responses/README.md b/tests/unit/models/responses/README.md index d196a6b39..192dc8e01 100644 --- a/tests/unit/models/responses/README.md +++ b/tests/unit/models/responses/README.md @@ -1,26 +1,34 @@ # List of source files stored in `tests/unit/models/responses` directory ## [__init__.py](__init__.py) + Unit tests for models defined in responses.py. ## [test_authorized_response.py](test_authorized_response.py) + Unit tests for AuthorizedResponse model. ## [test_error_responses.py](test_error_responses.py) + Unit tests for all error response models. ## [test_query_response.py](test_query_response.py) + Unit tests for QueryResponse model. ## [test_rag_chunk.py](test_rag_chunk.py) + Unit tests for RAGChunk and RAGContext models. ## [test_response_types.py](test_response_types.py) + Unit tests for response-related type models defined in models/responses.py. ## [test_successful_responses.py](test_successful_responses.py) + Unit tests for all successful response models. ## [test_types.py](test_types.py) + Unit tests for response-related type models. diff --git a/tests/unit/models/rlsapi/README.md b/tests/unit/models/rlsapi/README.md index 6b801bd57..f7f223736 100644 --- a/tests/unit/models/rlsapi/README.md +++ b/tests/unit/models/rlsapi/README.md @@ -1,11 +1,14 @@ # List of source files stored in `tests/unit/models/rlsapi` directory ## [__init__.py](__init__.py) + Unit tests for rlsapi v1 models. ## [test_requests.py](test_requests.py) + Unit tests for rlsapi v1 request models. ## [test_responses.py](test_responses.py) + Unit tests for rlsapi v1 response models. diff --git a/tests/unit/observability/README.md b/tests/unit/observability/README.md index b388a94d9..079a420a2 100644 --- a/tests/unit/observability/README.md +++ b/tests/unit/observability/README.md @@ -1,8 +1,10 @@ # List of source files stored in `tests/unit/observability` directory ## [__init__.py](__init__.py) + Unit tests for observability module. ## [test_splunk.py](test_splunk.py) + Unit tests for Splunk HEC client. diff --git a/tests/unit/observability/formats/README.md b/tests/unit/observability/formats/README.md index e154a397b..5bad4e904 100644 --- a/tests/unit/observability/formats/README.md +++ b/tests/unit/observability/formats/README.md @@ -1,11 +1,14 @@ # List of source files stored in `tests/unit/observability/formats` directory ## [__init__.py](__init__.py) + Unit tests for observability event format builders. ## [test_responses.py](test_responses.py) + Unit tests for responses event builders. ## [test_rlsapi.py](test_rlsapi.py) + Unit tests for rlsapi v1 event builders. diff --git a/tests/unit/pydantic_ai_lightspeed/README.md b/tests/unit/pydantic_ai_lightspeed/README.md index b1d77535c..7531a03d9 100644 --- a/tests/unit/pydantic_ai_lightspeed/README.md +++ b/tests/unit/pydantic_ai_lightspeed/README.md @@ -1,5 +1,6 @@ # List of source files stored in `tests/unit/pydantic_ai_lightspeed` directory ## [__init__.py](__init__.py) + Unit tests for the pydantic_ai_lightspeed package. diff --git a/tests/unit/pydantic_ai_lightspeed/capabilities/README.md b/tests/unit/pydantic_ai_lightspeed/capabilities/README.md index eb318efd1..b603ec1a9 100644 --- a/tests/unit/pydantic_ai_lightspeed/capabilities/README.md +++ b/tests/unit/pydantic_ai_lightspeed/capabilities/README.md @@ -1,5 +1,6 @@ # List of source files stored in `tests/unit/pydantic_ai_lightspeed/capabilities` directory ## [__init__.py](__init__.py) + Unit tests for pydantic_ai_lightspeed capabilities. diff --git a/tests/unit/pydantic_ai_lightspeed/capabilities/question_validity/README.md b/tests/unit/pydantic_ai_lightspeed/capabilities/question_validity/README.md index b98e24ca9..6e3ff8979 100644 --- a/tests/unit/pydantic_ai_lightspeed/capabilities/question_validity/README.md +++ b/tests/unit/pydantic_ai_lightspeed/capabilities/question_validity/README.md @@ -1,8 +1,10 @@ # List of source files stored in `tests/unit/pydantic_ai_lightspeed/capabilities/question_validity` directory ## [__init__.py](__init__.py) + Unit tests for question validity capability. ## [test_capability.py](test_capability.py) + Unit tests for pydantic_ai_lightspeed.capabilities.question_validity._capacity module. diff --git a/tests/unit/pydantic_ai_lightspeed/capabilities/redaction/README.md b/tests/unit/pydantic_ai_lightspeed/capabilities/redaction/README.md index 134637706..d52381911 100644 --- a/tests/unit/pydantic_ai_lightspeed/capabilities/redaction/README.md +++ b/tests/unit/pydantic_ai_lightspeed/capabilities/redaction/README.md @@ -1,14 +1,18 @@ # List of source files stored in `tests/unit/pydantic_ai_lightspeed/capabilities/redaction` directory ## [__init__.py](__init__.py) + Tests for pydantic_ai_lightspeed.capabilities.redaction package. ## [test_capability.py](test_capability.py) + Unit tests for pydantic_ai_lightspeed.capabilities.redaction.capability module. ## [test_config.py](test_config.py) + Unit tests for pydantic_ai_lightspeed.capabilities.redaction.config module. ## [test_core.py](test_core.py) + Unit tests for pydantic_ai_lightspeed.capabilities.redaction.core module. diff --git a/tests/unit/pydantic_ai_lightspeed/llamastack/README.md b/tests/unit/pydantic_ai_lightspeed/llamastack/README.md index fd0c79b39..4aedd4cd6 100644 --- a/tests/unit/pydantic_ai_lightspeed/llamastack/README.md +++ b/tests/unit/pydantic_ai_lightspeed/llamastack/README.md @@ -1,14 +1,18 @@ # List of source files stored in `tests/unit/pydantic_ai_lightspeed/llamastack` directory ## [__init__.py](__init__.py) + Unit tests for pydantic_ai_lightspeed.llamastack sub-package. ## [test_model.py](test_model.py) + Unit tests for pydantic_ai_lightspeed.llamastack._model module. ## [test_provider.py](test_provider.py) + Unit tests for pydantic_ai_lightspeed.llamastack._provider module. ## [test_transport.py](test_transport.py) + Unit tests for pydantic_ai_lightspeed.llamastack._transport module. diff --git a/tests/unit/quota/README.md b/tests/unit/quota/README.md index fd1febf16..8bc76d7fd 100644 --- a/tests/unit/quota/README.md +++ b/tests/unit/quota/README.md @@ -1,23 +1,30 @@ # List of source files stored in `tests/unit/quota` directory ## [__init__.py](__init__.py) + Unit tests for quota limiters. ## [test_cluster_quota_limiter.py](test_cluster_quota_limiter.py) + Unit tests for ClusterQuotaLimiter class. ## [test_connect_pg.py](test_connect_pg.py) + Unit tests for PostgreSQL connection handler. ## [test_connect_sqlite.py](test_connect_sqlite.py) + Unit tests for SQLite connection handler. ## [test_quota_exceed_error.py](test_quota_exceed_error.py) + Unit tests for QuotaExceedError class. ## [test_quota_limiter_factory.py](test_quota_limiter_factory.py) + Unit tests for quota limiter factory class. ## [test_user_quota_limiter.py](test_user_quota_limiter.py) + Unit tests for UserQuotaLimiter class. diff --git a/tests/unit/runners/README.md b/tests/unit/runners/README.md index 33ffdcab2..92086f296 100644 --- a/tests/unit/runners/README.md +++ b/tests/unit/runners/README.md @@ -1,8 +1,10 @@ # List of source files stored in `tests/unit/runners` directory ## [__init__.py](__init__.py) + Unit tests for runners. ## [test_uvicorn_runner.py](test_uvicorn_runner.py) + Unit tests for the Uvicorn runner implementation. diff --git a/tests/unit/telemetry/README.md b/tests/unit/telemetry/README.md index da5049a6d..81860adc4 100644 --- a/tests/unit/telemetry/README.md +++ b/tests/unit/telemetry/README.md @@ -1,11 +1,14 @@ # List of source files stored in `tests/unit/telemetry` directory ## [__init__.py](__init__.py) + Unit tests for the telemetry module. ## [conftest.py](conftest.py) + Shared fixtures for telemetry unit tests. ## [test_configuration_snapshot.py](test_configuration_snapshot.py) + Tests for configuration snapshot with PII masking. diff --git a/tests/unit/utils/README.md b/tests/unit/utils/README.md index 9a606cde5..55b32396d 100644 --- a/tests/unit/utils/README.md +++ b/tests/unit/utils/README.md @@ -1,101 +1,134 @@ # List of source files stored in `tests/unit/utils` directory ## [__init__.py](__init__.py) + Init of tests/unit/utils. ## [auth_helpers.py](auth_helpers.py) + Helper functions for mocking authorization in tests. ## [test_builtin_tools.py](test_builtin_tools.py) + Unit tests for builtin file-search tool discovery. ## [test_checks.py](test_checks.py) + Unit tests for functions defined in utils/checks module. ## [test_compaction.py](test_compaction.py) + Unit tests for utils/compaction — partitioning, prompt, summarization. ## [test_config_dumper.py](test_config_dumper.py) + Unit tests for utils/config_dumper module. ## [test_connection_decorator.py](test_connection_decorator.py) + Unit tests for the connection decorator. ## [test_conversation_compaction.py](test_conversation_compaction.py) + Unit tests for runtime conversation compaction (LCORE-1572). ## [test_conversations.py](test_conversations.py) + Unit tests for conversation utility functions. ## [test_endpoints.py](test_endpoints.py) + Unit tests for endpoints utility functions. ## [test_json_schema_updater.py](test_json_schema_updater.py) + Unit tests for utils/json_schema_updater module. ## [test_llama_stack_version.py](test_llama_stack_version.py) + Unit tests for utility function to check Llama Stack version. ## [test_markdown_repair.py](test_markdown_repair.py) + Unit tests for markdown repair utilities. ## [test_mcp_auth_headers.py](test_mcp_auth_headers.py) + Unit tests for MCP authorization headers utilities. ## [test_mcp_headers.py](test_mcp_headers.py) + Unit tests for MCP headers utility functions. ## [test_mcp_tools.py](test_mcp_tools.py) + Unit tests for MCP tool discovery utilities. ## [test_model_list.py](test_model_list.py) + Unit tests for utils/model_list.py helpers. ## [test_models_dumper.py](test_models_dumper.py) + Unit tests for utils/models_dumper module. ## [test_prompts.py](test_prompts.py) + Unit tests for prompts utility functions. ## [test_pydantic_ai.py](test_pydantic_ai.py) + Unit tests for utils/pydantic_ai module. ## [test_query.py](test_query.py) + Unit tests for utils/query.py functions. ## [test_responses.py](test_responses.py) + Unit tests for utils/responses.py functions. ## [test_rh_identity.py](test_rh_identity.py) + Unit tests for utils/rh_identity module. ## [test_saved_prompts.py](test_saved_prompts.py) + Unit tests for saved prompt validation helpers and data access. ## [test_shields.py](test_shields.py) + Unit tests for utils/shields.py functions. ## [test_stream_interrupts.py](test_stream_interrupts.py) + Unit tests for stream interrupt registry and persistence utilities. ## [test_streaming_sse.py](test_streaming_sse.py) + Unit tests for utils/streaming_sse.py. ## [test_suid.py](test_suid.py) + Unit tests for functions defined in utils.suid module. ## [test_token_estimator.py](test_token_estimator.py) + Unit tests for utils/token_estimator. ## [test_tool_formatter.py](test_tool_formatter.py) + Unit tests for tool_formatter utilities. ## [test_transcripts.py](test_transcripts.py) + Unit tests for functions defined in utils.transcripts module. ## [test_types.py](test_types.py) + Unit tests for functions and types defined in utils/types.py. ## [test_vector_search.py](test_vector_search.py) + Unit tests for vector search utilities. diff --git a/tests/unit/utils/agents/README.md b/tests/unit/utils/agents/README.md index cfcb0646f..bd0ce69d0 100644 --- a/tests/unit/utils/agents/README.md +++ b/tests/unit/utils/agents/README.md @@ -1,11 +1,14 @@ # List of source files stored in `tests/unit/utils/agents` directory ## [test_query.py](test_query.py) + Unit tests for utils.agents.query module. ## [test_streaming.py](test_streaming.py) + Unit tests for utils.agents.streaming module. ## [test_tool_processor.py](test_tool_processor.py) + Unit tests for utils.agents.tool_processor module.