Skip to content

Commit 041738e

Browse files
committed
Ollama doesn't support MCP
Throws a NotSupportedException when BackendType.Ollama is used with MCP integration, clarifying that Ollama models are not supported. This improves error handling and provides clearer feedback to developers.
1 parent d3d45a3 commit 041738e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/MaIN.Services/Services/McpService.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ private PromptExecutionSettings InitializeChatCompletions(IKernelBuilder kernelB
117117
FunctionChoiceBehavior = FunctionChoiceBehavior.Auto(options: new() { RetainArgumentTypes = true })
118118
};
119119

120+
case BackendType.Ollama:
121+
throw new NotSupportedException("Ollama models does not support MCP integration.");
122+
120123
case BackendType.Self:
121124
throw new NotSupportedException("Self backend (local models) does not support MCP integration.");
122125

0 commit comments

Comments
 (0)