Python: [Breaking] removed pydantic from types and workflows (#917)

* removed pydantic from types

* fix test

* fix test

* fix tests

* fix assistants client

* Remove Pydantic usage from workflow code.

* updated pydantic removal

* updated lock and test fixes

* fix mypy

* updated build system

* updated chat client parsing

* fix broken test

---------

Co-authored-by: Evan Mattson <evan.mattson@microsoft.com>
This commit is contained in:
Eduard van Valkenburg
2025-09-29 23:19:58 +02:00
committed by GitHub
Unverified
parent 647db9635a
commit b4ebafa9b1
56 changed files with 3881 additions and 1735 deletions
@@ -182,6 +182,14 @@ class OpenAIError(BaseModel):
error_data = {"message": message, "type": type, "code": code}
return cls(error=error_data)
def to_dict(self) -> dict[str, Any]:
"""Return the error payload as a plain mapping."""
return {"error": dict(self.error)}
def to_json(self) -> str:
"""Return the error payload serialized to JSON."""
return self.model_dump_json()
# Export all custom types
__all__ = [