mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-31 16:49:34 +00:00
Merge branch 'main' into feat/lancedb-backend
This commit is contained in:
+9
-8
@@ -330,14 +330,6 @@ async fn main() -> anyhow::Result<()> {
|
||||
};
|
||||
let session = create_session_manager(session_config).await;
|
||||
|
||||
// Session-based auth is only needed for NEAR AI backend without an API key.
|
||||
// ChatCompletions mode with an API key skips session auth entirely.
|
||||
if config.llm.backend == ironclaw::config::LlmBackend::NearAi
|
||||
&& config.llm.nearai.api_key.is_none()
|
||||
{
|
||||
session.ensure_authenticated().await?;
|
||||
}
|
||||
|
||||
// Initialize tracing
|
||||
let env_filter = EnvFilter::try_from_default_env()
|
||||
.unwrap_or_else(|_| EnvFilter::new("ironclaw=info,tower_http=warn"));
|
||||
@@ -574,6 +566,15 @@ async fn main() -> anyhow::Result<()> {
|
||||
}
|
||||
}
|
||||
|
||||
// Session-based auth is only needed for NEAR AI backend without an API key.
|
||||
// Do this after DB-backed config reload so provider selection from onboarding
|
||||
// is respected (e.g. OpenAI/OpenAI-compatible should not trigger NEAR auth).
|
||||
if config.llm.backend == ironclaw::config::LlmBackend::NearAi
|
||||
&& config.llm.nearai.api_key.is_none()
|
||||
{
|
||||
session.ensure_authenticated().await?;
|
||||
}
|
||||
|
||||
// Start managed tunnel if configured and no static URL is already set.
|
||||
//
|
||||
// The tunnel process runs in the background, exposing the local gateway
|
||||
|
||||
Reference in New Issue
Block a user