fix: The REPL .authenticate command works from within sessions, agents, and roles with pre-configured models
CI / All (macos-latest) (push) Has been cancelled
CI / All (ubuntu-latest) (push) Has been cancelled
CI / All (windows-latest) (push) Has been cancelled

This commit is contained in:
2026-03-12 09:08:17 -06:00
parent eb4d1c02f4
commit 9b4c800597
+2 -1
View File
@@ -428,7 +428,8 @@ pub async fn run_repl_command(
None => println!("Usage: .model <name>"), None => println!("Usage: .model <name>"),
}, },
".authenticate" => { ".authenticate" => {
let client = init_client(config, None)?; let current_model = config.read().current_model().clone();
let client = init_client(config, Some(current_model))?;
if !client.supports_oauth() { if !client.supports_oauth() {
bail!( bail!(
"Client '{}' doesn't either support OAuth or isn't configured to use it (i.e. uses an API key instead)", "Client '{}' doesn't either support OAuth or isn't configured to use it (i.e. uses an API key instead)",