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:
parent
f440047263
commit
5927ecc394
1 changed files with 4 additions and 0 deletions
|
|
@ -111,6 +111,10 @@ var (
|
||||||
substr("tool_use_id"),
|
substr("tool_use_id"),
|
||||||
substr("messages.1.content.1.tool_use.id"),
|
substr("messages.1.content.1.tool_use.id"),
|
||||||
substr("invalid request format"),
|
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{
|
contextOverflowPatterns = []errorPattern{
|
||||||
rxp(`context[_ ]?length[_ ]?exceeded`),
|
rxp(`context[_ ]?length[_ ]?exceeded`),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue