Skip to content

Commit e9f7cd3

Browse files
authored
release(openai): 1.1.6: update max input tokens for gpt-5 series (#34419)
1 parent 5c94e47 commit e9f7cd3

File tree

10 files changed

+135
-18
lines changed

10 files changed

+135
-18
lines changed

β€Žlibs/langchain/uv.lockβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žlibs/langchain_v1/uv.lockβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žlibs/model-profiles/uv.lockβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žlibs/partners/deepseek/uv.lockβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žlibs/partners/openai/langchain_openai/data/_profiles.pyβ€Ž

Lines changed: 82 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@
106106
"tool_choice": True,
107107
},
108108
"gpt-5.1-codex": {
109-
"max_input_tokens": 400000,
109+
"max_input_tokens": 272000,
110110
"max_output_tokens": 128000,
111111
"image_inputs": True,
112112
"audio_inputs": False,
113113
"video_inputs": False,
114-
"image_outputs": True,
114+
"image_outputs": False,
115115
"audio_outputs": False,
116116
"video_outputs": False,
117117
"reasoning_output": True,
@@ -194,6 +194,24 @@
194194
"image_tool_message": False,
195195
"tool_choice": True,
196196
},
197+
"gpt-5.2-pro": {
198+
"max_input_tokens": 272000,
199+
"max_output_tokens": 128000,
200+
"image_inputs": True,
201+
"audio_inputs": False,
202+
"video_inputs": False,
203+
"image_outputs": False,
204+
"audio_outputs": False,
205+
"video_outputs": False,
206+
"reasoning_output": True,
207+
"tool_calling": True,
208+
"structured_output": True,
209+
"image_url_inputs": True,
210+
"pdf_inputs": True,
211+
"pdf_tool_message": True,
212+
"image_tool_message": True,
213+
"tool_choice": True,
214+
},
197215
"text-embedding-3-large": {
198216
"max_input_tokens": 8191,
199217
"max_output_tokens": 3072,
@@ -247,7 +265,7 @@
247265
"tool_choice": True,
248266
},
249267
"gpt-5.1-codex-mini": {
250-
"max_input_tokens": 400000,
268+
"max_input_tokens": 272000,
251269
"max_output_tokens": 128000,
252270
"image_inputs": True,
253271
"audio_inputs": False,
@@ -282,8 +300,26 @@
282300
"image_tool_message": True,
283301
"tool_choice": True,
284302
},
303+
"gpt-5.2-chat-latest": {
304+
"max_input_tokens": 272000,
305+
"max_output_tokens": 16384,
306+
"image_inputs": True,
307+
"audio_inputs": False,
308+
"video_inputs": False,
309+
"image_outputs": False,
310+
"audio_outputs": False,
311+
"video_outputs": False,
312+
"reasoning_output": True,
313+
"tool_calling": True,
314+
"structured_output": True,
315+
"image_url_inputs": True,
316+
"pdf_inputs": True,
317+
"pdf_tool_message": True,
318+
"image_tool_message": True,
319+
"tool_choice": True,
320+
},
285321
"gpt-5.1": {
286-
"max_input_tokens": 400000,
322+
"max_input_tokens": 272000,
287323
"max_output_tokens": 128000,
288324
"image_inputs": True,
289325
"audio_inputs": False,
@@ -317,7 +353,7 @@
317353
"tool_choice": True,
318354
},
319355
"gpt-5-nano": {
320-
"max_input_tokens": 400000,
356+
"max_input_tokens": 272000,
321357
"max_output_tokens": 128000,
322358
"image_inputs": True,
323359
"audio_inputs": False,
@@ -335,7 +371,7 @@
335371
"tool_choice": True,
336372
},
337373
"gpt-5-codex": {
338-
"max_input_tokens": 400000,
374+
"max_input_tokens": 272000,
339375
"max_output_tokens": 128000,
340376
"image_inputs": True,
341377
"audio_inputs": False,
@@ -425,7 +461,7 @@
425461
"tool_choice": True,
426462
},
427463
"gpt-5-mini": {
428-
"max_input_tokens": 400000,
464+
"max_input_tokens": 272000,
429465
"max_output_tokens": 128000,
430466
"image_inputs": True,
431467
"audio_inputs": False,
@@ -513,6 +549,24 @@
513549
"image_tool_message": True,
514550
"tool_choice": True,
515551
},
552+
"gpt-5.1-codex-max": {
553+
"max_input_tokens": 272000,
554+
"max_output_tokens": 128000,
555+
"image_inputs": True,
556+
"audio_inputs": False,
557+
"video_inputs": False,
558+
"image_outputs": False,
559+
"audio_outputs": False,
560+
"video_outputs": False,
561+
"reasoning_output": True,
562+
"tool_calling": True,
563+
"structured_output": True,
564+
"image_url_inputs": True,
565+
"pdf_inputs": True,
566+
"pdf_tool_message": True,
567+
"image_tool_message": True,
568+
"tool_choice": True,
569+
},
516570
"o3": {
517571
"max_input_tokens": 200000,
518572
"max_output_tokens": 100000,
@@ -549,7 +603,7 @@
549603
"tool_choice": True,
550604
},
551605
"gpt-5-chat-latest": {
552-
"max_input_tokens": 400000,
606+
"max_input_tokens": 272000,
553607
"max_output_tokens": 128000,
554608
"image_inputs": True,
555609
"audio_inputs": False,
@@ -585,7 +639,7 @@
585639
"tool_choice": True,
586640
},
587641
"gpt-5": {
588-
"max_input_tokens": 400000,
642+
"max_input_tokens": 272000,
589643
"max_output_tokens": 128000,
590644
"image_inputs": True,
591645
"audio_inputs": False,
@@ -603,7 +657,7 @@
603657
"tool_choice": True,
604658
},
605659
"gpt-5-pro": {
606-
"max_input_tokens": 400000,
660+
"max_input_tokens": 272000,
607661
"max_output_tokens": 272000,
608662
"image_inputs": True,
609663
"audio_inputs": False,
@@ -620,8 +674,25 @@
620674
"image_tool_message": True,
621675
"tool_choice": True,
622676
},
677+
"gpt-5.2": {
678+
"max_input_tokens": 272000,
679+
"max_output_tokens": 128000,
680+
"image_inputs": True,
681+
"audio_inputs": False,
682+
"video_inputs": False,
683+
"image_outputs": False,
684+
"audio_outputs": False,
685+
"video_outputs": False,
686+
"reasoning_output": True,
687+
"tool_calling": True,
688+
"image_url_inputs": True,
689+
"pdf_inputs": True,
690+
"pdf_tool_message": True,
691+
"image_tool_message": True,
692+
"tool_choice": True,
693+
},
623694
"gpt-5.1-chat-latest": {
624-
"max_input_tokens": 128000,
695+
"max_input_tokens": 272000,
625696
"max_output_tokens": 16384,
626697
"image_inputs": True,
627698
"audio_inputs": False,

β€Žlibs/partners/openai/langchain_openai/data/profile_augmentations.tomlβ€Ž

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,45 @@ image_url_inputs = false
1212
pdf_inputs = false
1313
pdf_tool_message = false
1414
image_tool_message = false
15+
16+
[overrides."gpt-5.1-codex"]
17+
max_input_tokens = 272000
18+
19+
[overrides."gpt-5.2-pro"]
20+
max_input_tokens = 272000
21+
22+
[overrides."gpt-5.1-codex-mini"]
23+
max_input_tokens = 272000
24+
25+
[overrides."gpt-5.2-chat-latest"]
26+
max_input_tokens = 272000
27+
28+
[overrides."gpt-5.1"]
29+
max_input_tokens = 272000
30+
31+
[overrides."gpt-5-nano"]
32+
max_input_tokens = 272000
33+
34+
[overrides."gpt-5-codex"]
35+
max_input_tokens = 272000
36+
37+
[overrides."gpt-5-mini"]
38+
max_input_tokens = 272000
39+
40+
[overrides."gpt-5.1-codex-max"]
41+
max_input_tokens = 272000
42+
43+
[overrides."gpt-5-chat-latest"]
44+
max_input_tokens = 272000
45+
46+
[overrides."gpt-5"]
47+
max_input_tokens = 272000
48+
49+
[overrides."gpt-5-pro"]
50+
max_input_tokens = 272000
51+
52+
[overrides."gpt-5.2"]
53+
max_input_tokens = 272000
54+
55+
[overrides."gpt-5.1-chat-latest"]
56+
max_input_tokens = 272000

β€Žlibs/partners/openai/pyproject.tomlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ license = { text = "MIT" }
99
readme = "README.md"
1010
authors = []
1111

12-
version = "1.1.5"
12+
version = "1.1.6"
1313
requires-python = ">=3.10.0,<4.0.0"
1414
dependencies = [
1515
"langchain-core>=1.2.2,<2.0.0",

β€Žlibs/partners/openai/tests/unit_tests/chat_models/test_base.pyβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ def test_profile() -> None:
145145
model = ChatOpenAI(model="gpt-5", profile={"tool_calling": False})
146146
assert model.profile == {"tool_calling": False}
147147

148+
# Test overrides for gpt-5 input tokens
149+
model = ChatOpenAI(model="gpt-5")
150+
assert model.profile["max_input_tokens"] == 272_000
151+
148152

149153
def test_openai_o1_temperature() -> None:
150154
llm = ChatOpenAI(model="o1-preview")

β€Žlibs/partners/openai/uv.lockβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žlibs/partners/xai/uv.lockβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
Β (0)