mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
Use thread source metadata for Guardian classifiers (#40150)
## What changed - Mark Guardian classifier requests with `thread_source: guardian_classifier` in turn metadata. - Remove the classifier-specific `request_kind` and `is_guardian_mode` fields. - Update sampler and extension tests to expect the new metadata shape. GitOrigin-RevId: 1654389ea538b7bd879045634816cbace4bd8f5c
This commit is contained in:
@@ -1478,8 +1478,7 @@ async fn contributor_samples_tool_calls_with_the_existing_luna_pool() -> Result<
|
||||
"thread_id": classifier_thread_id,
|
||||
"guardian_classifier_source_thread_id": thread_id.to_string(),
|
||||
"turn_id": "turn-1",
|
||||
"request_kind": "guardian_classifier",
|
||||
"is_guardian_mode": true,
|
||||
"thread_source": "guardian_classifier",
|
||||
})
|
||||
);
|
||||
assert_eq!(request["client_metadata"]["x-openai-subagent"], "guardian");
|
||||
|
||||
@@ -549,8 +549,7 @@ impl LunaSampler {
|
||||
"thread_id": thread_id,
|
||||
"guardian_classifier_source_thread_id": self.config.thread_id,
|
||||
"turn_id": turn_id,
|
||||
"request_kind": "guardian_classifier",
|
||||
"is_guardian_mode": true,
|
||||
"thread_source": "guardian_classifier",
|
||||
})
|
||||
.to_string();
|
||||
request.client_metadata = Some(HashMap::from([
|
||||
|
||||
@@ -80,8 +80,7 @@ fn assert_connection_metadata(server: &responses::WebSocketTestServer) -> Result
|
||||
"thread_id": thread_id,
|
||||
"guardian_classifier_source_thread_id": "thread-1",
|
||||
"turn_id": turn_id,
|
||||
"request_kind": "guardian_classifier",
|
||||
"is_guardian_mode": true,
|
||||
"thread_source": "guardian_classifier",
|
||||
},
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user