From ac7aed14496c5668db624f7b13c3fde093cf4c3a Mon Sep 17 00:00:00 2001 From: adrian Date: Fri, 10 Apr 2026 17:01:37 -0700 Subject: [PATCH] Fix agent assertion bridge lint --- codex-rs/codex-api/src/api_bridge_tests.rs | 5 ++++- codex-rs/login/src/api_bridge.rs | 14 +++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/codex-rs/codex-api/src/api_bridge_tests.rs b/codex-rs/codex-api/src/api_bridge_tests.rs index c5274946a3..422cd134db 100644 --- a/codex-rs/codex-api/src/api_bridge_tests.rs +++ b/codex-rs/codex-api/src/api_bridge_tests.rs @@ -133,7 +133,10 @@ fn map_api_error_extracts_identity_auth_details_from_headers() { #[test] fn core_auth_provider_reports_when_auth_header_will_attach() { - let auth = CoreAuthProvider::from_bearer_token(Some("access-token".to_string()), None); + let auth = CoreAuthProvider::from_bearer_token( + Some("access-token".to_string()), + /*account_id*/ None, + ); assert!(auth.auth_header_attached()); assert_eq!(auth.auth_header_name(), Some("authorization")); diff --git a/codex-rs/login/src/api_bridge.rs b/codex-rs/login/src/api_bridge.rs index 49dd66eb05..85b02f6f16 100644 --- a/codex-rs/login/src/api_bridge.rs +++ b/codex-rs/login/src/api_bridge.rs @@ -8,11 +8,17 @@ pub fn auth_provider_from_auth( provider: &ModelProviderInfo, ) -> codex_protocol::error::Result { if let Some(api_key) = provider.api_key()? { - return Ok(CoreAuthProvider::from_bearer_token(Some(api_key), None)); + return Ok(CoreAuthProvider::from_bearer_token( + Some(api_key), + /*account_id*/ None, + )); } if let Some(token) = provider.experimental_bearer_token.clone() { - return Ok(CoreAuthProvider::from_bearer_token(Some(token), None)); + return Ok(CoreAuthProvider::from_bearer_token( + Some(token), + /*account_id*/ None, + )); } if let Some(auth) = auth { @@ -22,6 +28,8 @@ pub fn auth_provider_from_auth( auth.get_account_id(), )) } else { - Ok(CoreAuthProvider::from_bearer_token(None, None)) + Ok(CoreAuthProvider::from_bearer_token( + /*token*/ None, /*account_id*/ None, + )) } }