Skip to content

Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)

Python

Fix prompt plan update validation

Abi Raja1282eead76df
diff --git a/backend/agent/providers/gemini.py b/backend/agent/providers/gemini.py
index 02ac8c89..3d79ea16 100644
--- a/backend/agent/providers/gemini.py
+++ b/backend/agent/providers/gemini.py
@@ -38,7 +38,11 @@ def serialize_gemini_tools(tools: List[CanonicalToolDefinition]) -> List[types.T
def _get_gemini_api_model_name(model: Llm) -> str:
if model in [Llm.GEMINI_3_FLASH_PREVIEW_HIGH, Llm.GEMINI_3_FLASH_PREVIEW_MINIMAL]:
return "gemini-3-flash-preview"
- if model in [Llm.GEMINI_3_1_PRO_PREVIEW_HIGH, Llm.GEMINI_3_1_PRO_PREVIEW_LOW]:
+ if model in [
+ Llm.GEMINI_3_1_PRO_PREVIEW_HIGH,
+ Llm.GEMINI_3_1_PRO_PREVIEW_MEDIUM,
+ Llm.GEMINI_3_1_PRO_PREVIEW_LOW,
+ ]:
return "gemini-3.1-pro-preview"
if model in [Llm.GEMINI_3_PRO_PREVIEW_HIGH, Llm.GEMINI_3_PRO_PREVIEW_LOW]:
return "gemini-3-pro-preview"
@@ -54,6 +58,8 @@ def _get_thinking_level_for_model(model: Llm) -> str:
return "high"
if model in [Llm.GEMINI_3_PRO_PREVIEW_LOW, Llm.GEMINI_3_1_PRO_PREVIEW_LOW]:
return "low"
+ if model == Llm.GEMINI_3_1_PRO_PREVIEW_MEDIUM:
+ return "medium"
if model == Llm.GEMINI_3_FLASH_PREVIEW_MINIMAL:
return "minimal"
return "high"
diff --git a/backend/llm.py b/backend/llm.py
index 6a6eb82d..fcbb51c4 100644
--- a/backend/llm.py
+++ b/backend/llm.py
@@ -19,6 +19,7 @@ class Llm(Enum):
GEMINI_3_FLASH_PREVIEW_HIGH = "gemini-3-flash-preview (high thinking)"
GEMINI_3_FLASH_PREVIEW_MINIMAL = "gemini-3-flash-preview (minimal thinking)"
GEMINI_3_1_PRO_PREVIEW_HIGH = "gemini-3.1-pro-preview (high thinking)"
+ GEMINI_3_1_PRO_PREVIEW_MEDIUM = "gemini-3.1-pro-preview (medium thinking)"
GEMINI_3_1_PRO_PREVIEW_LOW = "gemini-3.1-pro-preview (low thinking)"
GEMINI_3_PRO_PREVIEW_HIGH = "gemini-3-pro-preview (high thinking)"
GEMINI_3_PRO_PREVIEW_LOW = "gemini-3-pro-preview (low thinking)"
@@ -48,6 +49,7 @@ MODEL_PROVIDER: dict[Llm, str] = {
Llm.GEMINI_3_FLASH_PREVIEW_HIGH: "gemini",
Llm.GEMINI_3_FLASH_PREVIEW_MINIMAL: "gemini",
Llm.GEMINI_3_1_PRO_PREVIEW_HIGH: "gemini",
+ Llm.GEMINI_3_1_PRO_PREVIEW_MEDIUM: "gemini",
Llm.GEMINI_3_1_PRO_PREVIEW_LOW: "gemini",
Llm.GEMINI_3_PRO_PREVIEW_HIGH: "gemini",
Llm.GEMINI_3_PRO_PREVIEW_LOW: "gemini",
diff --git a/backend/video/cost_estimation.py b/backend/video/cost_estimation.py
index 2bae7c37..6cf90460 100644
--- a/backend/video/cost_estimation.py
+++ b/backend/video/cost_estimation.py
@@ -60,7 +60,11 @@ GEMINI_PRICING = {
def get_model_api_name(model: Llm) -> str:
if model in [Llm.GEMINI_3_FLASH_PREVIEW_HIGH, Llm.GEMINI_3_FLASH_PREVIEW_MINIMAL]:
return "gemini-3-flash-preview"
- elif model in [Llm.GEMINI_3_1_PRO_PREVIEW_HIGH, Llm.GEMINI_3_1_PRO_PREVIEW_LOW]:
+ elif model in [
+ Llm.GEMINI_3_1_PRO_PREVIEW_HIGH,
+ Llm.GEMINI_3_1_PRO_PREVIEW_MEDIUM,
+ Llm.GEMINI_3_1_PRO_PREVIEW_LOW,
+ ]:
return "gemini-3.1-pro-preview"
elif model in [Llm.GEMINI_3_PRO_PREVIEW_HIGH, Llm.GEMINI_3_PRO_PREVIEW_LOW]:
return "gemini-3-pro-preview"
diff --git a/frontend/src/lib/models.ts b/frontend/src/lib/models.ts
index f0bb0d63..4d0df480 100644
--- a/frontend/src/lib/models.ts
+++ b/frontend/src/lib/models.ts
@@ -12,6 +12,7 @@ export enum CodeGenerationModel {
GEMINI_3_FLASH_PREVIEW_HIGH = "gemini-3-flash-preview (high thinking)",
GEMINI_3_FLASH_PREVIEW_MINIMAL = "gemini-3-flash-preview (minimal thinking)",
GEMINI_3_1_PRO_PREVIEW_HIGH = "gemini-3.1-pro-preview (high thinking)",
+ GEMINI_3_1_PRO_PREVIEW_MEDIUM = "gemini-3.1-pro-preview (medium thinking)",
GEMINI_3_1_PRO_PREVIEW_LOW = "gemini-3.1-pro-preview (low thinking)",
GEMINI_3_PRO_PREVIEW_HIGH = "gemini-3-pro-preview (high thinking)",
GEMINI_3_PRO_PREVIEW_LOW = "gemini-3-pro-preview (low thinking)",
@@ -53,6 +54,10 @@ export const CODE_GENERATION_MODEL_DESCRIPTIONS: {
name: "Gemini 3.1 Pro (high)",
inBeta: true,
},
+ "gemini-3.1-pro-preview (medium thinking)": {
+ name: "Gemini 3.1 Pro (medium)",
+ inBeta: true,
+ },
"gemini-3.1-pro-preview (low thinking)": {
name: "Gemini 3.1 Pro (low)",
inBeta: true,