Auto-Coder常用秘籍 autocoder.chat启动之后的处理

Auto-Coder手册:‍‌​​⁠​‍​‍‍‌‍‍⁠​​‬‌​​‬​‍⁠‬⁠⁠​​​‍​‌‬​​​‌‬‬⁠‍‌​‌​Auto-Coder.Chat: 通向智能编程之路 - 飞书云文档

控制窗口大小与压缩上下文

看到这篇文档里讲过:https://skywalk.blog.csdn.net/article/details/149067759

复制代码
/conf context_prune_safe_zone_tokens:30720
# /conf index_filter_model_max_input_length:30720
/conf index_filter_model_max_input_length:24576
/conf conversation_prune_safe_zone_tokens:24576

当时手里的模型token只有32k,所以三个参数都针对默认值进行了下调,下面为配置参数和默认值:

conversation_prune_safe_zone_tokens 上下文剪枝 51200

conversation_prune_safe_zone_tokens 索引文件建议51200

context_prune_safe_zone_tokens 单文件 24576

配置示例

64k窗口模型

复制代码
/conf conversation_prune_safe_zone_tokens:51200
/conf index_filter_model_max_input_length:51200
/conf context_prune_safe_zone_tokens:24576

128k窗口模型

对于token 窗口是128k的模型,可以选择翻一倍,即:

复制代码
/conf conversation_prune_safe_zone_tokens:102400
/conf index_filter_model_max_input_length:102400
/conf context_prune_safe_zone_tokens:49152

三个配置参数详解

conversation_prune_safe_zone_tokens

如果上下文过长,会触发剪枝动作。具体长度通过

/conf conversation_prune_safe_zone_tokens:51200

默认值为: 51200。 如果是 gemini 2.5 或者 quasar 等窗口很长的模型(code_model,chat_model,model),可以再翻一倍。

index_filter_model_max_input_length

索引文件很大(具体通过 index_filter_model_max_input_length) 来的判断是不是要分割处理。

/conf index_filter_model_max_input_length:51200

默认:51200 。 如果是窗口很大的的模型(index_model,model),可以试着至少提升一倍。

context_prune_safe_zone_tokens

配置单文件剪枝阈值

/conf context_prune_safe_zone_tokens:24576

碰到的问题

不过我也碰到了设置之后还是撑满的情况:

复制代码
conversation tokens: 180560 -> 101349 (conversation round: 352)
╭─ 🔥 Error ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Error: Connection failed. Error: r code: 400 - {'object': 'error', 'message': "This model's maximum context length is 131072 tokens. However, you │
│ requested 144864 tokens (136768 in the messages, 8096 in the completion). Please reduce the length of the messages or completion.", 'type':       │
│ 'BadRequestError', 'param': None, 'code': 400}    

所以我只能/auto /new 一下重新运行

相关推荐
阿里云大数据AI技术1 小时前
光轮智能 × 阿里云:共建 Physical AI 云上数据、评测与持续学习基础设施
人工智能·机器学习
机器之心1 小时前
实锤了:Claude Code偷查用户,时区、中国AI实验室全是关键词
人工智能·openai
网易云信1 小时前
Cursor点燃个人开发者,企业级AI为何频频受挫?Agent工厂从提效工具到AI员工的跃迁
人工智能·开源
网易云信2 小时前
解锁触手可及的温暖:网易智企 x Wander Puffs AI 云游泡芙
人工智能
转转技术团队2 小时前
从 PRD 到可验证代码:AI 需求开发闭环实践
人工智能
机器之心2 小时前
飞书让表格变成「AI同事」加入群聊,不打开表就能用表
人工智能·openai
Bigfish_coding2 小时前
前端转agent-【python】-15 AI Agent 可观测性入门:LangFuse 链路追踪、Token 监控与 LLM 质量评估
人工智能
我唔知啊3 小时前
我把 Claude Code 拆成了一间餐厅:从一句话到一次回复,中间到底发生了什么
人工智能
Harry技术3 小时前
02 · Codex 核心概念:代理、沙箱、审批和项目说明书
人工智能