Skip to content

Commit 78b1f9d

Browse files
committed
send_request: pass by_name=False on the TypeAdapter branch
Aligns with the class branch and the existing validate_python(..., by_name=False) call sites in types/methods.py — wire data must use camelCase aliases only.
1 parent 18559fe commit 78b1f9d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/mcp/client/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ async def send_request(
313313
except KeyError:
314314
pass
315315
if isinstance(result_type, TypeAdapter):
316-
return result_type.validate_python(raw)
316+
return result_type.validate_python(raw, by_name=False)
317317
return result_type.model_validate(raw, by_name=False)
318318

319319
async def send_notification(self, notification: types.ClientNotification) -> None:

0 commit comments

Comments
 (0)