use std::sync::Arc;
use anyhow::{Context, Result, anyhow};
use crate::chatbot::anthropic::AnthropicClient;
use crate::llm::{LlmModelRecord, LlmProviderRecord};
use crate::llm::providers::{RemoteLlmModelInfo, extra_with_reasoning};
use crate::provider::{ApiProvider, BuiltLlmClient, ProviderField, ProviderUiMeta, ReasoningMode, ServiceType};
pub struct AnthropicProvider {
http: reqwest::Client,
}
impl AnthropicProvider {
pub fn new() -> Self {
Self { http: reqwest::Client::new() }
}
}
#[async_trait::async_trait]
impl ApiProvider for AnthropicProvider {
fn type_id(&self) -> &'static str { "anthropic" }
fn display_name(&self) -> &'static str { "Anthropic" }
fn supported_types(&self) -> &'static [ServiceType] {
&[ServiceType::Llm]
}
async fn list_llm_models(&self, _record: &LlmProviderRecord) -> Result