Skip to content

Upgrade to CopilotKit 1.83 and A2UI 1.0 - #874

Merged
guidovizoso merged 2 commits into
mainfrom
a2ui-1.0
Oct 28, 2026
Merged

guidovizoso merged 2 commits into
mainfrom
a2ui-1.0

Conversation

@guidovizoso

Copy link
Copy Markdown
Collaborator

What this changes

This upgrades CopilotKit to 1.83 and moves generated interfaces from A2UI 0.9 to A2UI 1.0. A Bot can draw the same components as before: the 18 basic ones (text, images, icons, video, audio, rows, columns, lists, cards, tabs, dividers, dialogs, buttons, checkboxes, text fields, date pickers, choice pickers and sliders).

Two commits:

  1. Upgrade CopilotKit to 1.83.0.
    • Updates @copilotkit/react-core, runtime and a2ui-renderer from 1.77.0, and @ag-ui/core and @ag-ui/client to the 1.0.2 they require.
    • Two kinds of test assumed 1.77's behaviour. The provider no longer re-renders its consumers after mount, so the tool-card tests read the SDK's tools lazily. With a non-OpenAI OPENAI_BASE_URL, openai/... models now use Chat Completions, so a gpt-5 model's instructions arrive as a developer message.
  2. Draw generated interfaces with A2UI 1.0.
    • Catalog: the browser passes the catalog through the provider's generativeUI prop, only when the deployment has generative UI on. It's CopilotKit's standard catalog cut down to the A2UI 1.0 basic components, which it carries under their A2UI names. A test checks the catalog contains exactly those 18.
    • Theme: the --a2ui-* theme variables point at OpenBot's own tokens, which switch under .dark themselves, so one theme covers light and dark. The CSS overrides for the old catalog go.
    • Server: the runtime sets generativeUI from OPENBOT_GENERATIVE_UI, so an opted-out deployment refuses render_ui even when a client sends a catalog. It also turns the A2UI 0.9 middleware off.

The rest of the standard catalog (tables, charts, composites, and so on) stays out until admins can see and govern it.

Old surfaces no longer draw. A2UI 0.9 surfaces from before the upgrade don't draw when a conversation is reopened; the messages around them stay. This is in the changelog's "Before upgrading" list.

The sandboxed HTML path (openGenerativeUI) is unchanged.

Where it runs

  • New state that outlives a request? None.
  • What happens on the second replica? Nothing different. The catalog is static code in the browser bundle, and the runtime option is per-process config from the environment.
  • Anything serialised? No.
  • Anything fanned out to a browser? No.
  • New listener, port, or schedule? None.

Boundary and audit

  • Every acting call still goes through the gateway. Drawing a surface isn't an acting call.
  • No new refusals or failures. The runtime refuses a component outside the catalog and returns that to the model in the tool result, as before.
  • Nothing new is trusted from the client. The server decides from its own config whether generative UI runs.

Changelog

  • Under Unreleased: "Generated interfaces use A2UI 1.0" and "CopilotKit 1.83". The "Before upgrading" list is updated.

Proof

  • Checks: format:check, lint and typecheck pass on all 6 packages.
  • App tests (bun test ./app from the root): 1687 pass, 10 fail.
    • All 10 failures are in new-bot-sheet.test.tsx. Unmodified main fails the same 10 when the whole suite runs.
    • The file passes when it runs alone.
  • Server and toolkit tests against a fresh pgvector container: 5933 pass, 19 skip, 3 fail.
    • The 3 failures are the Mastra bridge test and the langgraph and bot "real provider sees the learned catalog" tests.
    • They need per-package installs in the agent packages, which aren't workspaces. They're unrelated to this change.
  • Live, with General Assistant:
    • Asked for a form through render_ui, it drew an A2UI 1.0 surface with a name field, a date input and a "Submit trip" button.
    • Asked for a table in the same surface, it replied: "the A2UI catalog provided here has no Table component."

Bumps @copilotkit/react-core, @copilotkit/runtime and
@copilotkit/a2ui-renderer from 1.77.0 to 1.83.0 in app, server and
toolkit, and @ag-ui/core and @ag-ui/client to the 1.0.2 they require.

Two tests assumed 1.77 behavior:

- The provider no longer re-renders its consumers once after mount, so
  the tool-card tests now read the SDK's registry when they ask for a
  tool instead of when their capture component renders.
- "openai/..." models now use Chat Completions when OPENAI_BASE_URL is
  not an OpenAI or Azure host, as aimock is in tests, and a gpt-5
  model's instructions arrive as a developer message there.
A Bot with generative UI on now builds interfaces from the A2UI 1.0 basic
components instead of the A2UI 0.9 basic catalog. It's the same 18
components, taken from CopilotKit's standard catalog under their A2UI
names, and nothing else from it: the rest stays out until an admin can
see and govern it. The browser passes them as the provider's generativeUI
prop, still only when the deployment has the capability. The theme points
the --a2ui-* variables at OpenBot's own tokens, which switch under .dark
themselves. The CSS overrides on the old catalog's inline styles go.

The runtime sets generativeUI to the deployment's setting, so an
opted-out deployment refuses render_ui even from a client that sends a
catalog, and turns the A2UI 0.9 middleware off.

Surfaces drawn before this no longer render when a conversation is
reopened; the changelog says so.
@guidovizoso
guidovizoso merged commit b3dab0a into main Oct 28, 2026
19 checks passed
@guidovizoso
guidovizoso deleted the a2ui-1.0 branch October 28, 2026 20:24
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