Skip to content

Commit 2afa155

Browse files
authored
fix(memory): pass through unknown config keys in _wrap_configuration (aws#322)
_wrap_configuration only copies extraction, consolidation, and reflection keys into the wrapped config dict. Any other top-level keys like selfManagedConfiguration are silently dropped, making it impossible to modify SELF_MANAGED strategies through modify_strategy or update_memory_strategies. Add a pass-through loop at the end of _wrap_configuration that copies any config keys not already handled by the wrapping logic. This allows selfManagedConfiguration (and any future unknown config keys) to reach the API intact. Relates to aws#212
1 parent 32aa019 commit 2afa155

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/bedrock_agentcore/memory/client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2012,4 +2012,9 @@ def _wrap_configuration(
20122012
else:
20132013
wrapped_config["reflection"] = reflection
20142014

2015+
# Pass through any keys the SDK doesn't know about (e.g., selfManagedConfiguration)
2016+
for key in config:
2017+
if key not in wrapped_config:
2018+
wrapped_config[key] = config[key]
2019+
20152020
return wrapped_config

0 commit comments

Comments
 (0)