Skip to content

docs: the Auto-fix API takes the conversation - #1162

Closed
ankur-mittal95 wants to merge 2 commits into
docs/gateway-sanitize-apifrom
docs/auto-fix-conversation-context
Closed

docs: the Auto-fix API takes the conversation#1162
ankur-mittal95 wants to merge 2 commits into
docs/gateway-sanitize-apifrom
docs/auto-fix-conversation-context

Conversation

@ankur-mittal95

Copy link
Copy Markdown
Contributor

Stacked on #1150. Review that one first.

The Auto-fix API can now take the conversation that produced the generation
(thesysdev/muse#601). The repair reads it to understand what the user asked
for, so a truncated list keeps the rows the user wanted and an unknown
component is replaced by one that still answers the question.

Changes on the Auto-fix page:

  • messages is in the Request table, optional, an array of { role, content }.
  • The lib/auto-fix.ts and server.ts examples pass the same messages the
    caller sent to their model.
  • Limits say 20 turns, 8,000 characters in total, and that older turns are
    dropped first.
  • A short "Data" note says the conversation goes to the model that fixes the
    generation and is not stored beyond the request logs.
  • The opening paragraph no longer says the request has no conversation, and the
    400 row names a conversation over a limit.

No other file is touched, and the prose style is unchanged.

@vercel

vercel Bot commented Sep 11, 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 11, 2026 7:54am UTC

Request Review

The Auto-fix API fixes OpenUI Lang after a model has generated it. Send the raw generation and your component library, and Gateway validates the generation, fixes the errors it can, and returns valid OpenUI Lang that the renderer can use.

Use it when your application calls a model directly and only needs the correction step. The request does not include a conversation or a model, and Gateway does not generate anything new. It applies the same correction that runs inside the [Chat Completions](/docs/gateway/api/chat-completions) and [Responses](/docs/gateway/api/responses) APIs, as a standalone call.
Use it when your application calls a model directly and only needs the correction step. The request does not name a model, and Gateway does not generate anything new. It applies the same correction that runs inside the [Chat Completions](/docs/gateway/api/chat-completions) and [Responses](/docs/gateway/api/responses) APIs, as a standalone call. You can also send the conversation that led to the generation, and Gateway reads it only to understand what the user asked for.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

let's not mention gateway

Ankur Mittal and others added 2 commits September 11, 2026 13:21
The repair reads the conversation to keep what the user asked for, so the
page has to say the field exists, what the limits are, and where the text
goes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Review feedback on the conversation-context lines.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ankur-mittal95

Copy link
Copy Markdown
Contributor Author

Folded into #1150 so the Auto-fix API ships as one docs PR.

@ankur-mittal95
ankur-mittal95 deleted the docs/auto-fix-conversation-context branch September 11, 2026 08:02
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.

1 participant