Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

x: disable web search tool registration (#13656)

Parth Sareena23b559b4ce8
diff --git a/x/tools/registry.go b/x/tools/registry.go
index fba0898b7..caab9e50b 100644
--- a/x/tools/registry.go
+++ b/x/tools/registry.go
@@ -94,9 +94,10 @@ func (r *Registry) Count() int {
// - OLLAMA_AGENT_DISABLE_BASH=1 disables bash
func DefaultRegistry() *Registry {
r := NewRegistry()
- if os.Getenv("OLLAMA_AGENT_DISABLE_WEBSEARCH") == "" {
- r.Register(&WebSearchTool{})
- }
+ // TODO(parthsareen): re-enable web search once it's ready for release
+ // if os.Getenv("OLLAMA_AGENT_DISABLE_WEBSEARCH") == "" {
+ // r.Register(&WebSearchTool{})
+ // }
if os.Getenv("OLLAMA_AGENT_DISABLE_BASH") == "" {
r.Register(&BashTool{})
}
diff --git a/x/tools/registry_test.go b/x/tools/registry_test.go
index a37410936..b65ce0047 100644
--- a/x/tools/registry_test.go
+++ b/x/tools/registry_test.go
@@ -93,19 +93,14 @@ func TestRegistry_Execute(t *testing.T) {
func TestDefaultRegistry(t *testing.T) {
r := DefaultRegistry()
- if r.Count() != 2 {
- t.Errorf("expected 2 tools in default registry, got %d", r.Count())
+ if r.Count() != 1 {
+ t.Errorf("expected 1 tool in default registry, got %d", r.Count())
}
_, ok := r.Get("bash")
if !ok {
t.Error("expected bash tool in default registry")
}
-
- _, ok = r.Get("web_search")
- if !ok {
- t.Error("expected web_search tool in default registry")
- }
}
func TestDefaultRegistry_DisableWebsearch(t *testing.T) {
@@ -133,18 +128,8 @@ func TestDefaultRegistry_DisableBash(t *testing.T) {
r := DefaultRegistry()
- if r.Count() != 1 {
- t.Errorf("expected 1 tool with bash disabled, got %d", r.Count())
- }
-
- _, ok := r.Get("web_search")
- if !ok {
- t.Error("expected web_search tool in registry")
- }
-
- _, ok = r.Get("bash")
- if ok {
- t.Error("expected bash to be disabled")
+ if r.Count() != 0 {
+ t.Errorf("expected 0 tools with bash disabled, got %d", r.Count())
}
}