AgentPool: session routing, per-agent session options, greetings, and admin APIs#5
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Motivation
AgentSessionoptions so callers can tune runtime behavior like preemptive generation and interruption handling.Description
session_kwargsonAgentConfigand acceptsession_kwargsinAgentPool.add, preserving a copy via_copy_session_kwargsand forwarding them intoAgentSessionconstruction with**config.session_kwargs._resolve_agentthat checks job metadata, room metadata, room name prefix matching (e.g.agentname-...), and falls back to the first registered agent, plus support for bothagentanddemometadata keys via_agent_name_from_mapping.ctx.connect()by callingawait session.generate_reply(instructions=config.greeting)whengreetingis set, and adjust related logging levels and messages.getandremoveconvenience methods for registered agents and update README with the new session routing and greeting behavior.get/removebehavior, routing precedence, room-name prefix routing, greeting generation timing, andAgentSessionargument propagation.Testing
tests/test_pool.pywhich includetest_add_stores_session_kwargs_copy,test_get_returns_registered_agent, andtest_remove_returns_removed_agent, and they passed.tests/test_routing.pywhich validate metadata precedence,demosupport, room prefix matching, default fallback behavior, session kwargs forwarding, and greeting generation timing, and they passed.pytestand observed all added and existing tests succeeding.Codex Task