Skip to content

Allow the Ollama instance to be configured from properties and environment variables #9

Description

@jzonthemtn

Arbiter's LLM-as-a-Judge configuration is entirely runtime. An OllamaInstance is created through Admin → LLM-as-a-Judge and stored in MongoDB, so an operator deploying Arbiter from a container image cannot bring it up already configured. Every fresh deployment needs a human to click through the admin UI before Second Opinion works.

This blocks the Philterd Appliance, which runs Ollama alongside Arbiter on the same box. The appliance knows the endpoint is http://ollama:11434, but has no way to tell Arbiter.

The related arbiter.data-sources.allowed-hosts half is already solvable, since it is a Spring @Value property and binds from the environment. Only the instance registration is stuck in the database.

Proposal

Seed a default Ollama instance from configuration when none exists, in the same spirit as ARBITER_ADMIN_INITIAL_PASSWORD: applied on first start, ignored once an instance is present, so it never fights an operator's UI changes.

arbiter.llm.ollama.url=http://ollama:11434
arbiter.llm.ollama.model=gemma3:4b
arbiter.llm.ollama.name=Local
arbiter.llm.ollama.default=true

Seeding must still respect the data-source host allow-list. A seeded instance pointing at a private-range host should be created but rejected at call time unless the host is allow-listed, rather than the seed quietly bypassing the SSRF guard.

Acceptance Criteria

  • An Ollama instance can be configured through properties, and therefore through environment variables
  • The instance is seeded on first start only when no instance exists
  • An existing instance is never overwritten or duplicated on restart
  • The seeded instance can be marked as the Second Opinion default
  • A seeded instance is still subject to arbiter.data-sources.allowed-hosts
  • Startup fails clearly, or logs a warning and skips, when the configured URL is malformed
  • Configuring an Ollama instance without the admin UI is documented
  • The environment-variable form of each property is documented, as ARBITER_ADMIN_INITIAL_PASSWORD already is

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions