Add self-referencing properties field to Tool.Property

Author: LinNan1Created Sep 4, 2026Updated Sep 4, 2026

The Property class currently lacks a properties field, so it cannot represent nested object schemas.

File: ollama/_types.py

Change: Add a properties field to the Property class to enable recursive nesting.

https://github.com/ollama/ollama-python/blob/fa8509936be08809bd15ca90a371165eb9abeb50/ollama/_types.py#L372-L384

diff
      class Property(SubscriptableBaseModel):
        model_config = ConfigDict(arbitrary_types_allowed=True)

        type: Optional[Union[str, Sequence[str]]] = None
        items: Optional[Any] = None
        description: Optional[str] = None
        enum: Optional[Sequence[Any]] = None
+       properties: Optional[Mapping[str, 'Property']] = None

      properties: Optional[Mapping[str, Property]] = None

This enables arbitrary-depth nesting using Pydantic's forward reference. No breaking changes.