fix: agent-level retry for intermittent SSL errors during streaming
- llmcore: prefix all error outputs with !!! marker - ga: detect !!!Error: [SSL: in tail of content as incomplete response and retry - add len(content)>100 guard to avoid false positives on short responses
This commit is contained in:
2
ga.py
2
ga.py
@@ -444,7 +444,7 @@ class GenericAgentHandler(BaseHandler):
|
||||
if not response or not content.strip():
|
||||
yield "[Warn] LLM returned an empty response. Retrying...\n"
|
||||
return StepOutcome({}, next_prompt="[System] Blank response, regenerate and tooluse")
|
||||
if '未收到完整响应 !!!]' in content[-100:]:
|
||||
if len(content) > 100 and ('未收到完整响应 !!!]' in content[-100:] or '!!!Error: [SSL:' in content[-100:]):
|
||||
return StepOutcome({}, next_prompt="[System] Incomplete response. Regenerate and tooluse.")
|
||||
if 'max_tokens !!!]' in content[-100:]:
|
||||
return StepOutcome({}, next_prompt="[System] max_tokens limit reached. Use multi small steps to do it.")
|
||||
|
||||
Reference in New Issue
Block a user