embabel-agent
embabel-agent copied to clipboard
LlmOptions: Mark criteria as read-only for Java Jackson compatibility
The LlmOptions guide suggests that the class is JSON serializable for use in application.yml and application configuration files.
However, persisting LlmOptions to a database JSON column leads to a UnrecognizedPropertyException: Unrecognized field "criteria" during deserialization. Suggested Fix: Annotate criteria with @get:JsonIgnore or @get:JsonProperty(access = JsonProperty.Access.READ_ONLY) to ensure Jackson skips this field during the deserialization phase.
@JdbcTypeCode(SqlTypes.JSON)
@Column(name = "llm_options")
private LlmOptions llmOptions;