Skip to content

[Bug]: Unable to use locally deployed Ollama models #375

Description

@FUA-Studio

Affected Component

External Integrations (LLM/Search APIs)

Describe the bug

PentAGI fails to start and cannot use locally deployed Ollama models, due to a hardcoded custom provider validation error requiring an OpenAI API key.(maybe)
I have modified the docker-compose configuration and the .env environment file.
Helpppppp!!!!!!!!

Steps to Reproduce

  1. Pull the official vxcontrol/pentagi docker image (version 2.0.0 / 2.1.0)
  2. Create docker-compose.yml and .env files, set environment variables including OPENAI_API_KEY with a dummy key and Ollama local server config
  3. Run docker compose up -d to start the PentAGI service
  4. Observe the container logs: the service crashes repeatedly with the error message: "LLM provider controller initialization failed: failed to create custom provider: missing the OpenAI API key, set it in the OPENAI_API_KEY environment variable"
  5. Even after correctly setting OPENAI_API_KEY environment variable and modifying all *.provider.yml config files, the error persists, preventing the service from starting normally and connecting to local Ollama models

System Configuration

PentAGI version: v2.1.0-879e87c (official vxcontrol/pentagi docker image), also verified on v2.0.0
Deployment type:

  • Docker Compose

Environment:

  • Docker version: 27.x.x
  • Docker Compose version: v2.x.x
  • Host OS: Windows 10 / Ubuntu 22.04
  • Available resources:
    • Memory: 16GB
    • CPU: 8 cores
  • Local Ollama service running on host port 11434 (OpenAI compatible API)

Enabled features:

  • Langfuse analytics: disabled
  • Grafana monitoring: disabled
  • Custom .env config: OPENAI_API_KEY set with dummy value, Ollama server URL configured

Logs and Artifacts

INFO[0000] Starting PentAGI 2.1.0-879e87c
DEBU[0000] Debug logging enabled
2026/07/17 06:02:09 goose: no migrations to run. current version: 2.1.0-879e87c
2026/07/17 06:02:09 Database schema updated successfully
INFO[0000] start profiling server on :7777 component=init
DEBU[0000] Docker client initialized client_version=... data_dir=/opt/pentagi/data docker_api_version=... docker_server_version=... host_dir=...
2026/07/17 06:02:09 LLM provider controller initialization failed: failed to create custom provider: missing the OpenAI API key, set it in the OPENAI_API_KEY environment variable

Screenshots or Recordings

none

Verification

  • I have checked that this issue hasn't been already reported
  • I have provided all relevant configuration files (with sensitive data removed)
  • I have included relevant logs and error messages
  • I am running the latest version of PentAGI

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions