refactor: improve code formatting and structure across multiple files

This commit is contained in:
mai1015 2026-02-16 03:35:03 -05:00 committed by Chummy
parent b341fdb368
commit dc5e14d7d2
6 changed files with 24 additions and 16 deletions

View file

@ -356,9 +356,11 @@ impl Provider for OpenRouterProvider {
model: &str,
temperature: f64,
) -> anyhow::Result<ProviderChatResponse> {
let api_key = self.api_key.as_ref().ok_or_else(|| anyhow::anyhow!(
let api_key = self.api_key.as_ref().ok_or_else(|| {
anyhow::anyhow!(
"OpenRouter API key not set. Run `zeroclaw onboard` or set OPENROUTER_API_KEY env var."
))?;
)
})?;
let tools = Self::convert_tools(request.tools);
let native_request = NativeChatRequest {