Commit Graph
2 Commits
Author SHA1 Message Date
yetone a45b3e0986 provider: TestCloudflareDecideModelsTested's server keeps what it was asked under a lock — Workers AI's Jev and Clef are asked at once, and the test server's handler wrote one map from both requests, which failed the provider package now and then (concurrent map writes) while the full suite ran. go test -race -count=5 -run TestCloudflareDecideModelsTested and go test -tags nogui ./internal/provider/ under a temp HOME pass; go vet passes. 2026-10-05 17:38:03 +08:00
yetone a94cc3c950 provider: Workers AI's decision models (Jev, Clef) are tested from their right-click as System One's are (ARNO on Discord: cloudflare-jev provider模型无法右击测试) — a model test of a cloudflare-jev provider said its models couldn't be tested, since the test sent System One's question as it is and Workers AI wants it wrapped. DecideAsk and DecideAnswer move from the gateway to the provider package, and AskSystemOne (which TestModels uses) now wraps the question for the provider's API and reads the answer out of Cloudflare's envelope, as routing's own decisions do: Jev is asked {model, input}, a Clef at /run/@cf/cloudflare/<clef> with its own model selector. TestCloudflareDecideModelsTested (an httptest Workers AI: both models pass, the bodies are each one's, a refused key fails) fails on the old code; TestModelTest's cf case now expects testable. go vet, builds (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass (TestProvidersAnswerWhileListsComeIn flaked once, passes alone). 2026-10-04 22:22:23 +08:00