File tree Expand file tree Collapse file tree
wren-ai-service/src/providers/llm Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,16 +99,16 @@ async def _run(
9999 ** (generation_kwargs or {}),
100100 }
101101
102- allowed_params = (
103- [ "reasoning_effort" ] if self . _model . startswith ( "gpt-5" ) else None
104- )
102+ allowed_openai_params = generation_kwargs . get (
103+ "allowed_openai_params" , []
104+ ) + ([ "reasoning_effort" ] if self . _model . startswith ( "gpt-5" ) else [])
105105
106106 if self ._has_fallbacks :
107107 completion = await self ._router .acompletion (
108108 model = self ._model ,
109109 messages = openai_formatted_messages ,
110110 stream = streaming_callback is not None ,
111- allowed_openai_params = allowed_params ,
111+ allowed_openai_params = allowed_openai_params ,
112112 mock_testing_fallbacks = self ._enable_fallback_testing ,
113113 ** generation_kwargs ,
114114 )
@@ -121,7 +121,7 @@ async def _run(
121121 timeout = self ._timeout ,
122122 messages = openai_formatted_messages ,
123123 stream = streaming_callback is not None ,
124- allowed_openai_params = allowed_params ,
124+ allowed_openai_params = allowed_openai_params ,
125125 ** generation_kwargs ,
126126 )
127127
You can’t perform that action at this time.
0 commit comments