Repository navigation
Description
Thank you for this great software. I tried to get it running with docker compose and its new model runner. With the following configuration I managed to see the (healthy) endpoint and the available models. But I cannot access the service endpoints from the other end (ollama, openai, ...).
I tried to setup the endpoint with openai-api since docker model runner supports a compatible api (see https://docs.docker.com/ai/model-runner/api-reference/#available-openai-endpoints )
- Endpoint is running and healthy
- Models with internal api route
/internal/status/modelsor/olla/modelsshow up - Models with external api routes return an empty list (i.e.
/olla/openai/v1/modelsor/olla/llamacpp/v1/models) - External api endpoints do not work (404 page not found)
It feels like I'm nearly there, but it seems like I missed something with my config.
## docker-compose.yml ##
services:
olla:
image: ghcr.io/thushan/olla:latest
container_name: olla
restart: unless-stopped
ports:
- "40114:40114"
volumes:
- ./olla.yaml:/app/config.yaml:ro
# - ./logs:/app/logs
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:40114/internal/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
environment:
- LOG_LEVEL=info
models:
gptoss:
endpoint_var: GPTOSS_URL
model_var: GPTOSS_MODEL
models:
qwen3coder:
model: ai/qwen3-coder:30B-A3B-UD-Q4_K_XL
context_size: 30000
# runtime_flags:
# - "--n-gpu-layers 1"For olla I used the default reference config:
## olla.yml ##
server:
host: "0.0.0.0"
port: 40114
read_timeout: 20s
write_timeout: 0s
idle_timeout: 120s
shutdown_timeout: 10s
request_logging: false
request_limits:
max_body_size: 52428800 # 50MB
max_header_size: 524288 # 512KB
rate_limits:
global_requests_per_minute: 0
per_ip_requests_per_minute: 0
health_requests_per_minute: 0
burst_size: 50
cleanup_interval: 1m
trust_proxy_headers: false
trusted_proxy_cidrs: []
proxy:
engine: "olla"
profile: "auto"
load_balancer: "priority"
connection_timeout: 30s
response_timeout: 0s
read_timeout: 0s
stream_buffer_size: 4096
# profile_filter:
# include:
# - "ollama" # Include Ollama
# - "openai*" # Include all OpenAI variants
translators:
anthropic:
enabled: true # Enable Anthropic translator
max_message_size: 10485760 # Max request size (10MB)
discovery:
type: "static"
refresh_interval: 5m
model_discovery:
enabled: true
interval: 5m
timeout: 30s
concurrent_workers: 5
retry_attempts: 3
retry_backoff: 5s
static:
endpoints:
- url: "http://172.17.0.1:12434/engines/llama.cpp/"
name: "docker-model-loader"
type: "openai"
priority: 100
model_url: "/v1/models"
health_check_url: "http://172.17.0.1:12434/engines/llama.cpp/v1/models"
check_interval: 15s
check_timeout: 10s
model_registry:
type: "memory"
enable_unifier: true
routing_strategy:
type: "strict" # strict, optimistic, or discovery
options:
fallback_behavior: "all" # compatible_only, all, or none
discovery_timeout: 2s
discovery_refresh_on_miss: false
unification:
enabled: true
stale_threshold: 24h # Model retention time
cleanup_interval: 10m # Cleanup frequency
cache_ttl: 5m
custom_rules: []
logging:
level: "debug"
format: "text"
output: "stdout"So internal endpoints are working fine:
/internal/status/endpoints
{
"timestamp": "2025-11-05T06:52:26.31293467Z",
"endpoints": [
{
"name": "docker-model-loader",
"type": "openai",
"status": "healthy",
"last_model_sync": "2m ago",
"health_check": "25s ago",
"response_time": "2ms",
"success_rate": "100%",
"priority": 100,
"model_count": 2,
"request_count": 3
}
],
"total_count": 1,
"healthy_count": 1,
"routable_count": 1
}/olla/models
{
"object": "list",
"data": [
{
"olla": {
"family": "",
"variant": "",
"parameter_size": "",
"quantization": "",
"aliases": [
"ai/gpt-oss:20B-UD-Q6_K_XL"
],
"availability": [
{
"endpoint": "docker-model-loader",
"state": "unknown"
}
],
"capabilities": [
"text-generation"
]
},
"id": "ai/gpt-oss:20B-UD-Q6_K_XL",
"object": "model",
"owned_by": "olla",
"created": 1762324251
},
{
"olla": {
"family": "",
"variant": "",
"parameter_size": "",
"quantization": "",
"aliases": [
"hf.co/unsloth/qwen3-coder-30b-a3b-instruct-gguf:q4_k_xl"
],
"availability": [
{
"endpoint": "docker-model-loader",
"state": "unknown"
}
],
"capabilities": [
"text-generation",
"code-generation",
"programming",
"code-completion",
"instruction-following",
"chat"
]
},
"id": "hf.co/unsloth/qwen3-coder-30b-a3b-instruct-gguf:q4_k_xl",
"object": "model",
"owned_by": "olla",
"created": 1762324251
}
]
}But external don't:
/olla/openai/v1/models
{
"object": "list",
"data": []
}/olla/openai/v1
404 page not found
How can I get the openai or ollama endpoints up and running?
Best regards
Torsten
Activity
Turboscherbe commentedon Nov 5, 2025
One additional note: when running the same command against frontend and backend endpoints (both openai), I get the following results:
curl {{URL}} -H "Content-Type: application/json" -H "Authorization: Bearer my-test-key" -d '{ "model": "hf.co/unsloth/qwen3-coder-30b-a3b-instruct-gguf:q4_k_xl", "messages": [ {"role": "system", "content": "Du bist ein hilfreicher Assistent."}, {"role": "user", "content": "Schreibe ein kurzes Gedicht über den Herbst."} ] }'url: http://localhost:12434/engines/v1/chat/completions
result: correct JSON response
url: http://localhost:40114/olla/openai/v1/chat/completions
result: 404 page not found
thushan commentedon Nov 5, 2025
Hi, thanks for reporting this, I think this may be because we made some last minute changes to the docs and OpenAI usage. Originally we were going to ship with "official OpenAI and Anthropic API" support but later deferred it.
Are you able to change the
type: openaitotype: openai-compatible?I'm currently overseas and can't check or verify this but will do so in the coming days. Might be a bugfix to the docs I can make (we want to keep
openaiandanthropicfor the official APIs).Turboscherbe commentedon Nov 5, 2025
Okay, I changed this.
Now I'm getting a model list from
/olla/openai/v1/models
{ "object": "list", "data": [ { "id": "hf.co/unsloth/qwen3-coder-30b-a3b-instruct-gguf:q4_k_xl", "object": "model", "owned_by": "olla", "created": 1762338377 }, { "id": "ai/gpt-oss:20B-UD-Q6_K_XL", "object": "model", "owned_by": "olla", "created": 1762338377 } ] }But still not able to use the api endpoint /olla/openai/v1/chat/completions --> Error 404
thushan commentedon Nov 5, 2025
Ah that's our profile matching/routing logic kicking in, apologies I forgot the profile isn't there anymore. I'm sorry to do this to you, but as a work around, can you copy the
openai.yaml(inconfig/profiles) toopenai-compatible.yaml.Then open both files, in
openai.yamlmake sure thatrouting > prefixesthat look like this currently:Only includes the right ones for that profile (so openai.yaml => openai, openai-compatible.yaml => openai-compatible).
Then make sure the
nameis also unique.Just in case...
openai.yaml:openai-compatible.yaml:This is a temporary workaround - and hopefully it works. Thank-you for raising it, will release a fix soon and maybe a hotfix.
Most backends are natively supported so wider testing of OpenAI has dropped in favour of native backend profiles. (which btw, I just noticed you're using llamacpp). You could alternatively use that as your type too
type: llamacppwhich was added in v0.0.20+.I have not used Docker Models yet, but have a feeling I will this weekend now :)
Turboscherbe commentedon Nov 5, 2025
Thanks. I copied the config and changed it according to your advice. Now I can use the openai-compatible profile. Models are recogniced in both profiles: openai and openai-compatible. But as soon as trying to use the model with the curl command above, I still get the 404 :(
In the log files I noticed this line:
It seems that the target is not correct. The endpoint should address the target http://172.17.0.1:12434/engines/llama.cpp/v1/completions, and not target=http://172.17.0.1:12434/completions. Should I add the missing /engines/llama.cpp/v1/ in one of the profile yaml's, too?
thushan commentedon Nov 5, 2025
Hmmm yes good catch! This my friend is a true bug. Because (thus far) most backends are the root and we simply forward/proxy them (also avoids traversals etc). It's something I'll look into deeper tomorrow morning and figure out how we support backends like Docker Models.
Apologies, hopefully I can get you a fix soon (it'll be a pre-release build).
thushan commentedon Nov 5, 2025
Good news, I've had a think and I believe we can add a new endpoint configuration item
preserve_pathto ensure that any endpoint with paths in the URL are preserved when remapping.It looks a bit like this:
Will work through this today and ask some folks from our team to test this (and with Docker Model Registry) and hopefully we can release a fix later today (inclusive of the other changes).
Turboscherbe commentedon Nov 6, 2025
Wow, that sounds great. I'm pleased that you are taking care of this so quickly.
Sure, we could stick the AI behind a reverse proxy or some url rewrite rules to get a clean and short url. I'm sure that in large environments one would always do so. But in smaller environments like our docker compose stack, the solution with preserve_path sounds perfect.
Thank you
thushan commentedon Nov 6, 2025
Agree, but I think it'll be good to officially support DCR and others like that moving forward - though, have to look deeper into how this works. Probably a bit too hard to implement full DCR support right now - maybe in a couple of weeks.
However, it will need the fix, so we'll target that.
Good news is the fix is working - this is just on my laptop btw, nothing fancy and just DCR running GPT-OSS:
Correctly detected models etc too:
Because they wrap llamacpp, you could set this as either
llamacpporopenai-compatible.There's a bit of work to do now to run regressions and things (someone else does most of this work) so things are tracking well.
thushan commentedon Nov 6, 2025
@Turboscherbe Please update to release v0.0.21 and see how it goes :)
Feel free to close this issue if it's solved it. Official support for DMR we'll look into later.
Turboscherbe commentedon Nov 17, 2025
Thanks. Working perfectly now 👍