@@ -25,7 +25,10 @@ static ModelInfo()
25
25
// https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb
26
26
s_modelMap = new ( StringComparer . OrdinalIgnoreCase )
27
27
{
28
- [ "o1" ] = new ( tokenLimit : 200_000 , encoding : Gpt4oEncoding ) ,
28
+ [ "o1" ] = new ( tokenLimit : 200_000 , encoding : Gpt4oEncoding , reasoning : true ) ,
29
+ [ "o3" ] = new ( tokenLimit : 200_000 , encoding : Gpt4oEncoding , reasoning : true ) ,
30
+ [ "o4-mini" ] = new ( tokenLimit : 200_000 , encoding : Gpt4oEncoding , reasoning : true ) ,
31
+ [ "gpt-4.1" ] = new ( tokenLimit : 1_047_576 , encoding : Gpt4oEncoding ) ,
29
32
[ "gpt-4o" ] = new ( tokenLimit : 128_000 , encoding : Gpt4oEncoding ) ,
30
33
[ "gpt-4" ] = new ( tokenLimit : 8_192 ) ,
31
34
[ "gpt-4-32k" ] = new ( tokenLimit : 32_768 ) ,
@@ -45,7 +48,7 @@ static ModelInfo()
45
48
} ;
46
49
}
47
50
48
- private ModelInfo ( int tokenLimit , string encoding = null )
51
+ private ModelInfo ( int tokenLimit , string encoding = null , bool reasoning = false )
49
52
{
50
53
TokenLimit = tokenLimit ;
51
54
_encodingName = encoding ?? Gpt34Encoding ;
@@ -54,6 +57,7 @@ private ModelInfo(int tokenLimit, string encoding = null)
54
57
// See https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb
55
58
TokensPerMessage = 3 ;
56
59
TokensPerName = 1 ;
60
+ Reasoning = reasoning ;
57
61
}
58
62
59
63
private readonly string _encodingName ;
@@ -62,6 +66,7 @@ private ModelInfo(int tokenLimit, string encoding = null)
62
66
internal int TokenLimit { get ; }
63
67
internal int TokensPerMessage { get ; }
64
68
internal int TokensPerName { get ; }
69
+ internal bool Reasoning { get ; }
65
70
internal Tokenizer Encoding
66
71
{
67
72
get {
0 commit comments