Repository navigation
fix(clients): expose WaitConfig and accept region_name aliases - #675
Conversation
|
|
Claude Security Review: no high-confidence findings. (run) |
|
Claude Security Review: no high-confidence findings. (run) |
|
CI note: the red The compat job installs pytest plugins only, so v1.23.1's Same follow-up will cover the intermittent |
…he evaluation sample (#1320) Updates the Deep Agents evaluation sample for `bedrock-agentcore` 1.24 and current deepagents. **SDK adoption** - `helpers/agentcore_evals.py` uses `bedrock_agentcore.evaluation.spans.is_tool_span` in place of its own copy of the same check, added in [aws/bedrock-agentcore-sdk-python#674](aws/bedrock-agentcore-sdk-python#674). - `helpers/agentcore_deploy.py` takes `wait_minutes` again through the now public `WaitConfig` ([#675](aws/bedrock-agentcore-sdk-python#675)), since a first create of a large package can exceed the 5 minute default. - `requirements.txt` pins `bedrock-agentcore>=1.24.0`, the first release with both. **Reliability on current deepagents** - Browser tools get a 60 s deadline and each research subagent 300 s, through a small `ToolGuardMiddleware`. Playwright's `page.content()` takes no timeout, so a stuck read could hold a whole run. A missed deadline resets that researcher's browser and returns an error `ToolMessage` (tool errors are returned the same way), following the [fault tolerance](https://docs.langchain.com/oss/python/deepagents/fault-tolerance) guidance that recoverable errors go back to the model. - `recursion_limit` raised from 60 to 150 as a guard. **Testing** - Fixture checks and a live deploy using only the released SDK from `requirements.txt` (1.24.1). - Fault injection with real AgentCore Browser and Bedrock: with the first `page.content()` forced to hang, the run recovered and completed with all 9 metrics correct; the same injection without the deadline was still hung at 180 s. - Three parallel invocations on AgentCore Runtime with deepagents 0.7.23: all completed in about 100 s. This was written with AI assistance. I reviewed the changes and ran the tests above. --------- Co-authored-by: Sundar Raghavan <sdraghav@amazon.com>
AgentCoreRuntimeClientacceptswait_configbut users cannot importWaitConfigfrom its public package, and passing theregion_namekeyword used by other SDK clients raisesTypeError.Export
WaitConfigfrom runtime, evaluation, gateway, knowledge_base, and policy, so callers can import it alongside the clients that accept it. Addregion_namealiases toAgentCoreRuntimeClientandBatchEvaluationRunner, preserving all existing positional arguments and region selection: explicitregion, thenregion_name, then the existing session/default fallback. Includes batch-runner precedence/compatibility tests and usage documentation.Related to #663 (WaitConfig imports and region naming). Batch insights remain a separate discussion.
Validation:
The initial full run hit an intermittent failure in the unchanged payment retry test's global
time.sleepmock. All seven payment retry tests passed in isolation, and the full rerun passed. An unchanged-main comparison separately hit a memory timeout test's globaltime.timemock exhaustion; these unrelated tests were not changed here.