fix(providers): add Zhipu API error code 1210 to format error patterns

This fixes issue #2943 where WeChat channel image requests to Zhipu
GLM-5-Turbo vision API failed with error code 1210 (parameter error)
without triggering the fallback mechanism.

Changes:
- Added error code 1210 pattern matching to formatPatterns
- This allows the fallback mechanism to recognize Zhipu API parameter
  errors and fall back to alternative vision models

Closes #2943
This commit is contained in:
yuxuan-7814
2026-06-02 17:26:14 +08:00
parent f440047263
commit 5927ecc394
+4
View File
@@ -111,6 +111,10 @@ var (
substr("tool_use_id"),
substr("messages.1.content.1.tool_use.id"),
substr("invalid request format"),
// Zhipu API error code 1210: parameter error (e.g., image format incompatible)
substr("error code: 1210"),
substr("error code 1210"),
substr("zhipu api error code: 1210"),
}
contextOverflowPatterns = []errorPattern{
rxp(`context[_ ]?length[_ ]?exceeded`),