Skip to content

Versioning incompatibiltiy in agent SDK #1936

Description

@jiahaog
  • A2uiSchemaManager supports multiple versions via the constructor parameter. This is used to create the system instructions.
  • Validators like A2uiMessageListWrapper (and other files in src/a2ui/core/schema/*.py) are codegened from a specific version of a schema. This is defined in SPEC_VERSION

This is problematic because a client can call the former with a specific version of A2uiSchemaManager that is incompatible with the latter.

It's somewhat mitigated because the files in src/a2ui/core/schema/*.py are private(?). And there's a router in

v1_0_enabled = os.environ.get("A2UI_VERSION_1_0", "").lower() in (
"true",
"1",
"yes",
)
express_enabled = os.environ.get("A2UI_EXPRESS_ENABLED", "").lower() in (
"true",
"1",
"yes",
)
if v1_0_enabled or express_enabled:
self._delegator = A2uiValidatorWrapperV10(catalog)
else:
raise A2uiCatalogError(
"A2UI v1.0 validation is experimental and is disabled by default. "
"To enable it, set the environment variable A2UI_VERSION_1_0=true."
)
else:
self._delegator = A2uiValidatorWrapper(catalog)
.

But this points towards us having two kinds of validation (with pydantic and also json schema).

Metadata

Metadata

Assignees

Labels

P2The team intends to work on this in the near future, or at a lower priority.component: agent_sdkRelating to the agent inference libraries in any languagestatus: front-line-handledtype: bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions