fix(backend): handle reasoning event correctly
This commit is contained in:
1 parent
11b5c4e69f
commit
143bca8a8b
2 files changed
+16
-2
No files matched your search
@@ -318,7 +318,7 @@ async def openrouter_chat_completion(app, messages, model, tools=[], opts={}, ag
|
||||
if name == 'reasoning':
|
||||
if reasoning_stream == None:
|
||||
reasoning_stream = Stream(app)
|
||||
agent_run.emit_event('output', reasoning_stream)
|
||||
agent_run.emit_event('reasoning', reasoning_stream)
|
||||
reasoning_stream.feed(value)
|
||||
if name == 'tool-call':
|
||||
agent_run.emit_event('tool-call', value)
|
||||
|
||||
Reference in new issue
Block a user