fix(responses): serialize SDK models using API aliases
(cherry picked from commit 34fc0132d07b518f8f3abc7d2222196e75952f38)
This commit is contained in:
1 parent
077cc94a3d
commit
9e7bdf3651
1 file changed
+1
-1
@@ -71,7 +71,7 @@ def _response_object(value: object) -> dict[str, Any] | None:
|
||||
return object_value
|
||||
dump = getattr(value, "model_dump", None)
|
||||
if callable(dump):
|
||||
dumped = _as_json_object(dump())
|
||||
dumped = _as_json_object(dump(by_alias=True))
|
||||
if dumped is not None:
|
||||
return dumped
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user