[codex] Route Fed ChatGPT auth through Fed edge (#17151)

## Summary
- parse chatgpt_account_is_fedramp from signed ChatGPT auth metadata
- add _account_is_fedramp=true to ChatGPT backend-api requests only for
FedRAMP ChatGPT-auth accounts
This commit is contained in:
jackz-oai
2026-04-16 07:13:15 +00:00
committed by GitHub
parent 4cd85b28d2
commit f97be7dfff
11 changed files with 103 additions and 0 deletions
+5
View File
@@ -179,6 +179,7 @@ struct UsageErrorBody {
pub struct CoreAuthProvider {
pub token: Option<String>,
pub account_id: Option<String>,
pub is_fedramp_account: bool,
}
impl CoreAuthProvider {
@@ -196,6 +197,7 @@ impl CoreAuthProvider {
Self {
token: token.map(str::to_string),
account_id: account_id.map(str::to_string),
is_fedramp_account: false,
}
}
}
@@ -212,5 +214,8 @@ impl ApiAuthProvider for CoreAuthProvider {
{
let _ = headers.insert("ChatGPT-Account-ID", header);
}
if self.is_fedramp_account {
crate::auth::add_fedramp_routing_header(headers);
}
}
}