a2ui-project / a2ui-project/a2ui

Versioning incompatibiltiy in agent SDK

Aperta
#1,936 2 commenti 0 reazioni 1 assegnatario Rivendicata da @nan-yu Vedi su GitHub
component: agent_sdk P2 status: first-line-handled type: bug
Lingua principale
TypeScript
Stelle
16.4k
Fork
1.3k
Merge medio
2g 13h
PR unite (30g)
134

Descrizione

- `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`](https://github.com/a2ui-project/a2ui/blob/a3f50cde04f2e9e26d6cd5246b1dbb0b81bb9577/agent_sdks/python/a2ui_core/scripts/generate_schemas.py#L22-L23)

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 https://github.com/a2ui-project/a2ui/blob/a3f50cde04f2e9e26d6cd5246b1dbb0b81bb9577/agent_sdks/python/a2ui_agent/src/a2ui/schema/validator.py#L210-L228.

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.