Fix Qwen session tool calls and expose thinking compatibility
Publish documentation / publish (push) Successful in 30s
Publish documentation / publish (push) Successful in 30s
This commit is contained in:
@@ -97,6 +97,30 @@ func TestDeepSeekBuiltinAndMetadataShareCatalogIdentityAndSecretReference(t *tes
|
||||
}
|
||||
}
|
||||
|
||||
func TestQwenThinkingFormatSurvivesCatalogAndPiProjection(t *testing.T) {
|
||||
i := projectionFixture(t)
|
||||
model := i.ModelCatalog.Providers["local"].Models["qwen"]
|
||||
if err := json.Unmarshal([]byte(`{"reasoning":true,"contextWindow":32768,"maxTokens":8192,"compatibility":{"supportsDeveloperRole":false,"supportsReasoningEffort":false,"supportsStore":false,"maxTokensField":"max_tokens","thinkingFormat":"qwen-chat-template"}}`), model.Session); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
files, err := Render(i)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for _, path := range []string{CatalogFile, PiModelsFile} {
|
||||
if !bytes.Contains(files[path], []byte(`"thinkingFormat": "qwen-chat-template"`)) {
|
||||
t.Fatalf("%s dropped Qwen thinking compatibility", path)
|
||||
}
|
||||
}
|
||||
var models piModels
|
||||
if err := json.Unmarshal(files[PiModelsFile], &models); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !models.Providers["local"].Models[0].Reasoning {
|
||||
t.Fatal("Pi must know the model supports explicit thinking control")
|
||||
}
|
||||
}
|
||||
|
||||
func TestProjectionKeepsSingleUseInventoryOutOfSharedPiSelection(t *testing.T) {
|
||||
i := projectionFixture(t)
|
||||
p := i.ModelCatalog.Providers["zai"]
|
||||
|
||||
Reference in New Issue
Block a user