[model-gateway] Dynamically Populate Tool Call Parser Choices (#14807)

This commit is contained in:
Wenyi Xu
2025-12-10 06:04:22 -08:00
committed by GitHub
parent 766476f52a
commit d7f6320bb8
3 changed files with 20 additions and 1 deletions
@@ -4,6 +4,8 @@ import logging
import os
from typing import Dict, List, Optional
from sglang_router.sglang_router_rs import get_available_tool_call_parsers
logger = logging.getLogger(__name__)
@@ -520,11 +522,13 @@ class RouterArgs:
default=None,
help="Specify the parser for reasoning models (e.g., deepseek-r1, qwen3)",
)
tool_call_parser_choices = get_available_tool_call_parsers()
parser.add_argument(
f"--{prefix}tool-call-parser",
type=str,
default=None,
help="Specify the parser for handling tool-call interactions",
choices=tool_call_parser_choices,
help=f"Specify the parser for tool-call interactions (e.g., json, qwen)",
)
# MCP server configuration
parser.add_argument(