go-ai brings Pi's multi-provider AI API to Go applications. It provides streaming text and reasoning, tool calls, OAuth helpers and image generation, with common message and model types across providers.
The v1.1.0 release follows pi-ai and pi-durable v1.1.0. Alongside the inference library, it includes a native durable runtime for persisted agent conversations, tasks, tools and recovery.
Applications register the provider packages they need, select a model and call Stream() or Complete(). Each provider translates the common Go request types into its API protocol and returns channel-based events for text, reasoning, tools, usage and completion.
Generated registries describe chat, image and classifier models. OAuth and transport helpers handle provider-specific sign-in, SSE and WebSocket connections. The durable runtime adds session state, compaction and recovery using memory, append-journal or SQLite stores.
Streaming and complete responses across OpenAI, Anthropic, Google, Mistral, Bedrock, GitHub Copilot and compatible services.
JSON Schema parameters, streamed arguments and partial JSON parsing, with constrained sampling where providers support it.
Provider thinking levels, signed thinking replay, prompt-cache metadata and stop reasons.
Image generation through OpenRouter, with generated chat, image and classifier catalogues.
Provider-specific login helpers, SSE streaming and Codex WebSocket support with connection reuse.
Persisted conversations, owned tasks and tools, subscriptions, compaction and recovery. Earlier journal formats are not an upgrade compatibility guarantee.
JSON-compatible message, context, tool and usage types for supported Go/TypeScript hand-offs. JavaScript-only runtime integrations are adapted rather than copied unchanged.