The following code
import pydantic
from effectful.handlers.llm.harness.serialization import _inline_refs
type A[T] = T | list[A[T]]
_inline_refs(pydantic.TypeAdapter(A).json_schema())
fails with a RecursionError:
...
File "/Users/eli/development/effectful/effectful/handlers/llm/harness/serialization.py", line 305, in _resolve
return [_resolve(item) for item in obj]
~~~~~~~~^^^^^^
RecursionError: maximum recursion depth exceeded
This is a bug in the _inline_refs helper.
The following code
fails with a
RecursionError:This is a bug in the
_inline_refshelper.