feat: add openai and claude structured output config#5763
Open
WashingtonKK wants to merge 4 commits into
Open
Conversation
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
|
👋 Commands for maintainers:
|
|
Risk: 32/100 (low) SummaryAdds a new shared Concerns
Recommended reviewers: forestileao, felixgateru |
…chema Addresses Cursor Bugbot review on PR superplanehq#5763: claude.textPrompt Setup only checked the schema root was an object, while the field description and docs require every object to set additionalProperties:false (an Anthropic requirement). Such schemas passed Setup and failed later at the Claude API, unlike openai.textPrompt which rejects them at Setup. Add validateClaudeOutputSchema: a recursive check that every object sets additionalProperties:false (walking properties, items, anyOf/allOf/oneOf, $defs). It intentionally does NOT require all properties in "required" — Anthropic permits optional fields, unlike OpenAI strict mode. Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Set node-level metadata in Setup for claude.textPrompt and openai.textPrompt so the configured model, max tokens (Claude), and whether structured output is enabled are visible on the node in the UI without opening its config. Mirrors the existing node-metadata pattern (e.g. digitalocean IndexKB). Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fbf60f8. Configure here.
Replace the raw JSON Schema input on claude.textPrompt and openai.textPrompt with a guided builder: users define output fields (name, type, description, required) including nested objects and lists, and the backend assembles the JSON Schema. Provider rules are handled automatically -- Anthropic omits optional fields from "required"; OpenAI strict mode lists every field and makes optional ones nullable. Shared logic lives in the new pkg/integrations/structuredoutput package. Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
This adds structured output as a configuration option for the following components:
claude.textPromptopenai.textPrompt