Unified Agent + reusable Go agent core.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: disable anthropic streaming

Lyric d58b794f d47a2372

+17 -1
+1 -1
providers/uniai/client.go
··· 295 295 296 296 func supportsStreaming(provider string) bool { 297 297 switch strings.ToLower(strings.TrimSpace(provider)) { 298 - case "gemini", "cloudflare": 298 + case "anthropic", "gemini", "cloudflare": 299 299 return false 300 300 default: 301 301 return true
+16
providers/uniai/client_test.go
··· 244 244 } 245 245 } 246 246 247 + func TestBuildChatOptionsDisablesOnStreamForAnthropicProvider(t *testing.T) { 248 + req := llm.Request{ 249 + Messages: []llm.Message{{Role: "user", Content: "hello"}}, 250 + OnStream: func(llm.StreamEvent) error { return nil }, 251 + } 252 + opts := buildChatOptions(req, "anthropic", "", "", false, uniaiapi.ToolsEmulationOff, nil, "", nil) 253 + 254 + built, err := uniaichat.BuildRequest(opts...) 255 + if err != nil { 256 + t.Fatalf("build request: %v", err) 257 + } 258 + if built.Options.OnStream != nil { 259 + t.Fatalf("expected on_stream callback to be disabled for anthropic provider") 260 + } 261 + } 262 + 247 263 func TestBuildChatOptionsDisablesOnStreamForCloudflareProvider(t *testing.T) { 248 264 req := llm.Request{ 249 265 Messages: []llm.Message{{Role: "user", Content: "hello"}},