Skip to content

Proxy health check fails with Ollama 0.1.44 - "unknown flag: --format" error #6

Description

@misterjice

Bug Report

Environment

  • olol version: [run pip show olol to get exact version]
  • Ollama version: 0.11.4 (latest stable release)
  • OS: WSL2 Ubuntu
  • Python version: 3.12

Problem

olol proxy fails health checks and cannot list models when connecting to olol server due to using the --format flag which doesn't exist in current stable Ollama release.

Error Message

2025-08-15 00:52:43,783 - ERROR - gRPC error: StatusCode.INTERNAL: Failed to list models: Error: unknown flag: --format
2025-08-15 00:52:43,784 - ERROR - Fallback health check failed: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.INTERNAL
details = "Failed to list models: Error: unknown flag: --format"
2025-08-15 00:52:43,784 - ERROR - Server localhost:50051 health check failed

Steps to Reproduce

  1. Install Ollama 0.11.4 (current latest from https://github.com/ollama/ollama/releases)
  2. Verify ollama list --help shows no --format flag available
  3. Start olol server: olol server --host localhost --port 50051 --ollama-host http://localhost:11434
    • Server starts successfully with: "Ollama gRPC server started on port 50051"
  4. Start olol proxy: olol proxy --host localhost --port 8000 --servers "localhost:50051"
  5. Observe the error when proxy attempts health checks

Expected Behavior

Proxy should successfully connect to server and list available models from Ollama, even with Ollama versions that don't support the --format flag.

Current Result

  • Proxy shows "0 models" instead of actual available models
  • Health checks fail
  • Client requests fail due to inability to discover models

Additional Context

  • ollama list works fine without the --format flag and shows models correctly
  • ollama list --format json returns "unknown flag: --format"
  • The olol server starts without issues - the problem is in the proxy health check logic

Suggested Fix

The proxy's health check/model discovery should:

  1. Try ollama list --format json first
  2. Fall back to parsing standard ollama list output when --format is unavailable
  3. Or detect Ollama version and use appropriate commands accordingly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions