a2ui-project / a2ui-project/a2ui
Versioning incompatibiltiy in agent SDK
- Vorherrschende Sprache
- TypeScript
- Sterne
- 16.4k
- Forks
- 1.3k
- Ø Merge
- 2 T. 13 Std.
- Gemergte PRs (30 T.)
- 134
Beschreibung
- `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).
Beitragsleitfaden
Rechercherichtung
Examine the A2uiSchemaManager constructor and the SPEC_VERSION in generate_schemas.py. Review the validator router in a2ui/schema/validator.py lines 210-228. Understand how pydantic and JSON schema validation interact. Determine the correct version alignment strategy between the manager and generated validators.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python, typescript
- Bereich
- backend-api-design, devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100