You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Constrain Claude Code completions to the caller's JSON Schema once $.model.complete takes one #5955
Trigger: Claude Code's $.model.complete accepts a JSON Schema or output format for the reply. As of 2.1.322 its request takes only model, prompt, system, maxTokens, effort and timeoutMs.
Until then, Leaf asks for JSON in the system prompt and validates the answer in Python (inference.answering and inference.answered, used by inference.claude_code_generator since #5835). That held for every one of 452 title requests. The widget builder's Leaf-catalog request has a nested $defs schema, and 3 of 60 answers came back malformed: one dropped a key, one left a bracket unclosed, and one repeated the whole object. Each failure rejects generate rather than reaching the widget.
Once the field exists, pass the caller's schema in the request and drop answering from Claude Code's path. Keep answered only as long as the reply still arrives as text.
This was written by Claude Code on behalf of max-sixty
Activity
Ask a Claude Code session's own model through Leaf's module, not `cla…