Latest Results
fix(core): dump `args_schema` as its own JSON schema
A Pydantic model class has no JSON form, so the field was stringified. Ask the
schema for its own JSON schema instead -- `model_json_schema()` for a v2 class,
`schema()` for a v1 one -- so every accepted `args_schema` form dumps to the
shape the dict form already has, and the dumped schema validates back into a
tool. A dict schema is still returned unchanged.
Cached per schema class, keyed on the class's validator: pydantic does not
memoize schema generation, and it dominates the dump, which tracing would pay on
every run. `model_rebuild()` replaces the validator, so a rebuilt schema -- or
one whose forward reference has since resolved -- retires its entry instead of
serving a stale one. A schema holding an arbitrary type has no JSON schema at
all, so those still fall back to the repr rather than raising.
Eight-tool payload: 0.119 ms on master, 0.025 ms here, 1.10 ms without the cache.emil/tool-json-serialization fix(core): dump `args_schema` as its own JSON schema
A Pydantic model class has no JSON form, so the field was stringified. Ask the
schema for its own JSON schema instead -- `model_json_schema()` for a v2 class,
`schema()` for a v1 one -- so every accepted `args_schema` form dumps to the
shape the dict form already has, and the dumped schema validates back into a
tool. A dict schema is still returned unchanged.
Cached per schema class, keyed on the class's validator: pydantic does not
memoize schema generation, and it dominates the dump, which tracing would pay on
every run. `model_rebuild()` replaces the validator, so a rebuilt schema -- or
one whose forward reference has since resolved -- retires its entry instead of
serving a stale one. A schema holding an arbitrary type has no JSON schema at
all, so those still fall back to the repr rather than raising.
Eight-tool payload: 0.119 ms on master, 0.025 ms here, 1.10 ms without the cache.emil/tool-json-serialization Latest Branches
0%
sydney-runkle/core/tool-args-missing-properties -1%
emil/tool-json-serialization -1%
saike148:fix/image-token-resolution © 2026 CodSpeed Technology