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
@@ -2,6 +2,7 @@ package controller
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
"testing"
|
||||
@@ -43,3 +44,20 @@ func TestClientFacingErrorKeepsLocalValidationMessage(t *testing.T) {
|
||||
t.Fatalf("local validation message was hidden: %q", got.Message)
|
||||
}
|
||||
}
|
||||
|
||||
func TestClientFacingResponseGuardErrorNamesDeclaredModel(t *testing.T) {
|
||||
err := types.NewErrorWithStatusCode(
|
||||
errors.New("Requested model gpt-6-astra, but the upstream response declared gpt-5.6-luna."),
|
||||
"response_model_rejected",
|
||||
http.StatusConflict,
|
||||
)
|
||||
got := clientFacingOpenAIError(err, true, "local-request-id")
|
||||
if fmt.Sprint(got.Code) != "response_model_rejected" {
|
||||
t.Fatalf("unexpected public code: %v", got.Code)
|
||||
}
|
||||
for _, expected := range []string{"gpt-6-astra", "gpt-5.6-luna", "local-request-id"} {
|
||||
if !strings.Contains(got.Message, expected) {
|
||||
t.Fatalf("public mismatch message %q does not contain %q", got.Message, expected)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user