bug: Ollama and custom provider models always registered with reasoning: false, breaking thinking level support #208
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Both
registerOllamaProvider()andregisterCustomProvider()inProviderServicehard-codereasoning: falsefor every model. If a user has a thinking-capable custom endpoint (e.g. a self-hosted Claude-compatible API or Ollama with a reasoning model), thinking levels will never be available regardless of what the model actually supports.Root Cause
apps/gateway/src/agent/provider.service.ts:getAvailableThinkingLevels()in the Pi SDK checksmodel.reasoning:When
reasoningisfalse, available levels =["off"]. No amount ofset:thinkingrequests can escape this.Steps to Reproduce
MOSAIC_CUSTOM_PROVIDERSwith a model that supports thinking but without settingreasoning: truesession:inforeportsavailableThinkingLevels: ["off"]Expected Behaviour
OLLAMA_REASONING_MODELSenv var (comma-separated list of model IDs that support reasoning), defaulting tofalsereasoning: trueas required for thinking supportreasoning: falseAffected File
apps/gateway/src/agent/provider.service.ts—registerOllamaProvider()andregisterCustomProvider()