mirror of
https://github.com/openai/codex.git
synced 2026-11-21 22:50:37 +00:00
Ask the Responses API to omit the echoed tool catalog (#62863)
Set `x-codex-exclude: tools` in the shared Responses API request headers. GitOrigin-RevId: 6d46bf95fd1b88a4e01e7d0d3b3d995b4a3f6545
This commit is contained in:
@@ -2949,11 +2949,13 @@ fn is_guardian_reviewer(responses_headers: &ApiHeaderMap) -> bool {
|
||||
///
|
||||
/// - `x-codex-beta-features`: comma-separated beta feature keys enabled for the session.
|
||||
/// - `x-codex-turn-state`: sticky routing token captured earlier in the turn.
|
||||
/// - `x-codex-exclude` asks the server to omit the echoed tool catalog.
|
||||
fn build_responses_headers(
|
||||
beta_features_header: Option<&str>,
|
||||
turn_state: Option<&Arc<OnceLock<String>>>,
|
||||
) -> ApiHeaderMap {
|
||||
let mut headers = ApiHeaderMap::new();
|
||||
headers.insert("x-codex-exclude", HeaderValue::from_static("tools"));
|
||||
if let Some(value) = beta_features_header
|
||||
&& !value.is_empty()
|
||||
&& let Ok(header_value) = HeaderValue::from_str(value)
|
||||
|
||||
Reference in New Issue
Block a user