feat: sync deployed v1.0.0-rc.38-custom.42
Sync production source including routing, billing, Astra detection and public uptime. Update custom build instructions and license packaging.
This commit is contained in:
1 parent
aa6c3f50f4
commit
ceddfd3d6b
828 files changed
+122253
-13702
No files matched your search
@@ -0,0 +1,31 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
relaycommon "github.com/QuantumNous/new-api/relay/common"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestResolveAttemptGuardResultForDetectionOnly(t *testing.T) {
|
||||
t.Run("matching declaration is verified", func(t *testing.T) {
|
||||
info := &relaycommon.RelayInfo{ResponseModel: &relaycommon.ResponseModel{
|
||||
RequestedModel: "gpt-6-astra",
|
||||
ReturnedModel: "gpt-6-astra",
|
||||
}}
|
||||
require.Equal(t, "accepted", resolveAttemptGuardResult("", info))
|
||||
})
|
||||
|
||||
t.Run("missing declaration remains unchecked", func(t *testing.T) {
|
||||
require.Equal(t, "unchecked", resolveAttemptGuardResult("", &relaycommon.RelayInfo{}))
|
||||
})
|
||||
|
||||
t.Run("allowed mismatch remains visible", func(t *testing.T) {
|
||||
info := &relaycommon.RelayInfo{ResponseModel: &relaycommon.ResponseModel{
|
||||
RequestedModel: "gpt-6-astra",
|
||||
ReturnedModel: "gpt-5.6-luna",
|
||||
Mismatch: true,
|
||||
}}
|
||||
require.Equal(t, "mismatch_allowed", resolveAttemptGuardResult("", info))
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user