Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "ollama-queue-proxy"
version = "0.3.1"
version = "0.3.2"
description = "Drop-in HTTP proxy for Ollama with priority queuing, per-client auth, and model-aware failover"
readme = "README.md"
license = { text = "MIT" }
Expand Down
8 changes: 8 additions & 0 deletions src/ollama_queue_proxy/routes/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,14 @@ async def metrics(request: Request):
f'oqp_embedding_cache_hits_total{{client="{_pm_label(client_id)}",model="{_pm_label(model)}",'
f'endpoint="{_pm_label(endpoint)}"}} {count}'
)
# Emit zero for miss labels absent from hits so Prometheus always has the time series
for label in cache_misses:
if label not in cache_hits:
client_id, model, endpoint = label.split(",", 2)
lines.append(
f'oqp_embedding_cache_hits_total{{client="{_pm_label(client_id)}",model="{_pm_label(model)}",'
f'endpoint="{_pm_label(endpoint)}"}} 0'
)

lines += [
"# HELP oqp_embedding_cache_misses_total Embedding cache misses",
Expand Down