Repository navigation
Description
Preflight checks
- I have searched existing issues and this is not a duplicate
- I am running a recent release or a build from
main
What happened?
Summary
When model_registry.routing_strategy.type is set to strict or model_registry.routing_strategy.options.fallback_behaviour is none, unknown models correctly fail fast with a 404.
However, if the requested model matches a configured model_aliases entry whose
target model does not exist on any endpoint, Olla logs a rejected routing
decision but still proxies the request to a compatible endpoint.
Expected behaviour
The request should fail fast, like any other unavailable model under strict routing, ideally with 404 and routing_action: rejected.
Actual behaviour
Olla logs:
WARN Model alias resolved to no endpoints, falling back to standard routingThen strict routing appears to reject the alias (i.e. routing_action: rejected), but the request is still proxied and returns a real backend response to the client request with HTTP 200.
...
2026-06-29 10:26:07 INFO Request completed
├ request_id: woolly-galloping-ce66
├ duration_ms: 4369
├ status: completed
├ model: fake
├ input_tokens: 25
├ output_tokens: 200
├ total_tokens: 225
├ routing_action: rejected
├ endpoint: local-llama-q4
├ total_bytes: 1447
├ provider_model: qwen3.5
├ routing_strategy: strict
└ routing_reason: model_not_found
...Steps to reproduce
Configure Olla with strict routing, none as fallback behaviour and a model
alias that has no routable models.
model_registry:
routing_strategy:
type: "strict"
options:
fallback_behavior: "none"
# ...
model_aliases:
fake:
- "this-is-not-a-real-model-on-any-endpoints"Attempt a chat request that specifies the unroutable alias:
{
"model": "fake",
"messages": [{ "role": "user", "content": "What is your name?" }],
"stream": false
}Proxy engine
Olla (default)
How are you running Olla?
Built from source
Backend(s) involved
Not backend specific
Configuration
model_registry:
routing_strategy:
type: "strict"
options:
fallback_behavior: "none"
# ...
model_aliases:
fake:
- "this-is-not-a-real-model-on-any-endpoints"Relevant log output
2026-06-29 10:26:03 DEBUG HTTP request started
├ request_size_formatted: 238B
├ request_id: woolly-galloping-ce66
├ method: POST
├ path: /olla/openai/v1/chat/completions
├ remote_addr: 127.0.0.1:43596
├ user_agent: curl/8.14.1
└ request_bytes: 238
2026-06-29 10:26:03 DEBUG Proxy handler called
├ path: /olla/openai/v1/chat/completions
├ method: POST
└ request_id: woolly-galloping-ce66
2026-06-29 10:26:03 DEBUG Path inspection completed (exact match)
├ path: /v1/chat/completions
└ supported_profiles: [litellm llamacpp lm-studio lmdeploy ollama omlx sglang vllm vllm-mlx openai-compatible]
2026-06-29 10:26:03 DEBUG Inspector completed
├ inspector: path
├ path: /v1/chat/completions
└ supported_by: [litellm llamacpp lm-studio lmdeploy ollama omlx sglang vllm vllm-mlx openai-compatible]
2026-06-29 10:26:03 DEBUG Extracted model name from request body model: fake
2026-06-29 10:26:03 DEBUG Inspector completed
├ inspector: body
├ path: /v1/chat/completions
└ supported_by: [litellm llamacpp lm-studio lmdeploy ollama omlx sglang vllm vllm-mlx openai-compatible]
2026-06-29 10:26:03 DEBUG Filtered endpoints by profile compatibility
├ path: /v1/chat/completions
├ compatible_count: 2
├ total_count: 2
├ supported_by: [openai-compatible docker-model-runner lemonade litellm llamacpp lm-studio lmdeploy ollama omlx sglang vllm vllm-mlx]
└ request_id: woolly-galloping-ce66
2026-06-29 10:26:03 DEBUG Filtered endpoints by profile compatibility
├ compatible_count: 2
├ total_count: 2
├ supported_by: [litellm llamacpp lm-studio lmdeploy ollama omlx sglang vllm vllm-mlx openai-compatible]
├ request_id: woolly-galloping-ce66
└ path: /v1/chat/completions
2026-06-29 10:26:03 WARN Model alias resolved to no endpoints, falling back to
│ standard routing
├ alias: fake
└ request_id: woolly-galloping-ce66
2026-06-29 10:26:03 DEBUG Model not found in any endpoint
├ model: fake
└ healthy_endpoints: 2
2026-06-29 10:26:03 INFO Request received
├ content_length: 238
├ request_id: woolly-galloping-ce66
├ client_ip: 127.0.0.1
├ method: POST
├ path: /olla/openai/v1/chat/completions
├ compatible_endpoints: 2
├ user_agent: curl/8.14.1
└ model: fake
2026-06-29 10:26:03 DEBUG Request details
├ target_path: /v1/chat/completions
├ path_resolution_ms: 0
├ query:
├ content_type: application/json
└ request_id: woolly-galloping-ce66
2026-06-29 10:26:03 DEBUG Olla proxy request started
├ method: POST
├ url: /v1/chat/completions
├ endpoint_count: 2
└ request_id: woolly-galloping-ce66
2026-06-29 10:26:03 INFO Request dispatching
├ target: http://127.0.0.1:6004/v1/chat/completions
├ model: fake
├ request_id: woolly-galloping-ce66
└ endpoint: local-llama-q4
2026-06-29 10:26:03 DEBUG making round-trip request
├ target: http://127.0.0.1:6004/v1/chat/completions
└ request_id: woolly-galloping-ce66
2026-06-29 10:26:07 DEBUG round-trip success
├ status: 200
└ request_id: woolly-galloping-ce66
2026-06-29 10:26:07 DEBUG starting response stream
└ request_id: woolly-galloping-ce66
2026-06-29 10:26:07 DEBUG Metrics extracted
├ engine: Olla
├ tokens: 225
└ request_id: woolly-galloping-ce66
2026-06-29 10:26:07 DEBUG Olla proxy metrics
├ backend_ms: 4367
├ first_data_ms: 4368
├ streaming_ms: 0
├ output_tokens: 200
├ provider_model: qwen3.5
├ endpoint: local-llama-q4
├ header_ms: 0
├ total_bytes: 1447
├ input_tokens: 25
├ total_tokens: 225
├ finish_reason: length
├ request_id: woolly-galloping-ce66
├ processing_ms: 0
├ selection_ms: 0
├ bytes_formatted: 1.4KB
├ latency_ms: 4368
└ status: 200
2026-06-29 10:26:07 INFO Request completed
├ request_id: woolly-galloping-ce66
├ duration_ms: 4369
├ status: completed
├ model: fake
├ input_tokens: 25
├ output_tokens: 200
├ total_tokens: 225
├ routing_action: rejected
├ endpoint: local-llama-q4
├ total_bytes: 1447
├ provider_model: qwen3.5
├ routing_strategy: strict
└ routing_reason: model_not_found
2026-06-29 10:26:07 DEBUG Request metrics
├ client_ip: 127.0.0.1
├ total_bytes: 1447
├ streaming_ms: 0
├ path_resolution_ms: 0
├ provider_model: qwen3.5
├ request_id: woolly-galloping-ce66
├ endpoint: local-llama-q4
├ duration_ms: 4369
├ backend_response_ms: 4367
├ header_processing_ms: 0
├ selection_ms: 0
├ total_tokens: 225
├ model: fake
├ latency_ms: 4368
├ request_processing_ms: 0
├ input_tokens: 25
├ finish_reason: length
├ first_data_ms: 4368
└ output_tokens: 200
2026-06-29 10:26:07 DEBUG HTTP request completed
├ size_flow: 238B -> 1.4KB
├ request_id: woolly-galloping-ce66
├ method: POST
├ duration_formatted: 4.370139833s
├ path: /v1/chat/completions
├ status: 200
├ duration_ms: 4370
├ request_bytes: 238
└ response_bytes: 1447Olla version
v1.24.4@a595ca7
Platform
Linux (amd64)
Activity
thushan commentedon Jul 2, 2026
Thanks for reporting this, reproduced and working on a fix. As you built from source, might let you know the branch to test when we're read.
thushan commentedon Jul 8, 2026
Think i've got a fix for this, we're just testing it doesn't break some other areas and will let you know the branch soon.
key the alias fail-fast short-circuit on status code, not the rejecte…
record a routing decision when an alias resolves but no candidate ser…
honour the recorded routing decision in the translation route's zero-…
thushan commentedon Jul 18, 2026
@skaravos apologies mate, the testing took time and came up with some issues which we've addressed today.
The branch for you to test:
bugfix/191-strict-model-routing-bypassWe hope to release a new version of Olla in late July or early August, hopefully you can signoff before it closes.
let the routing strategy decide the alias no-intersection fallback (#191
make the alias-rejection regression script actually fail on a proxied…
skaravos commentedon Jul 20, 2026
Looks good. I rebuilt on the branch and at least on my setup it does seem to be fixed.
I see that Olla now also sets the
X-Olla-Routing-DecisionandX-Olla-Routing-Reasonheaders in the response too, which is a bonus.Thanks!
skaravos commentedon Jul 20, 2026
I guess I may have been a bit too hasty to mark the issue closed as you haven't actually merged it into main yet, but at least from my POV as someone building from source I consider this issue solved.
thushan commentedon Jul 20, 2026
it's incentive to merge :) done!
fail fast when a model alias resolves to no routable endpoints under …
share the post-selection dispatch tail across proxy and provider rout…
harden tests around strict alias rejection and shared dispatch (thush…
log short-circuited routing rejections as rejections, not completions (…
document that unroutable aliases fail fast under strict routing (thus…