fix: updated the error for unauthenticated oauth to include the REPL .authenticated command

This commit is contained in:
2026-03-28 11:57:01 -06:00
parent 3873821a31
commit d822180205
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ async fn prepare_chat_completions(
let ready = oauth::prepare_oauth_access_token(client, &provider, self_.name()).await?; let ready = oauth::prepare_oauth_access_token(client, &provider, self_.name()).await?;
if !ready { if !ready {
bail!( bail!(
"OAuth configured but no tokens found for '{}'. Run: loki --authenticate {}", "OAuth configured but no tokens found for '{}'. Run: 'loki --authenticate {}' or '.authenticate' in the REPL",
self_.name(), self_.name(),
self_.name() self_.name()
); );
+2 -2
View File
@@ -111,7 +111,7 @@ async fn prepare_chat_completions(
let ready = oauth::prepare_oauth_access_token(client, &provider, self_.name()).await?; let ready = oauth::prepare_oauth_access_token(client, &provider, self_.name()).await?;
if !ready { if !ready {
bail!( bail!(
"OAuth configured but no tokens found for '{}'. Run: loki --authenticate {}", "OAuth configured but no tokens found for '{}'. Run: 'loki --authenticate {}' or '.authenticate' in the REPL",
self_.name(), self_.name(),
self_.name() self_.name()
); );
@@ -181,7 +181,7 @@ async fn prepare_embeddings(
let ready = oauth::prepare_oauth_access_token(client, &provider, self_.name()).await?; let ready = oauth::prepare_oauth_access_token(client, &provider, self_.name()).await?;
if !ready { if !ready {
bail!( bail!(
"OAuth configured but no tokens found for '{}'. Run: loki --authenticate {}", "OAuth configured but no tokens found for '{}'. Run: 'loki --authenticate {}' or '.authenticate' in the REPL",
self_.name(), self_.name(),
self_.name() self_.name()
); );