Repository navigation
Description
Problem Description
The gateway deployment hf.co/ISTA-DASLab/Qwen3.8-27B-GSQ-RCO-GGUF:IQ3_S on ollama-16gib-fast returned HTTP 500 on 297 calls in 24 h. This is 297 of the 387 deployment failures in that time. The router retries each call on another tier, so a caller often gets a reply. But each failed attempt adds latency and takes a slot. The qwen3.8:27b deployments on ollama-48gib-fast (25) and ollama-64gib-standard (13) also returned HTTP 500 in the same 24 h.
The cause is not known. This issue is to find the cause and then fix it, or file the fix.
Reproduction Steps
- Query Prometheus:
sum by (api_base, litellm_model_name, exception_status) (increase(litellm_deployment_failure_responses_total[24h])). - Query it in 2 h steps to see the bursts.
Expected vs Actual Behavior
- Expected: a deployment in the
devops-chatandqwen3.8:27bgroups replies, or the pre-call check moves a prompt that is too large to another deployment before the call. - Actual: the 16gib-fast deployment fails in bursts with HTTP 500.
Environment Diagnostics
devops-cli 0.7.1 (main at 69928b0). Gateway: LiteLLM v1.103.0, k8s/llm/gateway/config.yaml. The deployment has max_input_tokens: 48000 and enable_pre_call_checks: true.
Logs, Traces, or Terminal Output
Measured on 2026-10-27 (litellm_deployment_failure_responses_total, all IQ3_S and qwen3.8:27b deployments, 500 status, 2 h steps, oldest first): 16, 173, 58, 0, 16, 0, 0, 0, 3, 20, 31, 13.
- A Loki search of
{namespace="llm"}forIQ3_Switherror,exceptionorstatus codein the last 8 h found no line. Thus the gateway log does not show the error text at its log level. Start with the Ollama logs on theollama-16gib-fastpods at the burst times. - One probe call to
qwen3.8:27bthrough the tunnel on 2026-10-27 got HTTP 502 with an HTML body after 31 s. A second call 1 minute later worked. The probe did not keep the body. This can be a different problem.
Questions to answer
- What is the Ollama error text for the 500s? Possible causes: the model cannot load in 16 GiB beside another model, the prompt is larger than the tier's context length while it is under
max_input_tokens: 48000, or the chat template of the GGUF model fails. - Do the bursts agree with times when another model takes the VRAM of the tier (for example an embedding call, see fix(k8s): the gateway sends embeddings to every serving ollama tier, fastest first, so a rag batch never waits behind the slow tier #1987)?
- Is the fix a change to
max_input_tokens, to the tier profile ink8s/llm/profiles/, or the removal of the deployment from the groups?
Related
- fix(k8s): the gateway sends embeddings to every serving ollama tier, fastest first, so a rag batch never waits behind the slow tier #1987 sends embeddings to every serving tier, the 16gib-fast tier as
order: 2. - fix(ai): gateway chat calls stream with keepalive pings, so the Cloudflare 125 s read timeout does not cut a long reply #2365 covers the 499s on the same model: the Cloudflare 125 s read timeout.
Source: #2365
Proposed design
Problem statement
The IQ3_S GGUF deployment on ollama-16gib-fast returns HTTP 500 on about 300 calls per day. The Ollama log shows 42 of 71 errors are chat template prompt error: No user query found in messages, triggered by requests that contain only a system message. The GGUF model has no renderer or parser, so Ollama falls back to the Jinja chat template in the GGUF, which requires a user message. The fix is to create a model from the GGUF with the correct renderer and parser, and point the two gateway deployments at it.
Acceptance criteria
- Criterion 1: A model created from the IQ3_S GGUF with renderer qwen3.8 and parser qwen3.5 replies to a system-only message without an error.
Verification: Send a /api/chat request with only a system message to the new model on ollama-16gib-fast and confirm an HTTP 200 reply. - Criterion 2: The two IQ3_S deployments in k8s/llm/gateway/config.yaml reference the new model name instead of the raw GGUF path.
Verification: Read k8s/llm/gateway/config.yaml and confirm both devops-chat and qwen3.8:27b entries for the 16gib-fast tier use the new model name. - Criterion 3: k8s/README.md documents the curl create step for the new model next to the existing ollama pull steps.
Verification: Read k8s/README.md and confirm the create command is present with the model name, from, renderer, parser and parameters. - Criterion 4: After deployment, the litellm_deployment_failure_responses_total for the 16gib-fast IQ3_S deployment shows zero template errors over 24 h.
Verification: Query Prometheus: sum by (api_base, litellm_model_name, exception_status) (increase(litellm_deployment_failure_responses_total[24h])) and confirm no 500 entries for the 16gib-fast IQ3_S deployment.
Key questions
- What is the Ollama error text for the 500s?: The Ollama log shows
chat template prompt error:No user query found in messages.at line 100 of the Jinja chat template in the GGUF. A request with only a system message triggers the 500; a request with a user message works. [sources: k8s/llm/gateway/config.yaml:7] - Do the bursts agree with times when another model takes the VRAM of the tier?: No. The 42 template errors are caused by the GGUF chat template rejecting a system-only message, not by VRAM contention from the embedding model. The 27 client-disconnect 500s are the Cloudflare 125 s timeout covered by fix(ai): gateway chat calls stream with keepalive pings, so the Cloudflare 125 s read timeout does not cut a long reply #2365. [sources: k8s/llm/gateway/config.yaml:7]
- Is the fix a change to max_input_tokens, to the tier profile in k8s/llm/profiles/, or the removal of the deployment from the groups?: The fix is to create a model from the GGUF with renderer qwen3.8, parser qwen3.5 and the library sampling parameters, then point the two IQ3_S deployments in k8s/llm/gateway/config.yaml at the new model. This is neither a max_input_tokens change nor a removal. (proposed) [sources: k8s/llm/gateway/config.yaml:7, k8s/llm/gateway/config.yaml:153]
Fit
Fits in one pull request.
Suspected block
A person must create the model on the ollama-16gib-fast node via the Ollama /api/create endpoint before the config change can be deployed.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNew
Activity
dan-petty commentedon Oct 27, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.
The item reports a production failure and asks for a fix.Users receive slow or failed calls on a common model.dan-petty commentedon Oct 27, 2026
Findings, 2026-10-27, from the Ollama log of
ollama-16gibfor the last 30 h (71 HTTP 500 lines):chat template prompt error: the Jinja chat template inside the GGUF raisesNo user query found in messages.(line 100 of the template). A direct call to/api/chatof the tier showed the trigger: a request with only a system message gets this 500, and a request with a user message works.ollama show qwen3.8:27b --modelfileonollama-48gibhasRENDERER qwen3.8,PARSER qwen3.5and sampling parameters (temperature 1, top_k 20, top_p 0.95, min_p 0, presence_penalty 0). Thehf.co/ISTA-DASLab/Qwen3.8-27B-GSQ-RCO-GGUF:IQ3_Smodel has onlyTEMPLATE {{ .Prompt }}, so Ollama 0.34.4 falls back to the Jinja template of the GGUF. With no parser, the reasoning of this deployment is also not split from its content.chat,chat_structuredand the agent loop always add a user message. The gateway log names the Traefik pod as the client of these requests, so a workstation client or an ingress caller sends them. The router retries them on another deployment, so the caller gets a 200, but each failure counts towardallowed_fails: 3and can load the 27B model on the 16 GiB card for nothing.Proposed fix, not yet applied:
IQ3_Sdeployments ofk8s/llm/gateway/config.yamlatollama_chat/qwen3.8-gsq:27b-iq3s, and add the create step to the model list ofk8s/README.md, next to theollama pullsteps.Step 1 changes the model store of the node, so it waits for a person. The change of step 3 waits for step 2: if Ollama does not apply a renderer to this GGUF, the fallback is to remove the
IQ3_Sdeployments fromdevops-chatandqwen3.8:27b.dan-petty commentedon Oct 28, 2026
Refine cannot set this item to Ready at 69636b6 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.
fix(k8s): remove IQ3_S gateway deployment from qwen3.8 and chat groups (