Skip to content

processJsonConfig

processJsonConfig(llmConfig): Promise<BaseChatModel<BaseChatModelCallOptions, AIMessageChunk<MessageStructure<MessageToolSet>>>>

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/providers/ollama.ts:70

GS2-59 — build a native ChatOllama client (@langchain/ollama, talking to Ollama’s /api/chat). This replaces the previous ChatOpenAI/v1 client, which had two fatal properties for local thinking models: it DROPPED the model’s separate reasoning field (the completions converter discards it — __includeRawResponse is openrouter-only), and it IGNORED num_ctx so a large agentic prompt starved the answer to empty content. ChatOllama fixes both: it honors numCtx, and it surfaces the model’s thinking in additional_kwargs.reasoning_content — the exact field the reasoning pipeline (pickReasoningDelta) already reads — so the /reasoning panel populates with no downstream change.

Ollama is a local, unauthenticated daemon, so the old OpenAI-client knobs are gone (2.0 migration note): point elsewhere with OLLAMA_HOST; the previous configuration.baseURL / placeholder apiKey fields no longer apply. If a reverse proxy in front of Ollama needs auth, set headers in the config (passed straight through to ChatOllama).

ChatOllamaInput & BaseLanguageModelParams & object

Promise<BaseChatModel<BaseChatModelCallOptions, AIMessageChunk<MessageStructure<MessageToolSet>>>>