From 0b9fc00663510d3c9a99023928770711be2ffa56 Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Tue, 12 May 2026 03:00:35 +0530 Subject: [PATCH] chore: update global LLM config fixture to include both premium and free models for comprehensive E2E testing --- .../tests/e2e/fixtures/global_llm_config.yaml | 34 ++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/surfsense_backend/tests/e2e/fixtures/global_llm_config.yaml b/surfsense_backend/tests/e2e/fixtures/global_llm_config.yaml index ef00ac0c4..f35974957 100644 --- a/surfsense_backend/tests/e2e/fixtures/global_llm_config.yaml +++ b/surfsense_backend/tests/e2e/fixtures/global_llm_config.yaml @@ -20,6 +20,16 @@ # The values below only need to pass # auto_model_pin_service._is_usable_global_config() # which requires id / model_name / provider / api_key all truthy. +# +# Why TWO entries (premium + free): +# auto_model_pin_service.resolve_or_get_pinned_llm_config_id() splits +# candidates by billing_tier based on _is_premium_eligible(user): +# premium_eligible == True -> keeps only tier=="premium" configs +# premium_eligible == False -> keeps only tier!="premium" configs +# A single-tier fixture would fail one of the two branches with +# "Auto mode could not find an eligible LLM config for this user and +# quota state". Shipping one of each guarantees every quota state +# resolves to a viable pin in E2E. router_settings: routing_strategy: "simple-shuffle" @@ -29,17 +39,33 @@ router_settings: global_llm_configs: - id: 1001 - name: "E2E Fake Auto Model" - billing_tier: "free" + name: "E2E Fake Auto Model (premium)" + billing_tier: "premium" anonymous_enabled: false seo_enabled: false quality_score: 1.0 provider: "OPENAI" - model_name: "fake-e2e-model" + model_name: "fake-e2e-model-premium" api_key: "fake-e2e-api-key-not-for-production" supports_image_input: false quota_reserve_tokens: 1024 rpm: 1000 tpm: 100000 litellm_params: - model: "openai/fake-e2e-model" + model: "openai/fake-e2e-model-premium" + + - id: 1002 + name: "E2E Fake Auto Model (free)" + billing_tier: "free" + anonymous_enabled: false + seo_enabled: false + quality_score: 1.0 + provider: "OPENAI" + model_name: "fake-e2e-model-free" + api_key: "fake-e2e-api-key-not-for-production" + supports_image_input: false + quota_reserve_tokens: 1024 + rpm: 1000 + tpm: 100000 + litellm_params: + model: "openai/fake-e2e-model-free"