@a2ui/react 0.10.0 fails v0.8 payload validation for spec-compliant bindable fields (worked on 0.8.0)
We are rendering A2UI v0.8 payloads and hit a runtime validation failure after upgrading @a2ui/react.
-Current branch version: @a2ui/[email protected]
-main branch version: @a2ui/[email protected]
- On
0.8.0(main), this flow was working; on0.10.0, validation fails at runtime.
Observed failure is during validation with an error like:
Must define exactly one property
A concrete payload example is MultipleChoice.selections containing both:
pathliteralArray
This shape is currently accepted by the official A2UI v0.8 schema references (no explicit XOR/oneOf exclusivity for these bindable fields), including:
https://a2ui.org/specification/v0_8/standard_catalog_definition.json
So there appears to be a mismatch between:
- what the official v0.8 schema allows (not strict enough), and
- what newer
@a2ui/reactruntime validation enforces (exactly one bindable source).
Request: please align runtime validation behavior with official schema expectations for v0.8 payloads, or tighten the official v0.8 schema with explicit exclusivity so producers/consumers can validate consistently.
Thanks for raising this issue! I've created PR #1476 to fix it.
Thanks for reporting, let me bring this up to @gspencergoog's attention, since this seems to be arguing the semantics of the spec!
This shape is currently accepted by the official A2UI v0.8 schema references (no explicit XOR/oneOf exclusivity for these bindable fields)
In my personal opinion, I don't think the schema is ambiguous:
https://github.com/google/A2UI/blob/3daa545bfdaf79b4921837ccb54a6719809382fb/specification/v0_8/json/standard_catalog_definition.json#L565
Since it is expressed in natural language (and not as a stric logical proposition), I think the "or" in this case is exclusive by default.
- See: https://en.wikipedia.org/wiki/Logical_disjunction#Natural_language
TL;DR: If somebody offered you two choices: "A or B", would you argue that you can take both?
Anyway, we can land @selamw1's change if we want to restore the looser validation behavior; @nilkrdg can you verify that @selamw1's change fixes your rendering issue? It may be easy to patch into your testing app?
Yes, the spec was meant to be exclusive. The description isn't using logic operators, it's a plain English explanation, and in English "or" means exclusive or, and "and/or" would mean you can have one, the other, or both.
@nilkrdg how are you using this? How do you expect the multiple selection component to work when you specify both fields at the same time? Do you have your own basic catalog implementation?
Hi @ditman, we have several custom A2UI components. One is a chart component that, according to the schema, allows either one or both of the field values. We also have a high-code agent that uses our custom A2UI catalog schema to generate responses, sometimes sending both values as the schema permits.
Hey @nilkrdg, I brought this up during a team meeting and we decided not to relax the validation of the latest version of the v0.8 renderers (or change the spec).
This seems to be a non-issue on v0.9 payloads. In the v0.9 version of the protocol, you should be able to define your custom loose types, without the exactlyOneKey validation
https://github.com/google/A2UI/blob/0e0375749bf8a940d57969d612e74f7221ad246e/renderers/web_core/src/v0_8/schema/common-types.ts#L23-L31
If updating to v0.9 payloads is not an option, you probably should downgrade the version of the react renderer to the one that doesn't have the strict validation.
One is a chart component that, according to the schema, allows either one or both of the field values. We also have a high-code agent that uses our custom A2UI catalog schema to generate responses
Since you have your own schema, it's a little bit unclear to me what type is actually breaking you. I'm assuming MultipleChoice.selections is just an example of something that became stricter, but you're being affected by StringValue or something more core? (it's hard to help without more details on how this is breaking for you)
sometimes sending both values as the schema permits.
We discussed this above, we don't consider the specification ambiguous.
For now I'm going to close this as Unplanned, but feel free to reopen if I misunderstood something.
Thank you for the response and the suggestion @ditman. However, I would like to clarify the issue. This isn't a problem with our custom app configuration schema, the conflict is caused by a breaking structural change between your v0_8 and v0_9 core types when managed in a unified build environment.
v0_8 (StringValueSchema): Structurally accepts multiple properties at once (e.g., passing both path and literalString). v0_9 (DynamicString): Uses a strict z.ZodUnion, making those fields mutually exclusive.
The latest version of @a2ui/react enforces the strict v0_9 validation approach globally across the engine, which immediately causes objects relying on the v0_8 StringValueSchema definition to fail.
Downgrading @a2ui/react to an older version restores stability for v0_8, but it completely strips away our ability to parse and process incoming v0_9 agent messages. Our application must support both versions concurrently at runtime, depending on what the connected agent issues.
If we upgrade to the latest @a2ui/react, are we expected to completely drop support for v0_8 agents? If that is not the case, then the framework's runtime validation behavior needs to remain backward-compatible and consistent, rather than introducing breaking validation changes that block older schemas.
To fix this, could the v0_8 schema types inside common-types.d.ts be aligned or updated in the package so that older components don't immediately throw strict errors when processed by the newer library engine?
Thanks!
Hi [Recipient Name],
I’m following up on the issue reported by nilkrdg regarding @a2ui/react 0.10.0. It appears that the latest version fails to validate v0.8 payloads that were previously functional.
While the current recommendation is to adopt v0.9 or downgrade, nilkrdg clarified that neither option is ideal. Downgrading prevents the processing of v0.9 messages, and their application must support both v0.8 and v0.9 concurrently. The conflict seems to stem from a structural change where the strict validation from v0.9 is being applied globally, breaking v0.8 StringValueSchema definitions.
Could we consider updating the v0.8 schema types in common-types.d.ts to ensure backward compatibility and prevent strict errors when processed by the newer library engine?
Best regards,
Salem
Hi David,
Thank you for the detailed feedback regarding the v0.8 and v0.9 core types.
I understand that the strict validation in the latest @a2ui/react is creating a blocker for applications that need to support both v0.8 and v0.9 agents concurrently. The point regarding the structural change in common-types.d.ts and its impact on backward compatibility is well-taken.
I will bring this back to the team to discuss whether we can align the v0.8 schema types to prevent these strict validation errors in the newer library engine without compromising the integrity of the v0.9 implementation.
We will update the issue thread once we have a path forward.
Best regards,
Salem
On Wed, May 27, 2026 at 1:17 PM nilkrdg @.***> wrote:
nilkrdg left a comment (google/A2UI#1469) https://github.com/google/A2UI/issues/1469#issuecomment-4553175585
Thank you for the response and the suggestion @ditman https://github.com/ditman. However, I would like to clarify the issue. This isn't a problem with our custom app configuration schema, the conflict is caused by a breaking structural change between your v0_8 and v0_9 core types when managed in a unified build environment.
v0_8 (StringValueSchema): Structurally accepts multiple properties at once (e.g., passing both path and literalString). v0_9 (DynamicString): Uses a strict z.ZodUnion, making those fields mutually exclusive.
The latest version of @a2ui/react enforces the strict v0_9 validation approach globally across the engine, which immediately causes objects relying on the v0_8 StringValueSchema definition to fail.
Downgrading @a2ui/react to an older version restores stability for v0_8, but it completely strips away our ability to parse and process incoming v0_9 agent messages. Our application must support both versions concurrently at runtime, depending on what the connected agent issues.
If we upgrade to the latest @a2ui/react, are we expected to completely drop support for v0_8 agents? If that is not the case, then the framework's runtime validation behavior needs to remain backward-compatible and consistent, rather than introducing breaking validation changes that block older schemas.
To fix this, could the v0_8 schema types inside common-types.d.ts be aligned or updated in the package so that older components don't immediately throw strict errors when processed by the newer library engine?
Thanks!
— Reply to this email directly, view it on GitHub https://github.com/google/A2UI/issues/1469?email_source=notifications&email_token=BYWR3KPGWRF6GTC74ZWRPFL442XBNA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINJVGMYTONJVHA22M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSWGM33PORSXEX3DNRUWG2Y#issuecomment-4553175585, or unsubscribe https://github.com/notifications/unsubscribe-auth/BYWR3KPOLP43NLMIA6SWSG3442XBNAVCNFSM6AAAAACZGCXWOKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DKNJTGE3TKNJYGU . You are receiving this because you are subscribed to this thread.Message ID: @.***>
@sarashed731-prog your messages are not super helpful, please stop this automation.
are we expected to completely drop support for v0_8 agents?
@nilkrdg There's no expectation or promise of backwards compatibility from the renderer packages (yet, we'd like this to be the case starting in v1.0 though!), however I agree that this was added after v0.8 was released.
could the v0_8 schema types inside common-types.d.ts be aligned or updated in the package so that older components don't immediately throw strict errors when processed by the newer library engine?
This is fair; would @selamw1's PR address your needs? (Can you patch it on your end and verify?) I'll try to get this pushed through.
Our application must support both versions concurrently at runtime, depending on what the connected agent issues.
Can you share more about how your setup works? How are you adapting to different schemas? Do you have both message handlers running in parallel and switch over the "version 0.9" field of the new messages?
Thank you for your reply @ditman. We switch to a different MessageProcessor/runtime path depending on the A2UI version in the incoming operations. We maintain separate custom component catalogs/schemas per version. For v0.8, we also perform client-side payload/schema validation before rendering so schema-shape issues are caught earlier (before runtime rendering errors from the A2UI React layer). For v0.9, we have not yet implemented equivalent client-side schema validation; currently we rely on the official v0.9 processor/renderer path and catch runtime processing/render errors.
We support both A2UI versions with version-specific APIs: v0.8 uses ServerToClientMessage / ComponentInstance types from @a2ui/react/v0_8. v0.9 uses basicCatalog and rendering integration from @a2ui/react/v0_9, while message processing is handled by MessageProcessor from @a2ui/web_core/v0_9. We then route operations by version/surface: v0.8 goes through our pre-validation path (AJV + component checks), and v0.9 goes through the v0.9 processor/runtime path (currently without equivalent client-side pre-validation).
@nilkrdg do you have a way to verify that https://github.com/google/A2UI/pull/1476 helps?