inference: support reasoning effort for openrouter
This commit is contained in:
1 parent
5b75d95a8c
commit
bdd7f89663
2 files changed
+17
-2
No files matched your search
@@ -353,6 +353,14 @@ async def openrouter_chat_completion(app, messages, model, tools=[], opts={}, ag
|
||||
if formatted_tools:
|
||||
kwargs['tools'] = formatted_tools
|
||||
|
||||
temp = agent_run.input.get("temperature")
|
||||
if temp is not None:
|
||||
kwargs['temperature'] = temp
|
||||
|
||||
reasoning = agent_run.input.get("reasoning_effort")
|
||||
if reasoning is not None:
|
||||
kwargs['reasoning'] = {"effort": reasoning}
|
||||
|
||||
stream_response = await app.openrouter_client.chat.send_async(**kwargs)
|
||||
|
||||
# OpenAI format streams tool calls in parts
|
||||
|
||||
Reference in new issue
Block a user