fix: address CodeRabbit review comments

- Fix cache initialization inconsistency in BlockSchema.__pydantic_init_subclass__
  (use None instead of {} to match clear_schema_cache behavior)
- Change logger.error to logger.debug in stagehand blocks (not an error condition)
This commit is contained in:
Bentlybro
2026-02-13 16:37:54 +00:00
parent 29f95e5b61
commit 1704812f50
2 changed files with 3 additions and 2 deletions

View File

@@ -243,7 +243,8 @@ class BlockSchema(BaseModel):
super().__pydantic_init_subclass__(**kwargs)
# Reset cached JSON schema to prevent inheriting it from parent class
cls.cached_jsonschema = {}
# Use None instead of {} because {} is truthy and would prevent regeneration
cls.cached_jsonschema = None
credentials_fields = cls.get_credentials_fields()

View File

@@ -102,7 +102,7 @@ class StagehandRecommendedLlmModel(str, Enum):
), "Logic failed and open_router provider attempted to be prepended to model name! in stagehand/_config.py"
model_name = f"{model_metadata.provider}/{model_name}"
logger.error(f"Model name: {model_name}")
logger.debug(f"Model name: {model_name}")
return model_name
@property