mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-26 15:40:18 +00:00
Fix MCP test LLM dependency for unauthenticated servers
This commit is contained in:
+2
-4
@@ -559,14 +559,12 @@ async fn test_server(name: String, user_id: String) -> anyhow::Result<()> {
|
||||
} else {
|
||||
// Use the factory to dispatch on transport type (HTTP, stdio, unix)
|
||||
let process_manager = Arc::new(McpProcessManager::new());
|
||||
let llm = resolve_llm_from_env()?;
|
||||
let nearai_session = crate::llm::create_session_manager(llm.session.clone()).await;
|
||||
(
|
||||
create_client_from_config(
|
||||
server.clone(),
|
||||
&session_manager,
|
||||
Some(nearai_session),
|
||||
llm.nearai.api_key.clone(),
|
||||
None,
|
||||
None,
|
||||
&process_manager,
|
||||
None,
|
||||
"default",
|
||||
|
||||
@@ -674,6 +674,10 @@ fn normalize_mcp_tool_arguments(tool_name: &str, value: serde_json::Value) -> se
|
||||
return value;
|
||||
}
|
||||
|
||||
// This is intentionally a minimal last-mile cleanup for the current
|
||||
// provider-backed web_search MCP flow. It strips the most common obviously
|
||||
// bad values we observed from model output, but it is not a substitute for
|
||||
// stricter tool schema constraints or provider-specific validation.
|
||||
let serde_json::Value::Object(mut map) = value else {
|
||||
return value;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user