ToolChoiceDeserializer¶
This docs was updated at: 2026-03-21
com.paragon.responses.spec.ToolChoiceDeserializer ยท Class
Extends ValueDeserializer<ToolChoice>
Custom deserializer for ToolChoice to handle polymorphic deserialization.
The OpenAI API returns tool_choice as either:
- A string: "none", "auto", or "required" (mapped to
ToolChoiceMode) - An object with "mode" and "tools" fields (mapped to
AllowedTools)