Skip to content

Gigachat 3 tool parser and tests#14765

Merged
Kangyan-Zhou merged 1 commit intosgl-project:mainfrom
ajpqs:gigachat3_tool_parser
Feb 3, 2026
Merged

Gigachat 3 tool parser and tests#14765
Kangyan-Zhou merged 1 commit intosgl-project:mainfrom
ajpqs:gigachat3_tool_parser

Conversation

@ajpqs
Copy link
Contributor

@ajpqs ajpqs commented Dec 10, 2025

Motivation

This PR adds a tool parser for parsing the function calls made by the Gigachat 3 models.
Models can generate only one function call using format:

{text}<|message_sep|>\n\nfunction call<|role_sep|>\n{json}

Where <|message_sep|>\n\n and <|role_sep|>\n are special tokens.

Modifications

Add Gigachat 3 parser and unite tests to it. PR doesnt affects any existing code or tests.

Accuracy Tests

Benchmarking and Profiling

Checklist

@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Dec 10, 2025
@ajpqs
Copy link
Contributor Author

ajpqs commented Dec 16, 2025

@ajpqs ajpqs force-pushed the gigachat3_tool_parser branch from a22943f to 4e43da1 Compare January 29, 2026 15:11
@ajpqs
Copy link
Contributor Author

ajpqs commented Jan 29, 2026

Hi @CatherineSue @JustinTong0323, could you please take a look at this PR when you have a chance? Thanks!

1 similar comment
@ajpqs
Copy link
Contributor Author

ajpqs commented Jan 30, 2026

Hi @CatherineSue @JustinTong0323, could you please take a look at this PR when you have a chance? Thanks!

@Kangyan-Zhou
Copy link
Collaborator

/tag-and-rerun-ci

@Kangyan-Zhou Kangyan-Zhou self-assigned this Feb 2, 2026
@Kangyan-Zhou
Copy link
Collaborator

@ajpqs could you please attach the result of test/registered/function_call/test_function_call_parser.py for this PR? I think once verified it should be ready to merge.

@ajpqs
Copy link
Contributor Author

ajpqs commented Feb 3, 2026

@Kangyan-Zhou

python -m pytest sglang/test/registered/function_call/test_function_call_parser.py::TestGigaChat3Detector

Output:

=============================================================================== test session starts ===============================================================================
platform linux -- Python 3.12.3, pytest-9.0.2, pluggy-1.6.0
configfile: pytest.ini
plugins: anyio-4.12.0
collected 21 items                                                                                                                                                                

sglang/test/registered/function_call/test_function_call_parser.py .....................                                                   [100%]

========================================================================= 21 passed in 122.80s (0:02:02) ==========================================================================

@Kangyan-Zhou Kangyan-Zhou merged commit 74f716d into sgl-project:main Feb 3, 2026
57 of 64 checks passed
yuki-brook pushed a commit to scitix/sglang that referenced this pull request Feb 3, 2026
charlesHsuGG pushed a commit to charlesHsuGG/sglang that referenced this pull request Feb 5, 2026
sfiisf pushed a commit to sfiisf/sglang that referenced this pull request Feb 5, 2026
Johnsonms pushed a commit to Johnsonms/sglang that referenced this pull request Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants