From 32200177bec05252d03e21359f49181f851a7448 Mon Sep 17 00:00:00 2001 From: Zoltan Szabo Date: Mon, 1 Sep 2025 13:45:48 +0200 Subject: [PATCH] allow disabling query model and provider --- README.md | 4 ++++ template-params.dev.env | 1 + template.yaml | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/README.md b/README.md index b223d5d..e397e0e 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,10 @@ both schemas. If you're running `lightspeed-stack` without a database configuration you can use `make sqlite` to browse the contents of the temporary SQLite database. +## Configuration flags + +- `DISABLE_QUERY_SYSTEM_PROMPT` (default: `false`): maps to `customization.disable_query_system_prompt` in Lightspeed Stack. When `true`, requests including `system_prompt` are rejected with HTTP 422. +- `DISABLE_QUERY_MODEL_OVERRIDE` (default: `false`): maps to `customization.disable_query_model_override` in Lightspeed Stack. When `true`, requests including `model` or `provider` are rejected with HTTP 422. ## Override diff --git a/template-params.dev.env b/template-params.dev.env index 01b8771..23ee8bf 100644 --- a/template-params.dev.env +++ b/template-params.dev.env @@ -4,6 +4,7 @@ LLAMA_CLIENT_CONFIG_PATH=llama_stack_client_config.yaml LIGHTSPEED_TRANSCRIPTS_ENABLED=false LIGHTSPEED_FEEDBACK_ENABLED=false DISABLE_QUERY_SYSTEM_PROMPT=false +DISABLE_QUERY_MODEL_OVERRIDE=false ASSISTED_CHAT_DEFAULT_MODEL=gemini/gemini-2.0-flash LIGHTSSPEED_STACK_POSTGRES_SSL_MODE=disable AUTHN_ROLE_RULES='[{"jsonpath":"$.realm_access.roles[*]","operator":"contains","value":"redhat:employees","roles":["redhat_employee"]}]' diff --git a/template.yaml b/template.yaml index e5b6490..0754ea1 100644 --- a/template.yaml +++ b/template.yaml @@ -120,6 +120,9 @@ parameters: - name: DISABLE_QUERY_SYSTEM_PROMPT value: "true" description: "Corresponds to the lightspeed config customization.disable_query_system_prompt" +- name: DISABLE_QUERY_MODEL_OVERRIDE + value: "false" + description: "Corresponds to the lightspeed config customization.disable_query_model_override" - name: ASSISTED_CHAT_DEFAULT_MODEL value: gemini-2.0-flash - name: USER_ID_CLAIM @@ -188,6 +191,7 @@ objects: customization: system_prompt_path: "${SYSTEM_PROMPT_PATH}" disable_query_system_prompt: ${DISABLE_QUERY_SYSTEM_PROMPT} + disable_query_model_override: ${DISABLE_QUERY_MODEL_OVERRIDE} inference: default_model: ${ASSISTED_CHAT_DEFAULT_MODEL} default_provider: gemini