Skip to content

Commit b23989d

Browse files
committed
Removed validations
1 parent 46074fd commit b23989d

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

modules/settings.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -368,28 +368,14 @@ def createSettings(self, **kwargs) -> tuple[Dict[str, Any]]:
368368
settings["thinking"] = bool(kwargs.get("thinking", False))
369369

370370
if useThinkingLevel:
371-
thinking_level = str(kwargs.get("thinkingLevel", "high"))
372-
if thinking_level not in ("low", "medium", "high", "xhigh"):
373-
raise ValueError(
374-
"thinkingLevel must be low, medium, high, or xhigh when useThinkingLevel is enabled."
375-
)
376-
settings["thinkingLevel"] = thinking_level
371+
settings["thinkingLevel"] = str(kwargs.get("thinkingLevel", "high"))
377372

378373
if useBackgroundMode:
379-
background_mode = str(kwargs.get("backgroundMode", "original"))
380-
if background_mode not in ("original", "transparent", "solid"):
381-
raise ValueError(
382-
"backgroundMode must be original, transparent, or solid when useBackgroundMode is enabled."
383-
)
384-
settings["backgroundMode"] = background_mode
374+
settings["backgroundMode"] = str(kwargs.get("backgroundMode", "original"))
385375

386376
if useBackgroundColor:
387377
background_color = (kwargs.get("backgroundColor") or "").strip()
388378
if background_color:
389-
if not background_color.startswith("#") or len(background_color) != 7:
390-
raise ValueError(
391-
"backgroundColor must be a hex color in #RRGGBB format when useBackgroundColor is enabled."
392-
)
393379
settings["backgroundColor"] = background_color
394380

395381
if useEnhancePrompt:

0 commit comments

Comments
 (0)