Support custom client info throughout client APIs (#474)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Jerome 2025-04-10 14:52:01 +01:00 • committed by GitHub
commit c4beb3e8ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -38,9 +38,13 @@ async def message_handler(
async def run_session(
read_stream: MemoryObjectReceiveStream[JSONRPCMessage | Exception],
write_stream: MemoryObjectSendStream[JSONRPCMessage],
client_info: types.Implementation | None = None,
):
async with ClientSession(
read_stream, write_stream, message_handler=message_handler
read_stream,
write_stream,
message_handler=message_handler,
client_info=client_info,
) as session:
logger.info("Initializing session")
await session.initialize()