Hi! Getting an aiohttp compatibility error when de...
# agents
g
Hi! Getting an aiohttp compatibility error when deploying LiveKit agents to Modal:
Copy code
TypeError: ClientSession.__init__() got an unexpected keyword argument
  'proxy'
The issue is in livekit/agents/worker.py line 422 where it calls:
aiohttp.ClientSession(proxy=self._opts.http_proxy or None)
But newer aiohttp versions deprecated the
proxy
parameter. Environment: - livekit-agents[openai,silero,groq,google]~=1.2 - Modal's default aiohttp version - Python 3.11 Is there a recommended aiohttp version to pin? Or plans to update agents for modern aiohttp API? Working locally but breaks in Modal containers.
r
Curious how you plan to support agent dispatch in Modal?
g
Currently we're using a single monolithic agent approach similar to the modal-livekit reference template: - One webhook handler that routes all rooms to the same agent type - Single agent class that self-configures based on room metadata after startup - No agent specialization or load balancing Our current flow: Room Created → Webhook → Always Same Agent → Agent Reads Metadata → Dynamic Configuration https://github.com/modal-projects/modal-livekit-agent
r
How do you keep new sessions from landing on the agent? Not sure that will work
k
@green-match-33925, can you try pinning the version of
aiohttp
to an older version in the Modal Image? Hi @refined-appointment-81829, I'm not sure I follow your question. Would you be able to help me understand the scenario that you think would break this deployment?
g
@kind-france-46521 "aiohttp>=3.11,<4" i did this and it is working
🙌 1