Skip to content

fix(chat): replace LLM-based a2ui graph with hardcoded JSONL#120

Merged
blove merged 1 commit into
mainfrom
fix/a2ui-hardcoded-graph
Apr 12, 2026
Merged

fix(chat): replace LLM-based a2ui graph with hardcoded JSONL#120
blove merged 1 commit into
mainfrom
fix/a2ui-hardcoded-graph

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented Apr 12, 2026

Summary

The a2ui graph used an LLM + system prompt to generate A2UI JSONL, but LLMs prepend conversational text before the ---a2ui_JSON--- prefix, causing the content classifier to classify as markdown instead of a2ui. The contact form renders as raw JSON text instead of interactive UI components.

Fix: Replace LLM-based generation with hardcoded JSONL using v0.9 envelope format. The LLM is only used for conversational responses to form submission events.

Changes

  • createSurface, updateDataModel, updateComponents use v0.9 envelope: {"createSurface": {...}}
  • Removed _bindings from components (renderer auto-generates from path refs)
  • Added sendDataModel: true to createSurface for form submission support

Test plan

  • Python syntax valid
  • JSONL structure verified (3 envelope messages with correct keys)
  • nx test agent — passes
  • nx test chat — passes
  • After deploy: verify contact form renders at examples.cacheplane.ai/chat/a2ui

🤖 Generated with Claude Code

The a2ui graph used an LLM + system prompt to generate A2UI JSONL,
but LLMs cannot reliably produce exact protocol-level output — they
prepend conversational text before the ---a2ui_JSON--- prefix, causing
the content classifier to classify as markdown instead of a2ui.

Replace with hardcoded JSONL using the v0.9 envelope format
({"createSurface": {...}} instead of {"type": "createSurface", ...}).
The LLM is only used for conversational responses to form submissions,
where exact format is not required.

Removed _bindings from component definitions per v0.9 spec — the
renderer generates bindings automatically from path references.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 12, 2026

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

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment Apr 12, 2026 8:02pm

Request Review

@blove blove merged commit 2f36506 into main Apr 12, 2026
14 checks passed
blove added a commit that referenced this pull request Apr 12, 2026
All chat/* standalone LangGraph Cloud deployments are unreachable
(TCP timeout). The streaming deployment is healthy and already has
all 12 graphs consolidated (PR #113).

Changes:
- examples-middleware.ts: route all chat/* paths to 'streaming' key
- a2ui environment: use 'a2ui_form' (streaming deployment's name)
- a2ui_graph.py in streaming deployment: update to hardcoded v0.9
  JSONL matching PR #120's fix

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
blove added a commit that referenced this pull request Apr 12, 2026
All chat/* standalone LangGraph Cloud deployments are unreachable
(TCP timeout). The streaming deployment is healthy and already has
all 12 graphs consolidated (PR #113).

Changes:
- examples-middleware.ts: route all chat/* paths to 'streaming' key
- a2ui environment: use 'a2ui_form' (streaming deployment's name)
- a2ui_graph.py in streaming deployment: update to hardcoded v0.9
  JSONL matching PR #120's fix

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
blove added a commit that referenced this pull request Apr 12, 2026
All chat/* standalone LangGraph Cloud deployments are unreachable
(TCP timeout). The streaming deployment is healthy and already has
all 12 graphs consolidated (PR #113).

Changes:
- examples-middleware.ts: route all chat/* paths to 'streaming' key
- a2ui environment: use 'a2ui_form' (streaming deployment's name)
- a2ui_graph.py in streaming deployment: update to hardcoded v0.9
  JSONL matching PR #120's fix

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@blove blove deleted the fix/a2ui-hardcoded-graph branch May 7, 2026 16:30
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