Diagnosed failing AI package tests
Public
Diagnosed failing AI package tests
Agent
Pi
Model
GPT-5.4
Started
Apr 3, 4:24 PM
Messages18
Downloads0
Ran test.sh to identify failing tests.
ReproduceAnalyzed failures in AI package tests related to tool stream support.
Understandrun test.sh, figure out the failing tests
./test.sh fails because packages/ai has 2 failing tests. Everything else passed.
Failing tests
packages/ai/test/openai-completions-tool-choice.test.ts:203
enables tool_stream for supported z.ai models with toolsparams.tool_stream === trueundefinedpackages/ai/test/openai-completions-tool-choice.test.ts:240
stores z.ai tool_stream support in model compat metadatagetModel("zai", "glm-5")?.compat?.zaiToolStream === trueundefinedWhat this points to
compat.zaiToolStream for supported models.packages/ai/src/providers/openai-completions.ts:398.packages/ai/src/models.generated.ts:13911 (glm-4.7)packages/ai/src/models.generated.ts:13929 (glm-4.7-flash)packages/ai/src/models.generated.ts:13965 (glm-5)compat: {"supportsDeveloperRole":false,"thinkingFormat":"zai"}zaiToolStream:trueLikely root cause
packages/ai/scripts/generate-models.ts:402 has logic to add zaiToolStream: true, but packages/ai/src/models.generated.ts looks stale or the generation path is not applying it for these models.High level result
1 failed | 24 passed | 19 skipped in packages/aitest.sh exits with code 1 because of that workspace failureIf you want, I can trace why the generated models missed zaiToolStream and fix it.