Merge branch 'master' of http://192.168.0.200/knowledge-base-bj/deerflow-server into xhy
This commit is contained in:
commit
3e2182acc5
275 files changed
+29592
-11370
No files matched your search
@@ -142,11 +142,14 @@ def get_available_tools(
|
||||
if model_name is None and config.models:
|
||||
model_name = config.models[0].name
|
||||
|
||||
# Add view_image_tool only if the model supports vision
|
||||
model_config = config.get_model_config(model_name) if model_name else None
|
||||
if model_config is not None and model_config.supports_vision:
|
||||
# Add view_image_tool when vision is available — either the main model
|
||||
# supports vision natively, or a dedicated vision model is configured
|
||||
# (vision.model_name) so recognition can be delegated to it.
|
||||
from deerflow.models.vision import vision_enabled
|
||||
|
||||
if vision_enabled(model_name, app_config=config):
|
||||
builtin_tools.append(view_image_tool)
|
||||
logger.info(f"Including view_image_tool for model '{model_name}' (supports_vision=True)")
|
||||
logger.info(f"Including view_image_tool for model '{model_name}' (vision available)")
|
||||
|
||||
# Get cached MCP tools if enabled
|
||||
# NOTE: We use ExtensionsConfig.from_file() instead of config.extensions
|
||||
|
||||
Reference in new issue
Block a user