Skip to content

Commit 76700ec

Browse files
committed
Changed precedence - now cipher takes priority just like static secret
1 parent 2ec8ebf commit 76700ec

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • openhands-sdk/openhands/sdk/agent

openhands-sdk/openhands/sdk/agent/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,6 @@ def _serialize_with_mcp_handling(self, handler, info: SerializationInfo):
291291
if not self.mcp_config: # Only process non-empty configs
292292
result.pop("mcp_config", None)
293293
return result
294-
elif info.context and info.context.get("expose_secrets"):
295-
# Keep mcp_config as-is (already in result from handler)
296-
return result
297294
elif info.context and info.context.get("cipher"):
298295
# Encrypt and add encrypted_mcp_config
299296
cipher: Cipher = info.context["cipher"]
@@ -304,6 +301,9 @@ def _serialize_with_mcp_handling(self, handler, info: SerializationInfo):
304301
# Remove plaintext mcp_config
305302
result.pop("mcp_config", None)
306303
return result
304+
elif info.context and info.context.get("expose_secrets"):
305+
# Keep mcp_config as-is (already in result from handler)
306+
return result
307307
else:
308308
# Default: redact by omitting
309309
result.pop("mcp_config", None)

0 commit comments

Comments
 (0)