Skip to content

Add Autofix helpers to @openuidev/server - #1194

Merged
AbhinRustagi merged 37 commits into
mainfrom
codex/autofix-pipeline
Sep 23, 2026
Merged

AbhinRustagi merged 37 commits into
mainfrom
codex/autofix-pipeline

Conversation

@AbhinRustagi

@AbhinRustagi AbhinRustagi commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add createAutofix on @openuidev/server/openai (completions.fix / stream) and @openuidev/server/vercel (ai.fix / stream)
  • Repair streamed OpenUI inside the same fence / Cloud wrapper, and expose result.content for persist
  • Export Chat Completions history helpers from /openai only, plus an API reference page
const autofix = createAutofix({ apiKey, library });

await autofix.completions.fix({ generation, messages, signal });
return autofix.completions.stream({ stream: source, messages, signal }).toResponse();

return autofix.ai
  .stream({ stream: toUIMessageStream({ stream: result.stream }), signal })
  .toResponse();

Pass toUIMessageStream({ stream: result.stream }) for Vercel. Persist result.content, not joined deltas. autofix.responses is not supported yet.

Test plan

  • Server build, typecheck, and package tests
  • Chat Completions and Vercel streams: valid UI, broken fenced UI, tools-then-UI
  • Persist uses result.content when Autofix ran

@AbhinRustagi
AbhinRustagi marked this pull request as draft September 17, 2026 01:12
@vercel

vercel Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openui-docs Ready Ready Preview Sep 23, 2026 6:00am UTC

Request Review

@AbhinRustagi
AbhinRustagi marked this pull request as ready for review September 21, 2026 09:55
@AbhinRustagi
AbhinRustagi added this pull request to stack #1214 September 21, 2026 09:55
@AbhinRustagi
AbhinRustagi removed this pull request from stack #1214 September 21, 2026 16:28
@AbhinRustagi
AbhinRustagi added this pull request to stack #1218 September 21, 2026 16:29
@AbhinRustagi
AbhinRustagi removed this pull request from stack #1218 September 22, 2026 07:00
Comment thread docs/content/docs/gateway/api/autofix.mdx Outdated
@AbhinRustagi
AbhinRustagi enabled auto-merge (squash) September 23, 2026 05:59
@AbhinRustagi
AbhinRustagi merged commit 68c9280 into main Sep 23, 2026
4 checks passed
@AbhinRustagi
AbhinRustagi deleted the codex/autofix-pipeline branch September 23, 2026 06:02

This branch was successfully deployed

1 active deployment
Preview — d02df9cd Deployed Sep 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants