Skip to content

Add Autofix helpers to @openuidev/server - #1194

Open
AbhinRustagi wants to merge 36 commits into
mainfrom
codex/autofix-pipeline
Open

AbhinRustagi wants to merge 36 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 22, 2026 11:20am 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

Return SSE for the frontend `openAIAdapter()`. `autofix.responses` is not supported yet.

### Wrap a Vercel AI SDK stream

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this tabbed with non stereaming

This branch was successfully deployed

1 active deployment
Preview aea28630 Deployed Sep 22, 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