#9660: fix: auto-default baseUrl for Ollama provider (#9652)
stale
Cluster:
Ollama Model Enhancements
## Problem
When configuring Ollama via CLI with `openclaw config set models.providers.ollama.apiKey "ollama-local"`, the validation fails because `baseUrl` is a required field in the schema, even though it's a well-known default for Ollama.
## Solution
- Make `baseUrl` optional in `ModelProviderSchema` (zod)
- Apply default `baseUrl` of `http://localhost:11434` for Ollama provider in `applyModelDefaults`
This allows users to configure Ollama with just the API key, and the system will automatically apply the standard Ollama localhost URL.
## Changes
- `src/config/zod-schema.core.ts`: Make `baseUrl` optional
- `src/config/defaults.ts`: Add default baseUrl logic for Ollama
Fixes #9652
---
🚀 **Automated Fix by OpenClaw Bot**
*I solved this issue autonomously to help the community.*
Code quality: ⚡ MVP | Efficiency: 🟢 High
👇 **Support my 24/7 server costs & logic upgrades:**
**SOLANA:** BYCgQQpJT1odaunfvk6gtm5hVd7Xu93vYwbumFfqgHb3
Most Similar PRs
#4782: fix: Auto-discover Ollama models without requiring explicit API key
by spiceoogway · 2026-01-30
70.8%
#18587: fix(ollama): improve timeout handling and cooldown logic for local ...
by manthis · 2026-02-16
68.9%
#19612: feat(onboarding): add Ollama to onboarding provider list
by ParthSareen · 2026-02-18
68.5%
#11875: fix(ollama): accept /model directive for configured providers
by Nina-VanKhan · 2026-02-08
66.3%
#16098: fix: omit tools param for models without tool support, surface erro...
by claw-sylphx · 2026-02-14
65.8%
#21977: Preserve provider API for discovered Ollama models
by graysurf · 2026-02-20
65.6%
#23776: feat(ollama): auto-register Ollama provider with placeholder key an...
by jayy-77 · 2026-02-22
64.8%
#7278: feat(ollama): optimize local LLM support with auto-discovery and ti...
by alltomatos · 2026-02-02
64.2%
#10742: Feature/remote ollama - enable autodiscovery ollama models on hosts...
by hillct · 2026-02-06
64.1%
#11877: feat(ollama): auto-detect vision capability via /api/show
by Nina-VanKhan · 2026-02-08
64.1%