Include sandbox mode in response metadata (#37507)

## What changed

- Add the effective permission profile as `sandbox_mode` in turn metadata for regular, prewarm, compaction, and detached memory requests.
- Reserve `sandbox_mode` so client-provided metadata cannot override the computed value.

## Testing

- Cover metadata headers and request bodies for read-only and danger-full-access modes.

GitOrigin-RevId: 13c690cc99bc2691023f281ca527af049bb1286f
This commit is contained in:
sayan-oai authored and copyberry committed 2026-08-07 22:41:20 +00:00
1 parent 45f8cafa4e
commit 4ca25a2c4e
10 files changed
+124 -15

No files matched your search

+2
View File
@@ -266,6 +266,7 @@ impl MemoryStartupContext {
let mut client_session = model_client.new_session();
let window_id = format!("{}:0", self.thread_id);
let permission_profile = config.permissions.effective_permission_profile();
let responses_metadata = detached_memory_responses_metadata(
installation_id,
session_id_string,
@@ -273,6 +274,7 @@ impl MemoryStartupContext {
window_id,
&session_source,
&config.cwd,
&permission_profile,
/*sandbox*/ None,
)
.await;