feat: add MCP tools registration to LLM service

- Add RegisterTools method to ILLMService interface
- Create shared MCP to eino tool converter
- Auto-register built-in uixt tools in XTDriver initialization
- Refactor MCPHost to use shared converter
- Add comprehensive test coverage for tool conversion

This enables doubao-1.5-thinking-vision-pro model to access
MCP tools through function calling mechanism.
This commit is contained in:
lilong.129
2025-06-09 22:19:43 +08:00
parent dd52faef57
commit 39acadb0a7
8 changed files with 221 additions and 24 deletions
+9
View File
@@ -77,6 +77,15 @@ func (p *Planner) RegisterTools(tools []*schema.ToolInfo) error {
if err != nil {
return errors.Wrap(err, "failed to register tools")
}
var toolNames []string
for _, tool := range tools {
toolNames = append(toolNames, tool.Name)
}
log.Debug().Strs("tools", toolNames).
Str("model", string(p.modelConfig.ModelType)).
Msg("registered tools to model")
p.model = toolCallingModel
return nil
}