Skip to content

ollama-server: Gap analysis — missing endpoints & fields for drop-in compatibility #44

Description

@adiled

ollama-server: Gap Analysis — Missing Endpoints & Fields

Goal: ollama-server should be a drop-in replacement for Ollama's API surface so
humd can sit on port 11434 and any Ollama client (open-webui, cline, langchain, etc.)
works without changes.

Current endpoints

Endpoint Status
GET /
GET /api/tags ✅ (synthesized)
POST /api/chat
POST /api/generate

Missing core endpoints

# Endpoint Method Description Priority
1 /api/version GET Returns {"version": "0.5.1"} — some clients check this 🔴 High
2 /api/show POST Model info: modelfile, parameters, template, details, model_info, capabilities — critical for RAG/agents that inspect models 🔴 High
3 /api/pull POST Pull/download a model from Ollama library — streaming progress, resumable 🟡 Medium
4 /api/push POST Push a model to a model library — streaming progress 🟡 Medium
5 /api/create POST Create a model from another model, safetensors dir, or GGUF file — streaming progress 🟡 Medium
6 HEAD /api/blobs/:digest HEAD Check if a blob exists on the server 🟡 Medium
7 POST /api/blobs/:digest POST Push a file blob to the server (used by /api/create) 🟡 Medium
8 /api/copy POST Copy/rename a model (sourcedestination) 🟢 Low
9 /api/delete DELETE Delete a model and its data 🟢 Low
10 /api/ps GET List currently loaded-in-memory models (with expires_at, size_vram) 🔴 High
11 /api/embed POST Generate embeddings from a model — the main RAG/embedding endpoint 🔴 High
12 /api/embeddings POST Deprecated endpoint but still used by older clients 🟢 Low

Missing request/response fields on existing endpoints

POST /api/chat — Missing request fields

Field Description Priority
think For thinking models: should the model think before responding? 🔴 High
format json or JSON schema for structured outputs 🔴 High
keep_alive Keeps model loaded (0 = unload, 5m = default, never = stay) 🔴 High
images Base64-encoded images in messages for multimodal 🟡 Medium
messages[].tool_name Tool call result with the tool name 🟡 Medium
messages[].tool_calls Client sends back tool call results in history 🟡 Medium
options (full schema) num_keep, seed, num_predict, top_k, top_p, temperature, stop, etc. 🟡 Medium

POST /api/chat — Missing response fields

Field Description Priority
message.thinking Model's thinking process for thinking models 🔴 High
message.tool_name Present when model returns a tool call 🟡 Medium
total_duration Nanoseconds generating response 🟡 Medium
load_duration Nanoseconds loading model 🟡 Medium
prompt_eval_count Token count in prompt 🟡 Medium
prompt_eval_duration Nanoseconds evaluating prompt 🟡 Medium
eval_count Token count in response 🟡 Medium
eval_duration Nanoseconds generating response 🟡 Medium

POST /api/generate — Additional missing fields

Field Description Priority
suffix Text after the model response 🟡 Medium
raw Bypass prompt templating 🟡 Medium

Missing: Model management concept

Current ollama-server only has a static list of models (OLLAMA_SERVER_MODELS). Needs:

  1. Dynamic model registry
  2. /api/show with real metadata per model
  3. Model lifecycle awareness via keep_alive

Priority summary

P0 (must-have for drop-in compatibility):

  • GET /api/version, POST /api/show, GET /api/ps
  • think / response.thinking
  • format (JSON/structured output)
  • keep_alive handling
  • Response time metrics

P1 (important for broader client support):

  • POST /api/embed for embeddings
  • suffix, raw, images, options.* on generate/chat

P2 (nice to have):

  • Model management: pull, push, create, blobs, copy, delete

Activity

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

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