Description
The websearch tool schema declares type parameter with enum values ["auto", "fast", "deep"], but when attempting to use "deep", the backend returns a validation error stating only "auto" and "fast" are valid.
Tool Schema Declaration:
{
"type": "function",
"function": {
"name": "websearch",
"parameters": {
"type": "object",
"properties": {
"type": {
"enum": ["auto", "fast", "deep"],
"type": "string",
"description": "Search type - 'auto': balanced search (default), 'fast': quick results, 'deep': comprehensive search"
}
}
}
}
}
Tool Call:
{
"role": "assistant",
"tool_calls": [
{
"id": "functions.websearch:0",
"type": "function",
"function": {
"name": "websearch",
"arguments": "{\"query\":\"is ramen oily noodles broth nutrition\",\"type\":\"deep\",\"numResults\":10}"
}
}
]
}
Error Response:
{
role:"tool",
content:"MCP error -32602: Input validation error: Invalid arguments for tool web_search_exa: [
{
"received": "deep",
"code": "invalid_enum_value",
"options": [
"auto",
"fast"
],
"path": [
"type"
],
"message": "Invalid enum value. Expected 'auto' | 'fast', received 'deep'"
}
]",
tool_call_id:"functions.websearch:0"
}
Expected Behavior: Either the tool schema should be updated to remove "deep" from the enum, or the backend should accept "deep" as a valid value.
Plugins
No response
OpenCode version
1.3.14
Steps to reproduce
OPENCODE_ENABLE_EXA=1 opencode run "do a deep search on the web about and answer with yes or no: is ramen oily?"
Screenshot and/or share link
No response
Operating System
macOs 15.7.5
Terminal
Ghostty
Description
The websearch tool schema declares type parameter with enum values ["auto", "fast", "deep"], but when attempting to use "deep", the backend returns a validation error stating only "auto" and "fast" are valid.
Tool Schema Declaration:
{ "type": "function", "function": { "name": "websearch", "parameters": { "type": "object", "properties": { "type": { "enum": ["auto", "fast", "deep"], "type": "string", "description": "Search type - 'auto': balanced search (default), 'fast': quick results, 'deep': comprehensive search" } } } } }Tool Call:
{ "role": "assistant", "tool_calls": [ { "id": "functions.websearch:0", "type": "function", "function": { "name": "websearch", "arguments": "{\"query\":\"is ramen oily noodles broth nutrition\",\"type\":\"deep\",\"numResults\":10}" } } ] }Error Response:
Expected Behavior: Either the tool schema should be updated to remove "deep" from the enum, or the backend should accept "deep" as a valid value.
Plugins
No response
OpenCode version
1.3.14
Steps to reproduce
OPENCODE_ENABLE_EXA=1 opencode run "do a deep search on the web about and answer with yes or no: is ramen oily?"Screenshot and/or share link
No response
Operating System
macOs 15.7.5
Terminal
Ghostty