Repository navigation
Description
Split from #5546.
The backend label of devops_cli_ai_requests_total must name the provider of a hosted gateway call, such as openrouter, after the fix of #5546 is released. The check reads the Prometheus of the cluster, which the change cannot reach before the merge and the rollout. The fix and its tests are in #5546; this item checks the live series only, so #5546 can reach Ready without it. This item waits on the release of #5546 and on the owner's Prometheus, and it is Blocked until then. Its acceptance criteria: after the release, sum by (server, backend, provider, model) (increase(devops_cli_ai_requests_total{cached=false}[24h])) returns no series with an empty backend label for a hosted model such as deepseek-v4.1-flash-1017; the same query returns backend=openrouter for the openrouter series and backend=ollama-48gib-fast for the Ollama series.
Proposed design
Problem statement
Verify the live backend labels of devops_cli_ai_requests_total after the release of #5546. The fix and its tests are in #5546. This item adds no code. It waits on the owner's Prometheus and on the release.
Acceptance criteria
Requirement: Pending a person after the merge
The operator SHALL supply PROMETHEUS_URL and a read credential, run the three live checks after the release of #5546, and record each JSON result as a comment.
Scenario: The operator runs the live checks
- WHEN The operator supplies
PROMETHEUS_URLand a read credential of the cluster Prometheus and runs the three live checks after the release and rollout of fix(ai): a hosted gateway call names its provider as backend #5546. - THEN Each live check prints true and exits 0, and the operator records the JSON result of each check as a comment on the issue.
Requirement: Hosted series carry a backend
Each series of devops_cli_ai_requests_total with a non-empty provider label SHALL carry a non-empty backend label after the release of #5546.
Scenario: Hosted series show a backend
- WHEN The live check
curl -sG "$PROMETHEUS_URL/api/v1/query" --data-urlencode 'query=sum by (server, backend, provider, model) (increase(devops_cli_ai_requests_total{cached="false"}[24h]))' | jq -e '[.data.result[] | select((.metric.provider // "") != "") | select((.metric.backend // "") == "")] | length == 0'runs against the cluster Prometheus after the release and rollout of fix(ai): a hosted gateway call names its provider as backend #5546. - THEN The live check prints true and exits 0, which shows that no hosted series has an empty
backendlabel.
Requirement: OpenRouter series carry openrouter
The backend label SHALL be openrouter for each series that the OpenRouter provider serves.
Scenario: OpenRouter series show openrouter
- WHEN The live check
curl -sG "$PROMETHEUS_URL/api/v1/query" --data-urlencode 'query=sum by (server, backend, provider, model) (increase(devops_cli_ai_requests_total{cached="false"}[24h]))' | jq -e '([.data.result[] | select(.metric.provider == "openrouter")] | length > 0) and ([.data.result[] | select(.metric.provider == "openrouter") | select(.metric.backend != "openrouter")] | length == 0)'runs against the cluster Prometheus after the release and rollout of fix(ai): a hosted gateway call names its provider as backend #5546. - THEN The live check prints true and exits 0, which shows at least one OpenRouter series and no OpenRouter series with another
backendlabel.
Requirement: Ollama series carry ollama-48gib-fast
The backend label SHALL be ollama-48gib-fast for each series that the Ollama tier serves.
Scenario: Ollama series show ollama-48gib-fast
- WHEN The live check
curl -sG "$PROMETHEUS_URL/api/v1/query" --data-urlencode 'query=sum by (server, backend, provider, model) (increase(devops_cli_ai_requests_total{cached="false"}[24h]))' | jq -e '([.data.result[] | select(.metric.provider == "ollama")] | length > 0) and ([.data.result[] | select(.metric.provider == "ollama") | select(.metric.backend != "ollama-48gib-fast")] | length == 0)'runs against the cluster Prometheus after the release and rollout of fix(ai): a hosted gateway call names its provider as backend #5546. - THEN The live check prints true and exits 0, which shows at least one Ollama series and no Ollama series with another
backendlabel.
Existing Tool Considered
No alternatives check has run. Prometheus, with its HTTP query API and PromQL, is the open, maintained tool that covers the need. The cluster runs it, and its rules already read devops_cli_ai_requests_total (k8s/devops/monitoring/prometheus-rules-values.yaml). It lacks the fixed backend label until #5546 ships. It needs the URL and a read credential of the owner's cluster Prometheus. This item adds no code, so it has no build cost.
Key questions
- How does the check read the live series of
devops_cli_ai_requests_total?: Use the HTTP query API of the cluster Prometheus with curl and PromQL. Usejq -eto assert the JSON result. Record the JSON result as a comment on the issue before it closes. Add no code. (best practice) [sources: k8s/devops/monitoring/prometheus-rules-values.yaml, src/devops_cli/telemetry/instruments.py]- Chosen: Prometheus HTTP query API with curl and jq. The cluster stores the series, the API returns the JSON result that the check records, and the check adds no code.
- Rejected: promtool query instant. It sends the same query and needs the same URL, and it adds a binary to install on the operator host.
- Rejected: A new devops command. It builds and keeps code for one verification, and fix(ai): a hosted gateway call names its provider as backend #5546 holds the fix and its tests.
- Rejected: Grafana Explore. It shows a graph and records no JSON result that the check can cite.
Fit
Fits in one pull request.
Suspected block
The owner's PROMETHEUS_URL and a read credential of the cluster Prometheus, and at least one cached="false" sample of a hosted call and of an Ollama call in the 24h window.
Dependencies
Watched files
A commit on the default branch that changes one of these files starts the next refine round.
src/devops_cli/telemetry/instruments.py
Activity
devops-cli-service commentedon Nov 20, 2026
Both concern the backend label on devops_cli_ai_requests_total; #5546 delivers the code fix, this item verifies the live series after release.devops-cli-service commentedon Nov 20, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.
[-]chore(telemetry): verify the hosted backend label in Prometheus after the release[/-][+]chore(telemetry): verify backend labels in Prometheus after release[/+]devops-cli-service commentedon Nov 20, 2026
The job shortened the title of this item. The summary had 63 characters, and the limit is 60. The type and the scope stay.
chore(telemetry): verify the hosted backend label in Prometheus after the releasechore(telemetry): verify backend labels in Prometheus after releasedevops-cli-service commentedon Nov 22, 2026
Owner question: See the first point of Open questions and Watched files in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 27, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.
devops-cli-service commentedon Nov 29, 2026
Owner question: See Suspected block and Watched files in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 29, 2026
Owner question: See Suspected block and Watched files in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence