fix: quarantine unavailable upstream routes and harden upgrades
This commit is contained in:
1 parent
9acc69d4c7
commit
59907cebdf
8 files changed
+424
-3
No files matched your search
+7
@@ -35,6 +35,13 @@ class ProviderErrorClassificationTest {
|
||||
assertEquals("上游渠道没有可用的模型路由", error.getMessage());
|
||||
}
|
||||
|
||||
@Test
|
||||
void classifiesChineseMissingChannelErrors() {
|
||||
var error = OpenAiCompatibleProvider.classifyUpstreamError(502, "分组 default 下模型 claude-fable-5 的可用渠道不存在(retry)");
|
||||
assertEquals("UPSTREAM_MODEL_UNAVAILABLE", error.getCode());
|
||||
assertEquals(502, error.getStatus());
|
||||
}
|
||||
|
||||
@Test
|
||||
void classifiesErrorEnvelopeReturnedWithHttp200() {
|
||||
var error = OpenAiCompatibleProvider.classifyUpstreamError(200, "{\"error\":{\"code\":\"invalid_api_key\",\"message\":\"unauthorized\"}}");
|
||||
|
||||
Reference in new issue
Block a user