feat(llm): 切换至 ToolDef IR 并适配 OpenAI Provider
将 MessageRequest.tools 切换为 Provider 无关的 ToolDef IR; ToolDefinition 别名切换指向 ToolDef,registry/mcp 构造去掉 strict 字段;OpenAI 适配层通过 From 转换将 ToolDef 转为 OpenaiToolDefinition wire format。Anthropic 适配层字段名一致 无需改动,openai_compat/ollama 委托 GenericOpenaiProvider 无影响。
This commit is contained in:
@@ -276,7 +276,6 @@ impl McpClient {
|
||||
name,
|
||||
description,
|
||||
parameters: input_schema,
|
||||
strict: None,
|
||||
});
|
||||
}
|
||||
Ok(defs)
|
||||
|
||||
@@ -136,7 +136,6 @@ impl ToolRegistry {
|
||||
name: tool.name().to_string(),
|
||||
description: Some(tool.description().to_string()),
|
||||
parameters: tool.parameters(),
|
||||
strict: None,
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user