Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
08289eaa
Unverified
Commit
08289eaa
authored
Apr 21, 2025
by
Chuyue Sun
Committed by
GitHub
Apr 21, 2025
Browse files
Support o1 model on Azure (#4980)
Co-authored-by:
Shan Yu
<
shanyu1@g.ucla.edu
>
parent
3b6d539f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
python/sglang/lang/backend/openai.py
python/sglang/lang/backend/openai.py
+5
-1
No files found.
python/sglang/lang/backend/openai.py
View file @
08289eaa
...
...
@@ -161,7 +161,11 @@ class OpenAI(BaseBackend):
prompt
=
s
.
text_
kwargs
=
sampling_params
.
to_openai_kwargs
()
if
self
.
model_name
.
startswith
(
"o1"
)
or
self
.
model_name
.
startswith
(
"o3"
):
if
(
self
.
model_name
.
startswith
(
"o1"
)
or
self
.
model_name
.
startswith
(
"o3"
)
or
"o1"
in
self
.
model_name
):
kwargs
.
pop
(
"max_tokens"
,
None
)
else
:
kwargs
.
pop
(
"max_completion_tokens"
,
None
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment