Fix NameError: _effective_mode not defined (500 on chat_stream) #935
No reviewers
Labels
No labels
area:chat
area:core
area:llm
area:routes
area:tools
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
refactor
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sleepy/odysseus!935
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/effective-mode-undefined"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Root Cause
The long-context agent split
stream.py→stream_generator.pybut_effective_modewas a closure variable from the outer scope. After the split, it was no longer in scope whenstream_with_save()executed at runtime.Fix
_effective_mode: strparameter torun_stream()instream_generator.py_effective_mode=_effective_modefromstream.pywhere it is computedTesting
Fixes the 500 error on every chat message send.