ulysses/src
nsgds 5645cce6d0
Support vLLM 0.20.2 / NIM reasoning-parser output end-to-end (surface + agent context + render) (#602)
* fix(stream): read 'reasoning' SSE field for vLLM 0.20.2 / NIM

vLLM 0.20.2 / NVIDIA NIM emit reasoning-parser output in the `reasoning` delta field; older builds use `reasoning_content`. stream_llm() read only the latter, so reasoning from models like Nemotron-3-Nano (--reasoning-parser) was silently dropped and never rendered. Accept either field.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent): keep reasoning_content only on the latest assistant turn

The agent loop echoed each round's reasoning back as `reasoning_content` on every assistant turn, assuming vendors ignore it. Nemotron's chat template re-injects ALL prior reasoning_content as <think> blocks, and the loop is trimmed only once (before it starts) — so reasoning accumulated unbounded across rounds, bloating context and feeding the model its own prior reasoning, which reinforced repetition/looping. Strip reasoning_content from earlier assistant turns so only the most recent round carries it (still satisfies DeepSeek's thinking-mode follow-up requirement).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-ui): wrap each round's reasoning in its own <think> block

The streamed think-tag wrapper gated on whole-message substring checks (accumulated.includes('<think>')), which only ever wrapped ONE reasoning block per message. A multi-round agent response has a reasoning phase per round, so once round 1 closed its <think>...</think>, rounds 2+ reasoning was emitted unwrapped and leaked into the visible answer. Replace the substring checks with a stateful open/close flag that toggles per think/answer cycle, so each round's reasoning gets its own collapsible block. Single-turn chat is unchanged (one open, one close).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(stream): reasoning/reasoning_content delta surfaces as thinking chunk

Covers @pewdiepie-archdaemon's requested regression: a streamed {reasoning: ...} delta emits a thinking chunk while {content: ...} streams as normal content; plus the older reasoning_content field for backward compat. Mirrors the #591 scenario.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 11:48:17 +09:00
..
search fix: source thumbnails dropped for http-only og:image URLs (#667) 2026-06-02 11:41:33 +09:00
action_intents.py Route calendar action requests to tools 2026-06-01 14:32:41 +09:00
agent_loop.py Support vLLM 0.20.2 / NIM reasoning-parser output end-to-end (surface + agent context + render) (#602) 2026-06-02 11:48:17 +09:00
agent_runs.py Handle incomplete detached agent streams 2026-06-01 16:54:11 +09:00
agent_tools.py Add SSRF-guarded web fetch agent tool 2026-06-01 16:57:28 +09:00
ai_interaction.py feat(ai): add OpenRouter and Ollama Cloud providers (#231) 2026-06-01 14:26:10 +09:00
api_key_manager.py Add native Windows compatibility layer 2026-06-01 15:09:47 +09:00
app_helpers.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
app_initializer.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
assistant_log.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
auth_helpers.py Attribute API-token sessions to the token owner (effective_user) (#871) 2026-06-02 11:39:01 +09:00
bg_jobs.py chore: use explicit utf-8 for shell job files (#820) 2026-06-02 11:12:13 +09:00
bg_monitor.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
builtin_actions.py fix(skills): scope skill reads to caller owner (#777) 2026-06-02 11:21:27 +09:00
builtin_mcp.py Add native Windows compatibility layer 2026-06-01 15:09:47 +09:00
caldav_sync.py Fix duplicate CalDAV sync UIDs 2026-06-01 02:17:43 +00:00
chat_handler.py Enforce owner checks for upload attachments 2026-06-01 16:47:48 +09:00
chat_helpers.py Recognize local vision models so their images aren't dropped (#185) 2026-06-01 13:09:21 +09:00
chat_processor.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
chroma_client.py fix: ChromaDB unreachable blocks app startup for 30-60s (#326) (#476) 2026-06-01 22:22:41 +09:00
cleanup_service.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
config.py Add native Windows compatibility layer 2026-06-01 15:09:47 +09:00
constants.py Align SearXNG fallback URL 2026-06-01 10:50:07 +09:00
context_compactor.py Preserve system messages during context compaction 2026-06-01 23:10:58 +09:00
database.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
deep_research.py Add Deep Research extraction controls 2026-06-01 14:55:33 +09:00
document_actions.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
document_processor.py Add optional markitdown extraction for Office/EPUB documents (#766) 2026-06-02 11:28:52 +09:00
email_thread_parser.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
embeddings.py Add native Windows compatibility layer 2026-06-01 15:09:47 +09:00
endpoint_resolver.py Provider detection: match by hostname instead of substring (re #768) (#815) 2026-06-02 11:11:17 +09:00
event_bus.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
exceptions.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
goal_based_extractor.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
integrations.py Secure by default uplift (#511) 2026-06-01 22:30:07 +09:00
llm_core.py Support vLLM 0.20.2 / NIM reasoning-parser output end-to-end (surface + agent context + render) (#602) 2026-06-02 11:48:17 +09:00
markitdown_runtime.py Add optional markitdown extraction for Office/EPUB documents (#766) 2026-06-02 11:28:52 +09:00
mcp_manager.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
memory.py Fix AttributeError on bullet lines in extract_memory_from_chat (#873) 2026-06-02 11:46:06 +09:00
memory_vector.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
model_context.py Refresh local model context after restart 2026-06-02 05:54:06 +09:00
model_discovery.py Improve Ollama setup and model endpoint handling 2026-06-01 10:00:15 +09:00
pdf_form_doc.py Harden PDF document markers against cross-owner upload access (#445) 2026-06-01 22:38:14 +09:00
pdf_forms.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
pdf_runtime.py Show a clear message when PyMuPDF is missing 2026-06-01 18:27:17 +09:00
personal_docs.py Add optional markitdown extraction for Office/EPUB documents (#766) 2026-06-02 11:28:52 +09:00
preset_manager.py Add native Windows compatibility layer 2026-06-01 15:09:47 +09:00
prompt_security.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
rag_manager.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
rag_singleton.py Re-enable VectorRAG init with lazy retry 2026-06-01 14:32:13 +09:00
rag_vector.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
rate_limiter.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
request_models.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
research_handler.py Deep research: don't treat a bare 'yes' as the research topic (#858) 2026-06-02 11:30:53 +09:00
research_utils.py fix: deep research discards valid sources mentioning cookies/copyright (#481) 2026-06-01 22:26:37 +09:00
secret_storage.py Add native Windows compatibility layer 2026-06-01 15:09:47 +09:00
session_actions.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
settings.py Apply SafeSearch by default across search providers (#763) 2026-06-02 11:34:32 +09:00
settings_scrub.py Deep-scrub secrets from public settings 2026-06-01 23:11:50 +09:00
task_endpoint.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
task_scheduler.py fix(scheduler): push next_run forward on startup to stop restart double-fire (#708) 2026-06-02 11:43:30 +09:00
teacher_escalation.py harden(teacher): treat escalation trace as untrusted data (#275) 2026-06-01 14:31:39 +09:00
text_helpers.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
tool_execution.py Expand ~ in read_file and write_file paths (#781) 2026-06-02 11:45:21 +09:00
tool_implementations.py Expose manage_notes via native function calling (#759) 2026-06-02 11:33:32 +09:00
tool_index.py Add SSRF-guarded web fetch agent tool 2026-06-01 16:57:28 +09:00
tool_parsing.py Add SSRF-guarded web fetch agent tool 2026-06-01 16:57:28 +09:00
tool_schemas.py Expose manage_notes via native function calling (#759) 2026-06-02 11:33:32 +09:00
tool_security.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
topic_analyzer.py fix: topic analysis false-matches keywords as substrings (e.g. 'ai' in 'email') (#687) 2026-06-02 11:42:04 +09:00
upload_handler.py Add optional markitdown extraction for Office/EPUB documents (#766) 2026-06-02 11:28:52 +09:00
visual_report.py Fix visual report chapter navigation (#505) 2026-06-01 22:26:13 +09:00
webhook_manager.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
youtube_handler.py Odysseus v1.0 2026-05-31 23:58:26 +09:00