Skip to content

Commit 2bbe91f

Browse files
committed
feat: enhance model initialization with additional keyword arguments allowing more customization
1 parent 2e75b58 commit 2bbe91f

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

agents/matmaster_agent/llm_config.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,17 @@ def __init__(self):
7878
gpt_5_chat = 'gpt-5-chat'
7979

8080
# Helper to init any provider model
81-
def _init_model(provider_key: str, model_name: str):
81+
def _init_model(
82+
provider_key: str,
83+
model_name: str,
84+
**kwargs,
85+
):
86+
llm_kwargs = {'stream_options': {'include_usage': True}}
87+
if kwargs:
88+
llm_kwargs.update(kwargs)
8289
return LiteLlm(
83-
model=MODEL_MAPPING.get((provider_key, model_name), DEFAULT_MODEL)
90+
model=MODEL_MAPPING.get((provider_key, model_name), DEFAULT_MODEL),
91+
**llm_kwargs,
8492
)
8593

8694
self.gpt_4o_mini = _init_model(azure_provider, gpt_4o_mini)

0 commit comments

Comments
 (0)