3.3.2
BoxLang AI Module 3.3.2 — Fix for Claude structured output via a synthetic tool-forcing workaround.
Released: June 2026
BoxLang AI 3.3.2 is a targeted patch release fixing structured output support for Claude models.
🪲 Fixed
Claude structured output via synthetic tool: Claude models lack OpenAI-style
response_format, so structured output was silently unsupported — the schema was never sent andpopulateStructuredOutput()failed parsing the model's prose. Fixed by injecting a syntheticstructured_outputtool (requested schema asinput_schema), pinningtool_choiceto it, and routing the returnedtool_use.inputthroughpopulateStructuredOutput(). Now fails loud withStructuredOutputErrorand an ai-log entry when the forced tool block is absent (max_tokens truncation, refusal, ortool_choicenot honored) instead of feeding prose into the JSON populator. (#198)
This fix applies to both the direct Anthropic API and Claude models accessed through AWS Bedrock. No code changes are required — existing .structuredOutput() calls against Claude models now work correctly.
📖 Documentation
Structured Output —
.structuredOutput()and schema-driven extraction
Last updated