feat: add New API channel support

This commit is contained in:
CaIon
2026-07-27 15:20:19 +08:00
parent bc14c18f60
commit 398cdafecf
21 changed files with 408 additions and 128 deletions
+2 -3
View File
@@ -271,11 +271,10 @@ func testChannel(ctx context.Context, channel *model.Channel, testUserID int, te
apiType, _ := common.ChannelType2APIType(channel.Type)
if info.RelayMode == relayconstant.RelayModeResponsesCompact &&
apiType != constant.APITypeOpenAI &&
apiType != constant.APITypeCodex {
!common.IsResponsesCompactAPIType(apiType) {
return testResult{
context: c,
localErr: fmt.Errorf("responses compaction test only supports openai/codex channels, got api type %d", apiType),
localErr: fmt.Errorf("responses compaction test is not supported for api type %d", apiType),
newAPIError: types.NewError(fmt.Errorf("unsupported api type: %d", apiType), types.ErrorCodeInvalidApiType),
}
}