Skip to content

Capabilities

Streaming

Server-sent event streaming of text, thinking, and tool-call deltas

Read this when
  • Implementing or debugging a streaming provider adapter
  • Understanding which providers stream tool-call arguments

All major providers expose Server-Sent Events for incremental output. pi-go’s TextProvider.StreamText returns an EventStream that yields typed deltas (text_delta, thinking_delta, tool_delta).

Compatibility

ProviderAPIpi-goNotes
Anthropic✅ SSE with fine-grained tool-call streamingclient.Messages.NewStreaming (anthropic.go:100)
OpenAI Chat✅ SSEChat.Completions.NewStreaming (openai.go:75)
OpenAI Responses✅ event streamResponses.NewStreaming (openairesponses.go:63)
Google Gemini✅ SSEchat.SendMessageStream (google.go:157)
Claude CLI✅ NDJSON via --output-format stream-json⚠️pi-go consumes the NDJSON but emits a single completed message rather than incremental events (claudecli/claude.go)
Codex CLI✅ JSONL via codex exec --json⚠️pi-go consumes JSONL item events and emits completed text/tool blocks rather than token deltas (codexcli/codex.go)

Provider Documentation

pi-go Gaps

  • Claude CLI does not emit per-delta events; full message is returned once. Streaming-style consumers see no progressive output.
  • Codex CLI emits completed JSONL items; pi-go surfaces command and text items but not token-level deltas.
  • No common heartbeat / keep-alive handling — long-running reasoning calls rely on the underlying SDK to keep the connection alive.