Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)
Python
remove leftover openai test override logic
Abi Raja2809e845b0aa
diff --git a/backend/routes/generate_code.py b/backend/routes/generate_code.pyindex 60e00967..13cab885 100644--- a/backend/routes/generate_code.py+++ b/backend/routes/generate_code.py@@ -73,9 +73,6 @@ from ws.constants import APP_ERROR_WEB_SOCKET_CODE # type: ignorerouter = APIRouter()-# Temporary debug override to focus on OpenAI prompt caching behavior.-FORCE_OPENAI_SINGLE_VARIANT = True-@dataclassclass PipelineContext:@@ -367,14 +364,6 @@ class ModelSelectionStage:) -> List[Llm]:"""Select appropriate models based on available API keys"""try:- if FORCE_OPENAI_SINGLE_VARIANT and input_mode != "video":- if not openai_api_key:- raise Exception("OpenAI API key required for single-variant debug mode")- variant_models = [Llm.GPT_5_2_CODEX_HIGH]- print("Variant models:")- print(f"Variant 1: {variant_models[0].value}")- return variant_models-num_variants = 2 if generation_type == "update" else NUM_VARIANTSvariant_models = self._get_variant_models(generation_type,@@ -419,14 +408,6 @@ class ModelSelectionStage:)return list(VIDEO_VARIANT_MODELS)- # Edit/update mode prefers one Gemini + one OpenAI model for fast,- # complementary deltas.- if generation_type == "update" and gemini_api_key and openai_api_key:- return [- Llm.GEMINI_3_FLASH_PREVIEW_MINIMAL,- Llm.GPT_5_2_CODEX_LOW,- ]-# Define models based on available API keysif gemini_api_key and anthropic_api_key and openai_api_key:if input_mode == "text" and generation_type == "create":@@ -697,14 +678,9 @@ class StatusBroadcastMiddleware(Middleware):assert context.extracted_params is not Noneis_video_mode = context.extracted_params.input_mode == "video"is_update = context.extracted_params.generation_type == "update"- if FORCE_OPENAI_SINGLE_VARIANT and not is_video_mode:- num_variants = 1- else:- num_variants = (- NUM_VARIANTS_VIDEO- if is_video_mode- else 2 if is_update else NUM_VARIANTS- )+ num_variants = (+ NUM_VARIANTS_VIDEO if is_video_mode else 2 if is_update else NUM_VARIANTS+ )# Tell frontend how many variants we're usingawait context.send_message("variantCount", str(num_variants), 0)