Skip to content

Commit 38e8366

Browse files
committed
Fix agent assertion bridge lint
1 parent 5817bbc commit 38e8366

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

codex-rs/codex-api/src/api_bridge_tests.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ fn map_api_error_extracts_identity_auth_details_from_headers() {
133133

134134
#[test]
135135
fn core_auth_provider_reports_when_auth_header_will_attach() {
136-
let auth = CoreAuthProvider::from_bearer_token(Some("access-token".to_string()), None);
136+
let auth = CoreAuthProvider::from_bearer_token(
137+
Some("access-token".to_string()),
138+
/*account_id*/ None,
139+
);
137140

138141
assert!(auth.auth_header_attached());
139142
assert_eq!(auth.auth_header_name(), Some("authorization"));

codex-rs/login/src/api_bridge.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,17 @@ pub fn auth_provider_from_auth(
88
provider: &ModelProviderInfo,
99
) -> codex_protocol::error::Result<CoreAuthProvider> {
1010
if let Some(api_key) = provider.api_key()? {
11-
return Ok(CoreAuthProvider::from_bearer_token(Some(api_key), None));
11+
return Ok(CoreAuthProvider::from_bearer_token(
12+
Some(api_key),
13+
/*account_id*/ None,
14+
));
1215
}
1316

1417
if let Some(token) = provider.experimental_bearer_token.clone() {
15-
return Ok(CoreAuthProvider::from_bearer_token(Some(token), None));
18+
return Ok(CoreAuthProvider::from_bearer_token(
19+
Some(token),
20+
/*account_id*/ None,
21+
));
1622
}
1723

1824
if let Some(auth) = auth {
@@ -22,6 +28,8 @@ pub fn auth_provider_from_auth(
2228
auth.get_account_id(),
2329
))
2430
} else {
25-
Ok(CoreAuthProvider::from_bearer_token(None, None))
31+
Ok(CoreAuthProvider::from_bearer_token(
32+
/*token*/ None, /*account_id*/ None,
33+
))
2634
}
2735
}

0 commit comments

Comments
 (0)