spring-ai
spring-ai copied to clipboard
Inject jackson `ObjectMapper` configured via DI in `ToolCallResultConverter`
trafficstars
Expected Behavior
When a method tool (annotated via @Tool) returns an object it's serialized with DefaultToolCallResultConverter. This however uses JsonParser which has a hardcoded ObjectMapper in it.
Would have expected that it would use the ObjectMapper via Spring DI
Current Behavior
Like mentioned it uses a hardcoded ToolCallResultConverter which does not allow to override it's configuration
Context
This one is not configurable which we would like to (to drop fields which have null fields to save tokens towards the LLM)