mirror of
https://github.com/openai/codex.git
synced 2026-11-24 23:20:47 +00:00
Route Guardian requests through /responses with identifying headers (#45736)
## What changed - Replace dedicated Guardian endpoints with `/responses`, sending `x-codex-guardian: reviewer` or `x-codex-guardian: classifier` for eligible Codex backend requests over HTTP and WebSocket. - Add model-scoped thread headers, recheck backend authentication on each request attempt, and reconnect WebSockets when the applicable headers change. - Retain `features.guardianv2.free_guardian` for configuration compatibility while removing its routing gate; the backend now controls Guardian billing. ## Testing Update tests for reviewer and classifier headers, model and authentication scoping, HTTP fallback, WebSocket reuse, and parent-response metadata across retries. GitOrigin-RevId: 1c2b3c458ab77fb40aae4ee6784f6d827c60e76c
This commit is contained in:
@@ -127,7 +127,7 @@ pub struct GuardianV2ReviewScopeConfigToml {
|
||||
pub struct GuardianV2ConfigToml {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub enabled: Option<bool>,
|
||||
/// Route Guardian review and classification through the unmetered Codex endpoints.
|
||||
/// Legacy setting retained for config compatibility; the backend now controls Guardian billing.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub free_guardian: Option<bool>,
|
||||
/// Use thread-owned context for sync and async Guardian. Defaults to false.
|
||||
|
||||
Reference in New Issue
Block a user