feat: revert default to wanyamaelis Qwen3.8-27B and expand verified non-ZeroGPU endpoints
This commit is contained in:
+33
-11
@@ -66,19 +66,20 @@ func TestSOCKS5Parsing(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEffectiveModelID(t *testing.T) {
|
||||
def := "Qwen/Qwen3.8-Flash-Next"
|
||||
def := "Qwen/Qwen3.8-27B"
|
||||
cases := map[string]string{
|
||||
"": def,
|
||||
"qwen3.8-flash-next": def,
|
||||
"qwen-flash-next": def,
|
||||
"qwen-flash": def,
|
||||
"Qwen/Qwen3.8-Flash-Next": def,
|
||||
"qwen3.8-27b": "Qwen/Qwen3.8-27B",
|
||||
"qwen-27b": "Qwen/Qwen3.8-27B",
|
||||
"Qwen/Qwen3.8-27B": "Qwen/Qwen3.8-27B",
|
||||
"qwen3.8-27b-uncensored": "Qwen/Qwen3.8-27B-Uncensored",
|
||||
"": def,
|
||||
"qwen": def,
|
||||
"qwen3.8-flash-next": "Qwen/Qwen3.8-Flash-Next",
|
||||
"qwen-flash-next": "Qwen/Qwen3.8-Flash-Next",
|
||||
"qwen-flash": "Qwen/Qwen3.8-Flash-Next",
|
||||
"Qwen/Qwen3.8-Flash-Next": "Qwen/Qwen3.8-Flash-Next",
|
||||
"qwen3.8-27b": "Qwen/Qwen3.8-27B",
|
||||
"qwen-27b": "Qwen/Qwen3.8-27B",
|
||||
"Qwen/Qwen3.8-27B": "Qwen/Qwen3.8-27B",
|
||||
"qwen3.8-27b-uncensored": "Qwen/Qwen3.8-27B-Uncensored",
|
||||
"Qwen/Qwen3.8-27B-Uncensored": "Qwen/Qwen3.8-27B-Uncensored",
|
||||
"custom-org/my-model": "custom-org/my-model",
|
||||
"custom-org/my-model": "custom-org/my-model",
|
||||
}
|
||||
|
||||
for in, exp := range cases {
|
||||
@@ -206,6 +207,27 @@ func TestParseAssistantText(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseAssistantTextMultiMessageReasoning(t *testing.T) {
|
||||
dataJSON := `[[
|
||||
{"role": "user", "metadata": null, "content": [{"text": "Say hi", "type": "text"}]},
|
||||
{"role": "assistant", "metadata": {"title": "Reasoning"}, "content": [{"text": "First, consider greeting politely.", "type": "text"}]},
|
||||
{"role": "assistant", "metadata": null, "content": [{"text": "Hi there!", "type": "text"}]}
|
||||
]]`
|
||||
|
||||
text, ok := parseAssistantText(dataJSON)
|
||||
if !ok {
|
||||
t.Fatalf("expected successful parse of multi-message assistant text")
|
||||
}
|
||||
|
||||
reasoning, content := SeparateReasoningAndContent(text)
|
||||
if reasoning != "First, consider greeting politely." {
|
||||
t.Fatalf("expected reasoning 'First, consider greeting politely.', got %q", reasoning)
|
||||
}
|
||||
if content != "Hi there!" {
|
||||
t.Fatalf("expected content 'Hi there!', got %q", content)
|
||||
}
|
||||
}
|
||||
|
||||
func TestQwenServiceChatMock(t *testing.T) {
|
||||
// Mock upstream Gradio space server
|
||||
mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user