Translated to ENG#1
Open
indicatorspro wants to merge 28 commits into
Open
Conversation
fix(server): honor Retry-After on 429 + abort cross-account auto-continuation
docs: add .env.example documenting configuration
…gment-parser fix: parse DeepSeek search fragments without 502
Detect when the latest user message is exactly "/new" (trimmed) and short-circuit the request to reset that agent's session instead of forwarding it to DeepSeek. - Reuses the existing createSession()/sessions map used by the /reset-session endpoint, so behavior stays consistent - Returns a confirmation reply via buildTextResponse(), respecting the active API mode (OpenAI, Anthropic, Responses) and streaming vs non-streaming - No DeepSeek API call is made for the /new turn itself - Per-agent: only resets the session for the requesting agentId, not all sessions Mounted via docker-compose volume override so the patch survives container rebuilds without modifying the Dockerfile.
feat: add /new command to reset agent chat session
…extract.js, restore auth.js CLI features
…anded tests, security hardening
… markdown/bash instead of tool_call JSON
…izes, compaction survival)
…ncrease limits - Separate tool definitions from system prompt so they survive compaction - Add per-agent tool cache for clients that only send tools in first request - Increase MAX_UPSTREAM_PROMPT_CHARS from 80K to 500K (12.5% of 1M token limit) - Increase REQUEST_DEADLINE_MS from 120s to 180s - Limit tool definitions to 60 tools with 200-char descriptions - Always use compact schema for >30 tools - Fix const->let bug in tool caching
…mpatibility The DeepSeek Web API has a lower context limit than the model itself. 200K chars is a safe limit that avoids context_length_exceeded errors while still allowing long multi-turn conversations with tool calls.
- Unknown tool calls now pass through to client instead of being rejected - Reduces unnecessary retries and session resets - Allows clients like Hermes to handle tools the server doesn't know about
- Remove confusing 'ONLY REASONS and REQUESTS tool executions' instruction - Add clear guidance on which tool to use for each task type - Add instruction to analyze tool results and respond to user - Prevents model from using execute_code as security reviewer when it should use terminal
- Add specific examples for each tool type (terminal, read_file, edit_file) - Add explicit WRONG examples to prevent common mistakes - Simplify rules to 3 clear rules - Prevents model from generating XML/DSML/code fences
- Add repairJson() to fix malformed JSON (trailing commas, missing braces) - Add session persistence (save/load sessions to disk) - Merge tools from multiple requests instead of replacing - Sessions saved every 5 minutes and after each request - Sessions loaded on startup for continuity
…koff - REQUEST_DEADLINE_MS increased from 300s to 600s for complex tasks - Added retry logic with exponential backoff for 502 errors (DeepSeek server overload) - Max 3 retries with delays: 2s, 4s, 8s (capped at 30s) - Better logging for 502 retry attempts - All 41 unit tests passing
- DS_FETCH_TIMEOUT_MS increased from 60s to 180s - Prevents 'The operation was aborted due to timeout' on large prompts - REQUEST_DEADLINE_MS remains at 600s for overall request budget - 502 retry with exponential backoff already in place
Shows all tool names received from client for debugging
When set, deletes sessions.json on server start for fresh conversations. Useful for development/testing when you want clean context each restart.
Automatically loads .env file at startup. Variables already set in the environment take precedence over .env values. Supports comments (#) and quoted values.
Set DEEPSEEK_LOG_TOOLS=1 in .env to enable tool name logging for debugging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Translated to ENG