fix: add configurable MAX_OUTPUT_TOKENS to prevent truncation (#251)

- Add MAX_OUTPUT_TOKENS env var (fixes output truncation with Bedrock)
- Remove redundant fixToolCallInputs function
- Remove jsonrepair dependency
- Consolidate duplicate lastMessage/userInputText variables
This commit is contained in:
Dayuan Jiang
2025-12-13 23:28:41 +09:00
committed by GitHub
parent 6024443816
commit 987dc9f026
4 changed files with 98 additions and 124 deletions

View File

@@ -63,7 +63,7 @@ interface ChatPanelProps {
// Constants for tool states
const TOOL_ERROR_STATE = "output-error" as const
const DEBUG = process.env.NODE_ENV === "development"
const MAX_AUTO_RETRY_COUNT = 3
const MAX_AUTO_RETRY_COUNT = 1
/**
* Check if auto-resubmit should happen based on tool errors.