Skip to content

Translated to ENG#1

Open
indicatorspro wants to merge 28 commits into
danscMax:mainfrom
indicatorspro:main
Open

Translated to ENG#1
indicatorspro wants to merge 28 commits into
danscMax:mainfrom
indicatorspro:main

Conversation

@indicatorspro

Copy link
Copy Markdown

Translated to ENG

AkioKoneko and others added 28 commits June 11, 2026 12:31
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
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants