Skip to content

OpenAI 服务类自定义 503 status code (no body) #533

@501956430

Description

@501956430

Bug Description

Image Image

qwen3.5-9b 走自定义模型,其余默认走qwen

请求日志,已路由到自定义的 lmstudio-ai-route:

{"ai_log":"-","authority":"aigw-local.hiclaw.io","bytes_received":"100","bytes_sent":"0","downstream_local_address":"172.18.0.3:8080","downstream_remote_address":"172.18.0.1:59780","duration":"3","istio_policy_status":"-","method":"POST","path":"/v1/chat/completions","protocol":"HTTP/1.1","request_id":"39263ce2-d8e8-4826-acca-b8e9d4c60dfd","requested_server_name":"-","response_code":"503","response_flags":"NC","route_name":"ai-route-lmstudio-ai-route.internal","start_time":"2026-04-02T07:27:11.570Z","trace_id":"-","upstream_cluster":"-","upstream_host":"-","upstream_local_address":"-","upstream_service_time":"-","upstream_transport_failure_reason":"-","user_agent":"curl/8.7.1","x_forwarded_for":"172.18.0.1","response_code_details":"cluster_not_found"}

帮助文档也查看过:如果 Manager 没有响应,或者返回了 404、503 等状态码

文档结论”要判断是后端服务出错还是 Higress 自身配置问题,查看日志中的 upstream_host 字段:如果该字段有值,说明请求已到达后端,异常状态码是由上游服务返回的;如果为空,说明 Higress 本身无法路由该请求“

实际测试 BaseURL 在容器和宿主机都可以正常访问:

curl http://host.docker.internal:1234/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.5-9b@q6_k_xl",
    "messages": [
      {
        "role": "user",
        "content": "你好"
      }
    ]
  }'> > > > > > > > > > 
{
  "id": "chatcmpl-wfqgiu1uykq5q356gek96k",
  "object": "chat.completion",
  "created": 1775113589,
  "model": "qwen3.5-9b@q6_k_xl",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "你好!有什么我可以帮助你的吗?无论是回答问题、创作内容,还是分析数据,随时告诉我你的需求吧! 😊",
        "reasoning_content": "",
        "tool_calls": []
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 13,
    "completion_tokens": 27,
    "total_tokens": 40,
    "completion_tokens_details": {
      "reasoning_tokens": 0
    }
  },
  "stats": {},

Steps to Reproduce

AI Analysis

No response

Relevant Logs

Component

Manager Agent

Version / Commit

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions