mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-11 01:34:45 +08:00
* fix: apply context compression to prevent token overflow (Issue #721) - Add token_limit configuration to conf.yaml.example for BASIC_MODEL and REASONING_MODEL - Implement context compression in _execute_agent_step() before agent invocation - Preserve first 3 messages (system prompt + context) during compression - Enhance ContextManager logging with better token count reporting - Prevent 400 Input tokens exceeded errors by automatically compressing message history * feat: add model-based token limit inference for Issue #721 - Add smart default token limits based on common LLM models - Support model name inference when token_limit not explicitly configured - Models include: OpenAI (GPT-4o, GPT-4, etc.), Claude, Gemini, Doubao, DeepSeek, etc. - Conservative defaults prevent token overflow even without explicit configuration - Priority: explicit config > model inference > safe default (100,000 tokens) - Ensures Issue #721 protection for all users, not just those with token_limit set