feat: MCP support for agentic CLI providers (#6972)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
@@ -374,6 +374,7 @@ mod tests {
|
||||
|
||||
fn from_env(
|
||||
_model: ModelConfig,
|
||||
_extensions: Vec<goose::config::ExtensionConfig>,
|
||||
) -> futures::future::BoxFuture<'static, anyhow::Result<Self>> {
|
||||
Box::pin(async { Ok(Self::new()) })
|
||||
}
|
||||
|
||||
@@ -191,7 +191,10 @@ impl ProviderDef for MockCompactionProvider {
|
||||
}
|
||||
}
|
||||
|
||||
fn from_env(_model: ModelConfig) -> futures::future::BoxFuture<'static, anyhow::Result<Self>> {
|
||||
fn from_env(
|
||||
_model: ModelConfig,
|
||||
_extensions: Vec<goose::config::ExtensionConfig>,
|
||||
) -> futures::future::BoxFuture<'static, anyhow::Result<Self>> {
|
||||
Box::pin(async { Ok(Self::new()) })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,10 @@ impl ProviderDef for MockProvider {
|
||||
ProviderMetadata::empty()
|
||||
}
|
||||
|
||||
fn from_env(model: ModelConfig) -> futures::future::BoxFuture<'static, anyhow::Result<Self>> {
|
||||
fn from_env(
|
||||
model: ModelConfig,
|
||||
_extensions: Vec<goose::config::ExtensionConfig>,
|
||||
) -> futures::future::BoxFuture<'static, anyhow::Result<Self>> {
|
||||
Box::pin(async move { Ok(Self::new(model)) })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -351,13 +351,10 @@ impl ProviderTester {
|
||||
self.test_model_listing().await?;
|
||||
self.test_basic_response(&self.session_id_for_test("basic_response"))
|
||||
.await?;
|
||||
// TODO: remove skip in https://github.com/block/goose/pull/6972
|
||||
if !self.is_cli_provider {
|
||||
self.test_tool_usage(&self.session_id_for_test("tool_usage"))
|
||||
.await?;
|
||||
self.test_image_content_support(&self.session_id_for_test("image_content"))
|
||||
.await?;
|
||||
}
|
||||
self.test_tool_usage(&self.session_id_for_test("tool_usage"))
|
||||
.await?;
|
||||
self.test_image_content_support(&self.session_id_for_test("image_content"))
|
||||
.await?;
|
||||
if self.model_switch_name.is_some() {
|
||||
self.test_model_switch(&self.session_id_for_test("model_switch"))
|
||||
.await?;
|
||||
@@ -443,7 +440,13 @@ async fn test_provider(
|
||||
let mcp_extension =
|
||||
ExtensionConfig::streamable_http("mcp-fixture", &mcp.url, "MCP fixture", 30_u64);
|
||||
|
||||
let provider = match create_with_named_model(&provider_name, model_name).await {
|
||||
let provider = match create_with_named_model(
|
||||
&provider_name,
|
||||
model_name,
|
||||
vec![mcp_extension.clone()],
|
||||
)
|
||||
.await
|
||||
{
|
||||
Ok(p) => p,
|
||||
Err(e) => {
|
||||
println!("Skipping {} tests - failed to create provider: {}", name, e);
|
||||
|
||||
Reference in New Issue
Block a user