Skip to content

[Bug] [model-gateway] External workers fail with "Unknown parameter" in IGW mode #16544

@zhaowenzi

Description

@zhaowenzi

Checklist

  • I searched related issues but found no solution.
  • The bug persists in the latest version.
  • Issues without environment info and a minimal reproducible demo are hard to resolve and may receive no feedback.
  • If this is not a bug report but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.
  • Please use English. Otherwise, it will be closed.

Describe the bug

When dynamically registering external API workers (OpenAI) via POST /workers in IGW mode (--enable-igw), requests fail with 400 errors due to SGLang-specific parameters not being stripped.

Reproduction

# Start in IGW mode
cargo run --bin sgl-model-gateway -- --enable-igw --port 9999

# Register external worker
curl -X POST http://localhost:9999/workers \
  -d '{"url": "https://api.openai.com", "api_key": "sk-xxx", "runtime": "external"}'

# Request fails with 400
curl http://localhost:9999/v1/responses \
  -d '{"model": "gpt-4.1", "input": "Hello"}'

{
  "error": {
    "message": "Unknown parameter: 'priority'.",
    "type": "invalid_request_error",
    "param": "priority",
    "code": "unknown_parameter"
  }
}%

Environment

N/A - use command cargo run --bin sgl-model-gateway -- --enable-igw --port 9999 to start

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions