Skip to content

feat: structured input types (dataclass, TypedDict, NamedTuple, Enum)#6

Merged
lavrut merged 1 commit into
mainfrom
feat/structured-inputs
Jul 1, 2026
Merged

feat: structured input types (dataclass, TypedDict, NamedTuple, Enum)#6
lavrut merged 1 commit into
mainfrom
feat/structured-inputs

Conversation

@lavrut

@lavrut lavrut commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Validation PR to exercise the full CI matrix before the 0.2.0 release.

What changed

  • Structured input types: dataclass, TypedDict, NamedTuple, Enum → nested JSON Schema objects / typed enums, across all 4 providers.
  • Recursive nesting with a self-reference recursion guard.
  • Fix: Gemini formatter now preserves required on nested objects.
  • Bump to 0.2.0 (also carries the author-email metadata removal).

Local verification

  • 106 tests pass (91 existing + 15 new), zero third-party imports, twine check PASSED.
  • Edge cases verified: 3.9 TypedDict fallback, plain-dict-subclass not misdetected, untyped namedtuple, empty/mixed enum, self-reference guard.

Parameters typed as a dataclass, TypedDict, NamedTuple, or Enum now generate
proper nested JSON Schema objects (or typed enums) across all four providers.
Nesting is recursive; self-referential types are guarded against infinite
recursion. Also fixes the Gemini formatter dropping 'required' on nested
objects. Bumps to 0.2.0 (also carries the author-email metadata removal).
@lavrut
lavrut marked this pull request as ready for review July 1, 2026 03:37
@lavrut
lavrut merged commit d11ba4b into main Jul 1, 2026
17 checks passed
@lavrut
lavrut deleted the feat/structured-inputs branch July 1, 2026 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant