Skip to content

fix(config): preserve custom ollama settings when OLLAMA_BASE_URL is set - #75

Open
yozlog wants to merge 1 commit into
coollabsio:mainfrom
yozlog:main
Open

fix(config): preserve custom ollama settings when OLLAMA_BASE_URL is set#75
yozlog wants to merge 1 commit into
coollabsio:mainfrom
yozlog:main

Conversation

@yozlog

@yozlog yozlog commented Jun 4, 2026

Copy link
Copy Markdown

Problem

Currently, when a custom JSON configuration file (e.g. /app/config/openclaw.json ) defines custom models for the Ollama provider, setting the OLLAMA_BASE_URL environment variable unconditionally overwrites the entire config.models.providers.ollama object.

This behavior clears out any user-defined models or advanced settings, forcing the configuration back to a hardcoded default containing only llama3.3.

Solution

Updated scripts/configure.js to perform a conditional merge for the Ollama provider.

  1. If a custom ollama configuration is already present in the JSON config, the script will now only update the baseUrl , preserving all existing models and settings.
  2. If no custom configuration exists, it continues to inject the default setup.

Impact

Users can now safely mount custom .json configurations to manage their Ollama model lists while still utilizing docker-compose.yml environment variables (OLLAMA_BASE_URL) to define the connection endpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant