feat: add the experimental --with-ai options for generate-arazzo command - #3052
feat: add the experimental --with-ai options for generate-arazzo command#3052DmitryAnansky wants to merge 3 commits into
--with-ai options for generate-arazzo command#3052Conversation
🦋 Changeset detectedLatest commit: 454eee1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Performance Benchmark (Lower is Faster)
|
--with-ai and --ai-provider options for generate-arazzo command [POC]--with-ai options for generate-arazzo command [POC]
--with-ai options for generate-arazzo command [POC]--with-ai options for generate-arazzo command (POC)
--with-ai options for generate-arazzo command (POC)--with-ai options for generate-arazzo command
c13a4f8 to
c3b2dec
Compare
…r `generate-arazzo` command
c3b2dec to
37a0234
Compare
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.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 454eee1. Configure here.
|
|
||
| if (system.length + user.length > MAX_PROMPT_CHARS) { | ||
| throw new Error('the OpenAPI description is too large to send to the AI provider'); | ||
| } |
There was a problem hiding this comment.
Oversized-spec log claims a send
Low Severity
When the prompt still exceeds MAX_PROMPT_CHARS after stripProse, the command logs that it is sending the description without description and example fields, then throws and never calls the provider. Users with large specs see a “sending” message followed by a failure that the description was too large to send.
Reviewed by Cursor Bugbot for commit 454eee1. Configure here.


What/Why/How?
Added
--with-aiand--ai-provideroptions forgenerate-arazzocommand .Notes:
x-securitywhen possible.Reference
https://github.com/Redocly/redocly/issues/25890
Testing
Screenshots (optional)
Check yourself
Security
Note
Medium Risk
--with-aisends the resolved OpenAPI spec to external/local AI CLIs, and generator security/auth output changed in ways that affect generated Respect workflows.Overview
generate-arazzogains optional--with-ai(with--ai-providerand--max-workflows) to turn the one-workflow-per-operation skeleton into multi-step scenarios via a local AI CLI (claude,codex,cursor). Responses are validated (operation refs, workflow count, spec lint) and failures fall back to the mechanical baseline; successful AI output is prefixed with a verification comment.After generation, the command prints a ready-to-run
respectline with--inputplaceholders (including resolved component input refs).The handler moves under
commands/generate-arazzo/; AI helpers are shared withgenerate-specviautils/ai/(providers,stripCodeFences,lintDocumentSource).respect-corenow returns aTestDescriptionfromgenerate(), bumps generated Arazzo to 1.1.0, and wires auth through per-stepx-security(replacing workflowAuthorizationparameters), with expanded security input shapes (e.g. basic username/password, OAuth2).Reviewed by Cursor Bugbot for commit 454eee1. Bugbot is set up for automated code reviews on this repo. Configure here.