fix: add reserveTokensFloor suggestion to compaction error messages
When context limit is exceeded, the error message now suggests setting agents.defaults.compaction.reserveTokensFloor to 4000 or higher to prevent future occurrences.
This commit is contained in:
parent
0e94f0c018
commit
c290217305
@ -451,7 +451,7 @@ export async function runAgentTurnWithFallback(params: {
|
||||
return {
|
||||
kind: "final",
|
||||
payload: {
|
||||
text: "⚠️ Context limit exceeded. I've reset our conversation to start fresh - please try again.",
|
||||
text: "⚠️ Context limit exceeded. I've reset our conversation to start fresh - please try again.\n\nTo prevent this, increase your compaction buffer by setting `agents.defaults.compaction.reserveTokensFloor` to 4000 or higher in your config.",
|
||||
},
|
||||
};
|
||||
}
|
||||
@ -490,7 +490,7 @@ export async function runAgentTurnWithFallback(params: {
|
||||
return {
|
||||
kind: "final",
|
||||
payload: {
|
||||
text: "⚠️ Context limit exceeded during compaction. I've reset our conversation to start fresh - please try again.",
|
||||
text: "⚠️ Context limit exceeded during compaction. I've reset our conversation to start fresh - please try again.\n\nTo prevent this, increase your compaction buffer by setting `agents.defaults.compaction.reserveTokensFloor` to 4000 or higher in your config.",
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user