mirror of
https://github.com/0xMassi/webclaw.git
synced 2026-07-24 07:31:01 +02:00
chore(llm): make Atlas Cloud opt-in, not a default-chain member
Per maintainer decision: expose Atlas Cloud as an explicit provider (--llm-provider atlascloud / WEBCLAW_LLM_PROVIDER=atlascloud) but do NOT auto-add it to the default ProviderChain when ATLASCLOUD_API_KEY is set. Reverts the chain.rs integration and drops ATLASCLOUD_API_KEY from the 'no providers available' hint (it's not a default provider). The provider itself, its registration, and the explicit CLI branch are kept. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a76d931cd9
commit
bacc63b62a
2 changed files with 5 additions and 10 deletions
|
|
@ -2265,7 +2265,7 @@ async fn build_llm_provider(cli: &Cli) -> Result<Box<dyn LlmProvider>, String> {
|
|||
let chain = webclaw_llm::ProviderChain::default().await;
|
||||
if chain.is_empty() {
|
||||
return Err(
|
||||
"no LLM providers available -- start Ollama or set OPENAI_API_KEY / ATLASCLOUD_API_KEY / ANTHROPIC_API_KEY"
|
||||
"no LLM providers available -- start Ollama or set OPENAI_API_KEY / ANTHROPIC_API_KEY"
|
||||
.into(),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/// Provider chain — tries providers in order until one succeeds.
|
||||
/// Default order: Ollama (local, free) -> OpenAI -> Atlas Cloud -> Gemini -> Anthropic.
|
||||
/// Default order: Ollama (local, free) -> OpenAI -> Gemini -> Anthropic.
|
||||
/// Only includes providers that are actually configured/available.
|
||||
use async_trait::async_trait;
|
||||
use tracing::{debug, warn};
|
||||
|
|
@ -7,8 +7,8 @@ use tracing::{debug, warn};
|
|||
use crate::error::LlmError;
|
||||
use crate::provider::{CompletionRequest, LlmProvider};
|
||||
use crate::providers::{
|
||||
anthropic::AnthropicProvider, atlascloud::AtlasCloudProvider, gemini::GeminiProvider,
|
||||
ollama::OllamaProvider, openai::OpenAiProvider,
|
||||
anthropic::AnthropicProvider, gemini::GeminiProvider, ollama::OllamaProvider,
|
||||
openai::OpenAiProvider,
|
||||
};
|
||||
|
||||
pub struct ProviderChain {
|
||||
|
|
@ -16,7 +16,7 @@ pub struct ProviderChain {
|
|||
}
|
||||
|
||||
impl ProviderChain {
|
||||
/// Build the default chain: Ollama -> OpenAI -> Atlas Cloud -> Gemini -> Anthropic.
|
||||
/// Build the default chain: Ollama -> OpenAI -> Gemini -> Anthropic.
|
||||
/// Ollama is always added (availability checked at call time).
|
||||
/// Cloud providers are only added if their API keys are configured.
|
||||
/// Gemini sits ahead of Anthropic so Google Cloud credits are preferred,
|
||||
|
|
@ -37,11 +37,6 @@ impl ProviderChain {
|
|||
providers.push(Box::new(openai));
|
||||
}
|
||||
|
||||
if let Some(atlascloud) = AtlasCloudProvider::new(None, None, None) {
|
||||
debug!("atlascloud configured, adding to chain");
|
||||
providers.push(Box::new(atlascloud));
|
||||
}
|
||||
|
||||
if let Some(gemini) = GeminiProvider::new(None, None, None) {
|
||||
debug!("gemini configured, adding to chain");
|
||||
providers.push(Box::new(gemini));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue