Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/kota_code/agent/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::Result;
use anyhow::{Ok, Result};
use rig::{
agent::Agent,
client::CompletionClient,
client::{CompletionClient, ProviderClient},
providers::{
anthropic, cohere,
deepseek::{self, DEEPSEEK_CHAT},
Expand Down Expand Up @@ -409,7 +409,7 @@ impl AgentBuilder {
Provider::Ollama => {
build_agent!(
ollama::Client::new(rig::client::Nothing),
&self.model_name,
self.model_name.strip_prefix("ollama-").unwrap(),
preamble,
self.tool_registry.take_all(),
Ollama
Expand Down Expand Up @@ -459,7 +459,9 @@ impl AgentBuilder {

// DeepSeek models
name if name.starts_with("deepseek-") => Ok(Provider::DeepSeek),
"ollama" | "local" => Ok(Provider::Ollama),

// Models by ollama
name if name.starts_with("ollama-") => Ok(Provider::Ollama),

_ => Err(anyhow::anyhow!(
"Unknown model: {}. Please specify a supported model.",
Expand Down