@genkit-ai/compat-oai
1.44.0 · 3 Nov 2026Apache-2.026.5k / weekRepositoryHomepagenpmAtom feed
41 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 1.x · latest line
1.41.0
11 Aug 2026- Breaking
Security hardening for background operations (heads up: minor breaking change). The google-genai plugin no longer persists
clientOptionsin operation metadata, which previously risked leaking API keys if you returned a full operation object to a client. If you use per-request overrides (like a custom API key) with long-running models, you now need to pass those same overrides to eachcheckOperation/cancelOperationcall. New GPT-5.x models in the OpenAI-compatible plugin. Added
gpt-5.2,gpt-5.4,gpt-5.4-mini,gpt-5.4-nano, andgpt-5.5tocompat-oai, so you can reach the latest OpenAI models without waiting on a plugin bump.Per-request Anthropic API keys. The Anthropic plugin now resolves the API key lazily at request time instead of only at init, so you can override the key per call. Handy for multi-tenant setups and key rotation.
Js sdk
New GPT-5.x models in the OpenAI-compatible plugin. Added
gpt-5.2,gpt-5.4,gpt-5.4-mini,gpt-5.4-nano, andgpt-5.5tocompat-oai, so you can reach the latest OpenAI models without waiting on a plugin bump.Per-request Anthropic API keys. The Anthropic plugin now resolves the API key lazily at request time instead of only at init, so you can override the key per call. Handy for multi-tenant setups and key rotation.
Clearer retry and fallback logs. The
retryandfallbackmodel middleware now emit structured warnings explaining what happened: which attempt, how long the backoff is, why a retry was skipped, and which model it's falling back to.AbortErrorandToolInterruptErrorare now correctly treated as non-retryable.Fixed audio transcription file extensions.
compat-oaispeech-to-text now derives the right file extension from the content type (.mp3,.wav,.webm, and friends) instead of a generic name, which fixes transcription failures with providers that key off the extension.More reliable agent resume.
validateResumeAgainstHistorynow searches history newest-first, fixing an edge case when resuming interrupted conversations.Options for checkOperation and cancelOperation. You can now pass options (including per-request client config) when polling or cancelling long-running operations. Auth and secrets are also now scrubbed from context logging.
- Breaking
Security hardening for background operations (heads up: minor breaking change). The google-genai plugin no longer persists
clientOptionsin operation metadata, which previously risked leaking API keys if you returned a full operation object to a client. If you use per-request overrides (like a custom API key) with long-running models, you now need to pass those same overrides to eachcheckOperation/cancelOperationcall. ROUGE evaluator fix on Vertex AI. Corrected the type used by the ROUGE score evaluator and cleaned up duplicated evaluator types.
CLI
Structured output now survives "Export to .prompt". When you export from the Dev UI model runner, the output schema is included in the front matter (written as Picoschema) instead of being dropped, so exported prompts keep their structured output config.
Cleaner
trace:getoutput.genkit trace:get <id>gets a readable tree view, and--format jsongives you clean JSON that's easy to pipe into other tools.More reliable startup in ephemeral runtimes. The CLI now waits for actions to finish registering before proceeding, fixing flaky behavior where actions weren't yet available.
Dev UI
This release makes the runners smarter about structured output, sharpens live streaming in the Agent Runner, and clears up a bunch of rough edges in traces, tools, and datasets.
Highlights
See and edit output config in the Model Runner. The Model Runner now has an editable Output panel. When you load a generation from a trace, you can inspect the inherited format and JSON schema, tweak them, or switch back to plain text for a freeform prompt. The schema shows up as readable JSON Schema instead of a raw Zod blob, and a reset restores the inherited config.
Structured JSON output, rendered properly. Model Runner output that comes back as JSON is now rendered as clean, formatted JSON instead of a wall of text.
Output conformance in the Prompt Runner. The Prompt Runner now supports output conformance, so prompts that define a structured schema behave consistently with the rest of the tooling.
Live streaming patches in the Agent Runner. Agent Runner now supports
customPatchstreaming, so incremental updates from your agent show up in the UI as they arrive.
Improvements & Fixes
No more garbled streamed text. Fixed a decoding bug where multi-byte characters (CJK, emoji, accented letters) split across network chunks would render as
�. Streamed output now decodes cleanly across chunk boundaries.Structured output + tools now play nicely together. Schemas are sent under the field the generate action actually reads, so structured output no longer accidentally suppresses tool calls. The tool loop runs and applies the structured result on the final turn.
Real-time span metadata in traces. In-progress spans now keep their initial metadata (name, path, type) instead of dropping it, and show a clean
--placeholder for duration until the span completes.Agent Runner session fixes. Switching from multi-turn (bidi) to single-turn mode no longer trips strict backends (e.g. Python/Pydantic) with
extra_forbiddenerrors, session IDs update correctly when a bidi stream ends, and context is preserved when starting a new chat or loading a trace.Manual tool responses are now sent as proper messages, and tool action cards render correctly when resuming or adding a model message with tool requests.
Interruptions callout added to the Tools page so it's clearer what's happening when a tool interrupts.
Dataset sample editor restored to its cleaner previous style, plus tidier JSON editor spacing.
1.40.1
21 Jul 2026Reading the note…
1.40.0
17 Jul 2026- Breaking
agents: Return not found for missing snapshots
compat-oai: Accumulate streamed tool-call arguments in chunks
What's Changed
- Breaking
agents: Return not found for missing snapshots
compat-oai: Accumulate streamed tool-call arguments in chunks
1.39.0
26 Jun 2026Stateful, multi-turn chats —
chat()threadsstate,messages,snapshotId, andsessionIdfor you (send & stream).Typed custom state with Zod validation (
stateSchema).
Breaking changes (beta)
- Breaking
The beta Chat API has been removed and replaced by the new Agents API (#5248, #5251). The
Chatclass,ai.chat(...), andsession.chat(...)are gone. Migrate toai.defineAgent(...)andagent.chat()(see Agents below). All removed surface was beta.
This release introduces Agents, a first-class, multi-turn agent API for Genkit JS. Agents bundle a model/prompt, conversational state, tool loops, interrupts, persistence, streaming, and abort/resume into a single ergonomic, transport-agnostic surface that runs identically in-process on the server and over HTTP from the browser.
Highlights
defineAgent— the new Agents API (#5251)Define a multi-turn agent in a single call, with three levels of control:
// Zero-config const agent = ai.defineAgent({ name: 'assistant', model: 'googleai/gemini-flash-latest', system: 'You are a helpful assistant.', tools: [searchTool], }); // Reuse a registered .prompt (typed promptInput) const agent = ai.definePromptAgent({ promptName: 'assistant', promptInput: { role: 'pirate' } }); // Full control via a custom turn handler const agent = ai.defineCustomAgent({ name: 'custom' }, async (runner, input) => { /* ... */ });Key capabilities:
Stateful, multi-turn chats —
chat()threadsstate,messages,snapshotId, andsessionIdfor you (send & stream).Typed custom state with Zod validation (
stateSchema).Pluggable persistence via
SessionStore(in-memory + file stores included); server-managed sessions resumable bysessionId.Streaming with live custom-state patches over the wire (JSON Patch).
Interrupts & resume (
restart/respond) for human-in-the-loop tools.Abort, detach (background turns) + heartbeats, and graceful failure that preserves the last-good state.
clientTransformto redact/reshape state and stream chunks before they leave the server.Same API server or browser —
remoteAgent(...)returns the sameAgentAPIshape over HTTP.
Agents middleware: delegation & artifacts (#5252)
New
@genkit-ai/middlewaremiddlewares for building multi-agent, artifact-producing workflows:agents()— turns an agent into an orchestrator that delegates to other registered agents. Injects a dedicateddelegate_to_<agent>tool per sub-agent, auto-discovers descriptions, returns sub-agent interrupts/failures as tool results, and adds guard rails (maxDelegations,historyLength).artifacts()— gives the modelread_artifact/write_artifacttools backed by session state, with an<artifacts>listing injected each turn. Pair withagents({ artifactStrategy: 'session' })so an orchestrator can read artifacts produced by its sub-agents.
useChatadapter for Agents —@genkit-ai/vercel-ai(#5426)A new plugin providing a Vercel AI SDK
ChatTransportthat wiresuseChatdirectly to Genkit Agents, so you can build rich React chat UIs (Next.js, Vite) with zero custom plumbing:GenkitChatTransport— drop-inChatTransport, compatible with AI Elements.Server-managed sessions keyed by the
useChatid(no client-side snapshot bookkeeping).First-class interrupts mapped onto the AI SDK's native HITL primitives (respond + restart).
Mapping utilities to convert between Vercel
UIMessageand GenkitMessageData.Ships a full sample app at
js/testapps/vercel-ai-elements.
Firestore session store (#5586)
FirestoreSessionStorefor persisting agent sessions, in@genkit-ai/google-cloudwith a thin@genkit-ai/firebasewrapper. It persists each turn as an incremental JSON Patch diff anchored to periodic, sharded full-state checkpoints, so no document approaches Firestore's 1 MiB limit, per-turn reads/writes stay bounded regardless of session length, and reconstruction is strongly consistent without secondary indexes. Tunable viacollection,checkpointInterval, andshardSize.Supporting changes
Initialization data for flows & actions (#5247) — flows/actions can declare an
initSchemaand receive validatedinitdata (separate frominput) over HTTP. Plumbed throughgenkit/beta/client(runFlow/streamFlow) and the express, fastify, fetch, and next handlers.Bidi actions and flows (#4288) — foundational support for bidirectional (streaming both ways) actions and flows.
1.36.0
27 May 2026js: Introduce annotateschema for ui-specific metadata
js/plugins/google-genai: Support for -latest in vertexai
js: Rewrite relative .js specifiers to .mjs in ESM output
What's Changed
js: Introduce annotateschema for ui-specific metadata
js/plugins/google-genai: Support for -latest in vertexai
js: Rewrite relative .js specifiers to .mjs in ESM output
js/middleware/filesystem: Return tool response on filesystem tool errors
js/plugins/google-genai: Support for antigravity agent
js/plugins/vertexai: Fix modelgarden claude thinking
js/ai: Correctly tag registered interrupt as a non-dynamic tool
js/plugins/anthropic: Bump SDK to ^0.97.1 and ignore input_json_delta instead of throwing
cli: Add trace:get CLI command
js/plugins/google-genai: Use native constrained generation with tools
1.35.0
21 May 2026- Deprecated
js: Deprecate genkit/model/middleware retry and fallback middleware in favor of @genkit-ai/middleware
compat-oai: Refer to proper api keys in tsdoc
1.34.0
12 May 2026js/plugins/compat-oai: Content is not empty if tool_calls is
js/core: Fix ValidationResponse type and cache ajv validators
What's Changed
js/plugins/compat-oai: Content is not empty if tool_calls is
js/core: Fix ValidationResponse type and cache ajv validators
1.33.0
24 Apr 2026js/core: Fix DAP resolution
1.32.0
10 Apr 2026- Deprecated
js/plugins/google-genai: Deprecate some imagen and veo models
js/plugins/anthropic: Remove duplicated keys maxOutputTokens, etc
What's Changed
js/plugins/anthropic: Remove duplicated keys maxOutputTokens, etc
- Deprecated
js/plugins/google-genai: Deprecate some imagen and veo models
1.31.0
27 Mar 2026Update macos-14 runner to macos-15-intel for darwin-x64 builds
What's Changed
Update macos-14 runner to macos-15-intel for darwin-x64 builds
1.30.1
13 Mar 2026- Deprecated
js/plugins/google-genai: Deprecate gemini-3-pro-preview
Update trace filtering to support array-based eq/neq filters and numeric filters (gt, gte, lt, lte)
js/plugins/compat-oai: Add translation adapter and add translation flow in testapps
What's Changed
Update trace filtering to support array-based eq/neq filters and numeric filters (gt, gte, lt, lte)
js/plugins/compat-oai: Add translation adapter and add translation flow in testapps
- Deprecated
js/plugins/google-genai: Deprecate gemini-3-pro-preview
Allow multipart tool responses to include a metadata field.
1.29.0
20 Feb 2026js/plugin/compat-oai: Preserve legacy image URL handling when contentType is missing
js/plugin/compat-oai: Fix type overload shadowing bug for OpenAI models with specific suffixes
js/plugins/compat-oai: Generalize STT module naming and add gpt-4o-mini-transcribe
What's Changed
js/plugin/compat-oai: Preserve legacy image URL handling when contentType is missing
js/plugin/compat-oai: Fix type overload shadowing bug for OpenAI models with specific suffixes
js/plugins/compat-oai: Generalize STT module naming and add gpt-4o-mini-transcribe
js/plugin/compat-oai: Invalid model ID error in transcription models
js/core: Dap Action updates
1.28.0
22 Jan 2026js/compat-oai: Fix handling slashes in model name
js/core: Stop if reflection server fails initialization
1.27.0
19 Dec 2025js/plugin/compat-oai: Add support to input pdfs or base64 files
js/plugins/compat-oai: Allow passing api key at runtime instead of config time
js: Added realtime telemetry support infrastructure
What's Changed
js/plugin/compat-oai: Add support to input pdfs or base64 files
js/plugins/compat-oai: Allow passing api key at runtime instead of config time
js: Added realtime telemetry support infrastructure
Dev UI Changes
Add ability to collapse/expand code blocks
Display telemetry in real time
1.26.0
12 Dec 2025js/core: DAP expansion: Dynamic Actions are now expanded in the action list
Add reasoning token counts
Allow listing and running v2 tool actions
What's Changed
js/core: DAP expansion: Dynamic Actions are now expanded in the action list
Dev UI changes
Add reasoning token counts
Allow listing and running v2 tool actions
Support prompt evaluation (experiment)
Moved JSON preview toggle out of eval table
1.25.0
3 Dec 2025js/plugins/compat-oai: Support
gpt-5.1Persist the unknown traces filter state in local storage
Update multimodal-input font to match markdown content
What's Changed
js/plugins/compat-oai: Support
gpt-5.1
Dev UI Changes
Persist the unknown traces filter state in local storage
Update multimodal-input font to match markdown content
Properly pop tool calls in non-append mode
Hide thoughtSignature base64 to de-clutter message
Allow reasoning and text parts alongside tool inputs / outputs
Move metricsMetadata to eval Run Key
1.24.0
18 Nov 2025Reading the note…
1.23.0
13 Nov 2025Reading the note…
1.22.0
28 Oct 2025Reading the note…
1.21.0
6 Oct 2025Reading the note…
1.20.0
26 Sep 2025Reading the note…
1.19.3
19 Sep 2025Reading the note…
1.19.2
9 Sep 2025Reading the note…
1.19.1
8 Sep 2025Reading the note…
1.19.0
8 Sep 2025Reading the note…
1.18.0
29 Aug 2025Reading the note…
1.17.1
24 Aug 2025Reading the note…
1.17.0
22 Aug 2025Reading the note…
1.16.1
12 Aug 2025Reading the note…
1.16.0
7 Aug 2025Reading the note…
1.15.5
25 Jul 2025Reading the note…
1.15.4
25 Jul 2025Reading the note…
1.15.2
21 Jul 2025Reading the note…
1.15.1
18 Jul 2025Reading the note…
1.15.0
17 Jul 2025- 0.0.x
0.0.2
10 Jul 2025Reading the note…
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.