1111
1212__all__ = [
1313 'ModelConf' , 'ServiceConf' , 'LLMsConfig' ,
14- 'OPENAI_DRIVER_NAME' , 'LITELLM_DRIVER_NAME' ,
14+ 'OPENAI_DRIVER_NAME' , 'LITELLM_DRIVER_NAME' , 'DEEPSEEK_DRIVER_NAME' ,
1515]
1616
1717OPENAI_DRIVER_NAME = "openai_driver"
1818"""default llm driver name for OpenAI llm message protocol """
1919
2020LITELLM_DRIVER_NAME = "lite_llm_driver"
2121
22+ DEEPSEEK_DRIVER_NAME = "deepseek_driver"
23+
2224
2325class Reasonable (BaseModel ):
2426 """
@@ -28,6 +30,10 @@ class Reasonable(BaseModel):
2830 "medium" ,
2931 description = "reasoning effort level" ,
3032 )
33+ max_completion_tokens : Optional [int ] = Field (
34+ None ,
35+ description = "max completion tokens" ,
36+ )
3137
3238
3339class ModelConf (Payload ):
@@ -46,17 +52,19 @@ class ModelConf(Payload):
4652 request_timeout : float = Field (default = 40 , description = "request timeout" )
4753 kwargs : Dict [str , Any ] = Field (default_factory = dict , description = "kwargs" )
4854 use_tools : bool = Field (default = True , description = "use tools" )
49- max_completion_tokens : Optional [int ] = Field (
50- None ,
51- description = "max completion tokens" ,
52- )
55+
5356 message_types : Optional [List [str ]] = Field (None , description = "model allow message types" )
5457 allow_streaming : bool = Field (True , description = "if the current model allow streaming" )
5558 reasoning : Optional [Reasonable ] = Field (
5659 default = None ,
5760 description = "reasoning configuration" ,
5861 )
5962
63+ compatible : Optional [Compatible ] = Field (
64+ default = None ,
65+ description = "the model api compatible configuration" ,
66+ )
67+
6068 payloads : Dict [str , Dict ] = Field (
6169 default_factory = dict ,
6270 description = "custom payload objects. save strong typed but optional dict."
@@ -67,6 +75,7 @@ class ModelConf(Payload):
6775class Compatible (BaseModel ):
6876 use_developer_role : bool = Field (default = False , description = "use developer role instead of system" )
6977 allow_system_in_messages : bool = Field (default = True , description = "allow system messages in history" )
78+ allow_system_message : bool = Field (default = True , description = "support system message or not" )
7079
7180
7281class Azure (BaseModel ):
@@ -93,8 +102,8 @@ class ServiceConf(BaseModel):
93102 description = "the adapter driver name of this service. change it only if you know what you are doing" ,
94103 )
95104
96- compatible : Compatible = Field (
97- default_factory = Compatible ,
105+ compatible : Optional [ Compatible ] = Field (
106+ default = None ,
98107 description = "the model api compatible configuration" ,
99108 )
100109
0 commit comments