Allow direct AgentSession kwargs in AgentPool.add and merge with session_kwargs#7
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
AgentPool.add()API support the Milestone 3 contract where callers can passAgentSessionoptions directly as keyword arguments while preserving the existingsession_kwargsmapping.Description
**session_optionstoAgentPool.add()so callers may passAgentSessionoptions directly toadd()._copy_session_kwargshelper with_merge_session_kwargs(session_kwargs, direct_session_kwargs)which merges the mapping and direct kwargs with direct kwargs taking precedence.AgentConfig.session_kwargsis now stored as the merged dict so runtime session creation receives the combined, precedence-resolved options.README.mdto document the new calling style and precedence, and added a README example showing mixed usage.test_add_merges_direct_session_kwargs_with_mappingintests/test_pool.pyandtest_handle_session_supports_direct_session_kwargsintests/test_routing.pyto cover storage and runtime behavior for direct kwargs and precedence.Testing
pytest tests/test_pool.py tests/test_routing.pyand all tests passed (24 passed).python -m compileall src testsand compilation succeeded without errors.Codex Task