From e89b9072b7cce1ae324b9ee4e1cbae4c2c8ecce2 Mon Sep 17 00:00:00 2001 From: Andrej Simurka Date: Fri, 10 Apr 2026 15:04:20 +0200 Subject: [PATCH] Allowed reasoning and max_output_tokens attributes --- lightspeed-stack.yaml | 8 ++++---- run.yaml | 1 - src/app/endpoints/responses.py | 6 +----- src/utils/types.py | 4 ++++ tests/e2e/features/responses.feature | 6 ------ tests/e2e/test_list.txt | 22 ---------------------- 6 files changed, 9 insertions(+), 38 deletions(-) diff --git a/lightspeed-stack.yaml b/lightspeed-stack.yaml index fe655a810..eacaa19df 100644 --- a/lightspeed-stack.yaml +++ b/lightspeed-stack.yaml @@ -12,10 +12,10 @@ llama_stack: # The instance would have already been started with a llama-stack-run.yaml file use_as_library_client: false # Alternative for "as library use" - # use_as_library_client: true - # library_client_config_path: - url: http://llama-stack:8321 - api_key: xyzzy + use_as_library_client: true + library_client_config_path: run.yaml + # url: http://llama-stack:8321 + # api_key: xyzzy user_data_collection: feedback_enabled: true feedback_storage: "/tmp/data/feedback" diff --git a/run.yaml b/run.yaml index 7a4a78efa..67f953bd8 100644 --- a/run.yaml +++ b/run.yaml @@ -15,7 +15,6 @@ apis: benchmarks: [] datasets: [] image_name: starter -external_providers_dir: ${env.EXTERNAL_PROVIDERS_DIR} providers: inference: diff --git a/src/app/endpoints/responses.py b/src/app/endpoints/responses.py index ec1f51f64..c0ca9b347 100644 --- a/src/app/endpoints/responses.py +++ b/src/app/endpoints/responses.py @@ -165,13 +165,9 @@ async def responses_endpoint_handler( if responses_request.reasoning is not None: logger.warning("reasoning is not yet supported in LCORE and will be ignored") responses_request.reasoning = None - if responses_request.max_output_tokens is not None: - logger.warning( - "max_output_tokens is not yet supported in LCORE and will be ignored" - ) - responses_request.max_output_tokens = None responses_request = responses_request.model_copy(deep=True) + check_configuration_loaded(configuration) responses_request.instructions = get_system_prompt( responses_request.instructions, field_name="instructions" diff --git a/src/utils/types.py b/src/utils/types.py index 04842190d..4280b89a3 100644 --- a/src/utils/types.py +++ b/src/utils/types.py @@ -214,6 +214,10 @@ class ResponsesApiParams(BaseModel): default=None, description="Reasoning configuration for the response", ) + safety_identifier: Optional[str] = Field( + default=None, + description="Stable identifier for safety monitoring and abuse detection", + ) store: bool = Field(description="Whether to store the response") stream: bool = Field(description="Whether to stream the response") temperature: Optional[float] = Field( diff --git a/tests/e2e/features/responses.feature b/tests/e2e/features/responses.feature index 6246523c1..a61a6049d 100644 --- a/tests/e2e/features/responses.feature +++ b/tests/e2e/features/responses.feature @@ -16,8 +16,6 @@ Feature: Responses endpoint API tests Then The status code of the response is 200 And The body of the response contains hello - # https://redhat.atlassian.net/browse/LCORE-1583 - @skip Scenario: Responses accepts passthrough parameters with valid types Given The system is in default state And I set the Authorization header to Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikpva @@ -28,8 +26,6 @@ Feature: Responses endpoint API tests "model": "{PROVIDER}/{MODEL}", "stream": false, "instructions": "You are a helpful assistant.", - "prompt": {"id": "e2e_responses_passthrough_prompt"}, - "reasoning": {"effort": "low"}, "safety_identifier": "e2e-responses-passthrough", "text": {"format": {"type": "text"}}, "tool_choice": "auto", @@ -51,8 +47,6 @@ Feature: Responses endpoint API tests "status": "completed", "model": "{PROVIDER}/{MODEL}", "instructions": "You are a helpful assistant.", - "prompt": {"id": "e2e_responses_passthrough_prompt"}, - "reasoning": {"effort": "low"}, "safety_identifier": "e2e-responses-passthrough", "text": {"format": {"type": "text"}}, "tool_choice": "auto", diff --git a/tests/e2e/test_list.txt b/tests/e2e/test_list.txt index 5d11bb74e..3263263ea 100644 --- a/tests/e2e/test_list.txt +++ b/tests/e2e/test_list.txt @@ -1,23 +1 @@ -features/faiss.feature -features/inline_rag.feature -features/smoketests.feature -features/authorized_noop.feature -features/authorized_noop_token.feature -features/authorized_rh_identity.feature -features/rbac.feature -features/conversations.feature -features/conversation_cache_v2.feature -features/feedback.feature -features/health.feature -features/info.feature features/responses.feature -features/responses_streaming.feature -features/query.feature -features/rlsapi_v1.feature -features/rlsapi_v1_errors.feature -features/streaming_query.feature -features/rest_api.feature -features/models.feature -features/proxy.feature -features/tls.feature -features/mcp.feature \ No newline at end of file