mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
app-server: add managed Bedrock login
This commit is contained in:
@@ -1334,6 +1334,20 @@ impl TestAppServer {
|
||||
self.send_login_account_request(params).await
|
||||
}
|
||||
|
||||
/// Send an `account/login/start` JSON-RPC request for managed Amazon Bedrock login.
|
||||
pub async fn send_login_account_amazon_bedrock_request(
|
||||
&mut self,
|
||||
api_key: &str,
|
||||
region: &str,
|
||||
) -> anyhow::Result<i64> {
|
||||
let params = serde_json::json!({
|
||||
"type": "amazonBedrock",
|
||||
"apiKey": api_key,
|
||||
"region": region,
|
||||
});
|
||||
self.send_request("account/login/start", Some(params)).await
|
||||
}
|
||||
|
||||
/// Send an `account/login/start` JSON-RPC request for ChatGPT login.
|
||||
pub async fn send_login_account_chatgpt_request(&mut self) -> anyhow::Result<i64> {
|
||||
let params = serde_json::json!({
|
||||
|
||||
Reference in New Issue
Block a user