diff --git a/src/providers/compatible.rs b/src/providers/compatible.rs index 32c94be31..8dbc49924 100644 --- a/src/providers/compatible.rs +++ b/src/providers/compatible.rs @@ -186,6 +186,12 @@ impl OpenAiCompatibleProvider { } } + /// Disable native tool calling, forcing prompt-guided tool use instead. + pub fn without_native_tools(mut self) -> Self { + self.native_tool_calling = false; + self + } + /// Override the HTTP request timeout for LLM API calls. pub fn with_timeout_secs(mut self, timeout_secs: u64) -> Self { self.timeout_secs = timeout_secs; diff --git a/src/providers/mod.rs b/src/providers/mod.rs index bfc788cb8..0d808088e 100644 --- a/src/providers/mod.rs +++ b/src/providers/mod.rs @@ -1163,9 +1163,12 @@ fn create_provider_with_url_and_options( "telnyx" => Ok(Box::new(telnyx::TelnyxProvider::new(key))), // ── OpenAI-compatible providers ────────────────────── - "venice" => Ok(compat(OpenAiCompatibleProvider::new( - "Venice", "https://api.venice.ai", key, AuthStyle::Bearer, - ))), + "venice" => Ok(compat( + OpenAiCompatibleProvider::new( + "Venice", "https://api.venice.ai", key, AuthStyle::Bearer, + ) + .without_native_tools(), + )), "vercel" | "vercel-ai" => Ok(compat(OpenAiCompatibleProvider::new( "Vercel AI Gateway", VERCEL_AI_GATEWAY_BASE_URL, @@ -2460,7 +2463,11 @@ mod tests { #[test] fn factory_venice() { - assert!(create_provider("venice", Some("vn-key")).is_ok()); + let provider = create_provider("venice", Some("vn-key")).unwrap(); + assert!( + !provider.capabilities().native_tool_calling, + "Venice should use prompt-guided tools, not native tool calling" + ); } #[test]