Categorize tools into 'model capabilities categories' to help determine which type of model to pick when in auto mode
Encourage Claude to pick the best model for the job automatically in auto mode Lots of new tests to ensure automatic model picking works reliably based on user preference or when a matching model is not found or ambiguous Improved error reporting when bogus model is requested and is not configured or available
This commit is contained in:
@@ -2,11 +2,14 @@
|
||||
ThinkDeep tool - Extended reasoning and problem-solving
|
||||
"""
|
||||
|
||||
from typing import Any, Optional
|
||||
from typing import TYPE_CHECKING, Any, Optional
|
||||
|
||||
from mcp.types import TextContent
|
||||
from pydantic import Field
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from tools.models import ToolModelCategory
|
||||
|
||||
from config import TEMPERATURE_CREATIVE
|
||||
from prompts import THINKDEEP_PROMPT
|
||||
|
||||
@@ -48,8 +51,6 @@ class ThinkDeepTool(BaseTool):
|
||||
)
|
||||
|
||||
def get_input_schema(self) -> dict[str, Any]:
|
||||
from config import IS_AUTO_MODE
|
||||
|
||||
schema = {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -93,7 +94,7 @@ class ThinkDeepTool(BaseTool):
|
||||
"description": "Thread continuation ID for multi-turn conversations. Can be used to continue conversations across different tools. Only provide this if continuing a previous conversation thread.",
|
||||
},
|
||||
},
|
||||
"required": ["prompt"] + (["model"] if IS_AUTO_MODE else []),
|
||||
"required": ["prompt"] + (["model"] if self.is_effective_auto_mode() else []),
|
||||
}
|
||||
|
||||
return schema
|
||||
@@ -110,6 +111,12 @@ class ThinkDeepTool(BaseTool):
|
||||
|
||||
return DEFAULT_THINKING_MODE_THINKDEEP
|
||||
|
||||
def get_model_category(self) -> "ToolModelCategory":
|
||||
"""ThinkDeep requires extended reasoning capabilities"""
|
||||
from tools.models import ToolModelCategory
|
||||
|
||||
return ToolModelCategory.EXTENDED_REASONING
|
||||
|
||||
def get_request_model(self):
|
||||
return ThinkDeepRequest
|
||||
|
||||
|
||||
Reference in New Issue
Block a user