Skip to content
← Back to Resources

LLM 连接健康状态

了解 Saymail LLM 连接断开的原因以及如何重新连接。

What is a disconnected connection?

Saymail monitors the health of your LLM connections during email classification. When a connection fails 3 times in a row, Saymail marks it as disconnected and skips it in future classification rounds.

This prevents Saymail from repeatedly hitting an unresponsive service, which would slow down classification of your other emails.

Common causes

Network and service issues

  • API key expired or invalid — Your LLM provider deactivated the key or your credit ran out.
  • Service unreachable — The LLM provider is down, or your network is blocking the request.
  • Timeout — The request took longer than 5 minutes and was aborted.
  • Local model stopped — If you use Ollama or another local model, the process may no longer be running.

Prompt issues

  • Custom prompt produces invalid JSON — If you customized the classification prompt, the model may produce output that Saymail cannot parse. Invalid JSON responses count as failures.
  • System prompt too long — Some models truncate the response when input is too large, resulting in incomplete JSON.

How to reconnect

  1. Open the LLM Connections panel (via the command palette or menu).
  2. Disconnected connections appear with a red dot, dimmed text, and a “Disconnected” label.
  3. Click the Reconnect button next to the disconnected connection.
  4. Saymail tests the connection. On success, the connection is revived and included in classification again.
  5. If the test fails, check your API key, network, or local model status and try again.

If the problem is your prompt

  1. Open the LLM Prompts panel.
  2. Review your custom prompt. The LLM must return valid JSON with the fields Saymail expects.
  3. Test with the default prompt to verify the connection itself works.
  4. Adjust your prompt and reconnect.

Good to know

  • Disconnected connections automatically reset when you restart the app.
  • The classification task runs every 15 minutes. If all connections are disconnected, the task skips the round without errors.
  • Higher-priority connections are tried first. If connection #1 is disconnected, Saymail tries connection #2, and so on.