diff --git a/agents-api/agents_api/autogen/openapi_model.py b/agents-api/agents_api/autogen/openapi_model.py index 1f3c246cb..b6e4b774f 100644 --- a/agents-api/agents_api/autogen/openapi_model.py +++ b/agents-api/agents_api/autogen/openapi_model.py @@ -225,13 +225,13 @@ def validate_prompt(cls, v): if isinstance(v, str): is_valid, error = validate_jinja_template(v) if not is_valid: - raise ValueError(f"Invalid Jinja template: {error}") + raise ValueError(f"Invalid Jinja template in prompt: {error}") elif isinstance(v, list): for item in v: if "content" in item: is_valid, error = validate_jinja_template(item["content"]) if not is_valid: - raise ValueError(f"Invalid Jinja template in prompt: {error}") + raise ValueError(f"Invalid Jinja template in prompt content: {error}") return v