When using Microsoft.Extensions.AI's OllamaChatClient with Qwen3.5, requests hang indefinitely because the client routes to Ollama's OpenAI-compatible endpoint (/v1/completions), which silently ignores native Ollama parameters like 'think'. Qwen3.5's built-in thinking mode then runs without terminating. The fix is switching to OllamaSharp's OllamaApiClient, which routes to /api/chat (Ollama's native endpoint) where the 'think' parameter is respected. Setting Think=false disables thinking mode and restores normal responses. Additionally, on Apple Silicon, pulling the qwen3.5:4b-mlx variant via Ollama 0.24+ provides a 30–50% speed improvement for inference tasks.

5m read timeFrom blog.pieeatingninjas.be
Post cover image
Table of contents
My Use Case: Entity Disambiguation Against a Fixed VocabularyWhy Qwen3.5?The Problem: Your App Just HangsWhat’s Actually Happening: Thinking ModeThe Fix: Switch to OllamaSharpOn a MacBook? Pull the MLX VariantTL;DR
207 Impressions