Skip to content

API Error: terminated (cause: Body Timeout Error) #4604

Description

@denysobukh

What happened?

run prompt to process web pages

What did you expect to happen?

run is processed

Client information

Client Information

/about

│ Status │
│ │
│ Qwen Code 0.16.2 (7aba696) │
│ Runtime Node.js v26.0.0 / npm 11.12.1 │
│ LSP disabled │
│ OS darwin arm64 (24.6.0) │
│ │
│ Auth API Key - openai │
│ Base URL http://localhost:1234/v1
│ Model /Users/denysobukhov/Models/unsloth/Qwen3.6-27B-UD-MLX-4bit │
│ Fast Model /Users/denysobukhov/Models/unsloth/Qwen3.6-27B-UD-MLX-4bit │
│ Session ID b2ad61fe-a53a-4467-8f9e-931676613ddf │
│ Sandbox no sandbox │
│ Proxy no proxy │
│ Memory Usage 207.6 MB

Login information

settings.json

{
  "env": {
    "QWEN_CUSTOM_API_KEY_OPENAI_HTTP_LOCALHOST_1234_V1": "sk-empty"
  },
  "modelProviders": {
    "openai": [
      {
        "id": "/Users/denysobukhov/Models/unsloth/Qwen3.6-27B-UD-MLX-4bit",
        "name": "Qwen3.6-27B-UD-MLX-4bit",
        "baseUrl": "http://localhost:1234/v1",
        "envKey": "QWEN_CUSTOM_API_KEY_OPENAI_HTTP_LOCALHOST_1234_V1",
        "generationConfig": {
          "timeout": 6000000,
          "modalities": {
            "image": false
          }
        }
      },
      {
        "id": "qwen3-vl-32b",
        "name": "Qwen3 VL 32B Local GGUF",
        "baseUrl": "http://127.0.0.1:1234/v1",
        "description": "Local Qwen3-VL-32B-Instruct GGUF via llama.cpp llama-server",
        "envKey": "OPENAI_API_KEY",
        "generationConfig": {
          "contextWindowSize": 65536,
          "maxOutputTokens": 4096,
          "temperature": 0.6,
          "topP": 0.95,
          "timeout": 900000,
          "maxRetries": 1
        }
      }
    ]
  },
  "security": {
    "auth": {
      "selectedType": "openai"
    }
  },
  "model": {
    "name": "/Users/denysobukhov/Models/unsloth/Qwen3.6-27B-UD-MLX-4bit"
  },
  "$version": 4,
  "permissions": {
    "allow": [
      "mcp__web-search__full-web-search",
      "WebFetch(huggingface.co)",
      "Bash(ls *)",
      "Bash(python3 *)",
      "Bash(cp *)",
      "Bash(source *)",
      "Bash(python *)",
      "Bash(pip show *)",
      "Bash(find *)",
      "Bash(du *)",
      "Bash(xargs *)",
      "Bash(awk *)",
      "Bash(readlink *)",
      "Bash(head *)",
      "Bash(tesseract *)",
      "Bash(iconv *)",
      "Bash(do)",
      "Bash(done)"
    ]
  },
  "mcpServers": {
    "memory": {
      "httpUrl": "http://127.0.0.1:8765/mcp",
      "timeout": 30000,
      "trust": true
    },
    "context7": {
      "url": "https://mcp.context7.com/mcp",
      "headers": {
        "CONTEXT7_API_KEY": "xx",
        "Accept": "application/json, text/event-stream"
      },
      "httpUrl": "https://mcp.context7.com/mcp"
    },
    "web-search": {
      "command": "node",
      "args": [
        "/Users/denysobukhov/mcp-servers/web-search-mcp-v0.3.2/dist/index.js"
      ]
    },
    "gmail": {
      "httpUrl": "https://gmailmcp.googleapis.com/mcp/v1",
      "oauth": {
        "enabled": true,
        "clientId": "200917708091-54d4pbdllrpporrh5lt8m3cuf4ulu6ml.apps.googleusercontent.com",
        "clientSecret": "xx",
        "scopes": [
          "https://www.googleapis.com/auth/gmail.readonly",
          "https://www.googleapis.com/auth/gmail.compose"
        ]
      }
    }
  },
  "mcp": {
    "excluded": [
      "context7"
    ]
  },
  "tools": {
    "approvalMode": "auto-edit"
  },
  "ui": {
    "theme": "Qwen Light"
  },
  "general": {
    "preferredEditor": "vim",
    "gitCoAuthor": {
      "commit": true
    }
  },
  "experimental": {
    "emitToolUseSummaries": true
  }
}

Anything else we need to know?

run server with:

#!/usr/bin/env bash
set -euo pipefail

VENV="${VENV:-$HOME/venvs/venv-mlx}"
MODEL="${MODEL:-$HOME/Models/unsloth/Qwen3.6-27B-UD-MLX-4bit}"
HOST="${HOST:-0.0.0.0}"
PORT="${PORT:-1234}"

if [[ ! -d "$VENV" ]]; then
  echo "ERROR: venv not found: $VENV"
  exit 1
fi

if [[ ! -d "$MODEL" ]]; then
  echo "ERROR: model directory not found: $MODEL"
  exit 1
fi

source "$VENV/bin/activate"

echo "Venv:  $VENV"
echo "Model: $MODEL"
echo "Host:  $HOST"
echo "Port:  $PORT"
echo

exec python -m mlx_lm.server \
  --model "$MODEL" \
  --host "$HOST" \
  --port "$PORT" \
  --temp 0.6 \
  --top-p 0.95 \
  --top-k 20 \
  --min-p 0.05 \
  --max-tokens 32677 \
  --prompt-cache-bytes 1G \
  --decode-concurrency 1 \
  --prompt-concurrency 1 \
  --chat-template-args '{"preserve_thinking":true}'


Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions