genkit
1.44.0 · 3 Nov 2026Apache-2.0269.9k / weekRepositoryHomepagenpmAtom feed
Where each line stands
Plan an upgrade- 1.x1.44.0No known advisoryLatest line
- 0.x0.9.12No known advisoryTo 1.44.0
Latest releases
All 94 releases1.44.0
3 Nov 2026- Breaking
Google GenAI, Interactions API usage: per-modality token counts moved from
inputCharacters,inputImages,outputAudioFiles, etc. tousage.custom.*Tokens(e.g.inputTextTokens). Those old fields held token counts by mistake. See #6963 for the full mapping. Added the Gemini Deep Research agent (
deep-research-preview-04-2026) to thevertexAIplugin as a background model.const { operation } = await ai.generate({ model: vertexAI.model('deep-research-preview-04-2026'), prompt: 'Compare TCP and UDP in a short markdown table.', });googleAInow sendsstoreongenerateContentrequests when it's set, so you can opt out of the Gemini API's new default request logging for paid projects.
Features
Google GenAI
Added the Gemini Deep Research agent (
deep-research-preview-04-2026) to thevertexAIplugin as a background model.const { operation } = await ai.generate({ model: vertexAI.model('deep-research-preview-04-2026'), prompt: 'Compare TCP and UDP in a short markdown table.', });googleAInow sendsstoreongenerateContentrequests when it's set, so you can opt out of the Gemini API's new default request logging for paid projects.Interactions API models now accept Word, Excel and other document types instead of only PDF and CSV.
gemini-nano-banana-*models ongoogleAIare now treated as image models and acceptimageConfig.generateContentmodels now report tool-use tokens asusage.custom.toolUseTokens.
Bug Fixes
Google GenAI
On Interactions API models, a request-level
storenow overrides the plugin-levelstoreoption.Server-side tool steps (URL context, file search, Google Maps, MCP) are now kept in multi-turn history on Interactions API models.
vertexAIstateless multi-turn conversations that used Google Search no longer fail with a 501.Output settings are now sent as
response_format, which also fixes JSON output losing its schema when combined withaudioFormatorvideoFormat.responseMimeType: 'application/json'and JSON output without a schema now work on Interactions API models.Removed the shut-down Veo models from
googleAI.veo-*names now fail with a clear error pointing togemini-omni-1.1-flash. Veo is still available onvertexAI.
Breaking Changes
- Breaking
Google GenAI, Interactions API usage: per-modality token counts moved from
inputCharacters,inputImages,outputAudioFiles, etc. tousage.custom.*Tokens(e.g.inputTextTokens). Those old fields held token counts by mistake. See #6963 for the full mapping.
Full Changelog: genkit@1.43.0...genkit@1.44.0
1.43.0
21 Oct 2026throwOnError: falseongenerate()returns the failure and the conversation up to the last completed tool round, so you can retry from there. Code that doesn't set it still gets the same errors as before.const opts = { model: googleAI.model('gemini-flash-latest'), tools: [getWeather], throwOnError: false }; let res = await ai.generate({ ...opts, prompt: 'What should I wear in Tokyo today?' }); if (res.finishReason === 'failed' || res.finishReason === 'aborted') { res = await ai.generate({ ...opts, messages: res.messages }); }waitForSnapshotis the blocking version ofgetSnapshot. It waits on the server until a detached turn finishes, so you don't need a polling loop.const task = await reportAgent.chat().detach('Write the report'); const snap = await task.wait();
Highlights
Agents that recover from failures, plus background sub-agents
Agent runs can now pick up where they stopped after a failure or an abort, and orchestrators can hand work to sub-agents that run in the background.
throwOnError: falseongenerate()returns the failure and the conversation up to the last completed tool round, so you can retry from there. Code that doesn't set it still gets the same errors as before.const opts = { model: googleAI.model('gemini-flash-latest'), tools: [getWeather], throwOnError: false }; let res = await ai.generate({ ...opts, prompt: 'What should I wear in Tokyo today?' }); if (res.finishReason === 'failed' || res.finishReason === 'aborted') { res = await ai.generate({ ...opts, messages: res.messages }); }Failed and aborted agent turns are now resume points. A failed turn is saved as a
failedsnapshot and a stopped run is saved as anabortedsnapshot. Both can be resumed. (#6361, #6362, #6360)waitForSnapshotis the blocking version ofgetSnapshot. It waits on the server until a detached turn finishes, so you don't need a polling loop.const task = await reportAgent.chat().detach('Write the report'); const snap = await task.wait();Background delegation in the
agentsmiddleware. Withasync: true, delegation tools acceptbackground: trueand return a task ID right away. Newcheck_background_tasks,wait_for_background_tasksandabort_background_taskstools let the orchestrator manage those tasks.use: [agents({ agents: ['researcher'], async: true })]continue_taskcontinues a failed, aborted or finished sub-agent task from its handle, with optional new instructions. Snapshot reads also acceptmetadataOnlyto skip loading the state.Transport-specific options in
AgentAPI. In-process agents accept a per-chat or per-callcontext, so auth carries through detached tasks and background jobs. The building blocks for customAgentTransportimplementations are now exported.const chat = weatherAgent.chat({}, { context: { auth: { uid: 'alice' } } });
New
contextCompressionmiddleware@genkit-ai/middlewarenow includescontextCompression, which keeps long agent conversations within a token budget. It truncates tool responses, removes duplicate tool responses, caps message counts, and can summarize old turns with an LLM. It tracks compaction history so later rounds build on earlier ones. (#6266, #6267, #6269, #6270)use: [ contextCompression({ maxInputTokens: 80000, deduplicateToolResponses: { matchBy: 'name-and-input' }, toolResponses: { maxChars: 2000, preserveRecent: 2 }, summarize: { model: googleAI.model('gemini-flash-lite-latest'), preserveRecent: 6 }, }), ]Gemini: Interactions API, Gemini 4 Argon, Omni and more
The
googleAIplugin now sends requests for-latestaliases, newer Gemini models and any model it doesn't know to the Interactions API. Older built-in models stay ongenerateContent.The
vertexAIplugin routes the same way, with one difference: image models and the-latestaliases stay ongenerateContent.New models:
gemini-4-argon,gemini-3.8-flash,gemini-3.8-flash-tts,gemini-3.8-flash-lite-tts,gemini-nano-banana-2.1,gemini-omni-1.1-flash(replaces Veo 3.1),lyria-3.5andantigravity-preview-09-2026. Gemini 2.5 and the retiring preview models are now hidden: they still work but no longer show up in autocomplete.vertexAIgets the same model updates, plus text-to-speech, Omni video generation and thegemini-embedding-2embedder.
Breaking for models on the Interactions API:
response.raw/customnow has a different shape.safetySettings,toolConfig,thinkingBudgetandcandidates > 1are dropped or rejected, and system messages must be text-only. See the #6344 description for the full list.Pluggable instrumentation and the new
@genkit-ai/otelpluginTelemetry is now built on pluggable
Instrumentationproviders instead of being tied to OpenTelemetry. By default nothing changes. The Developer UI no longer needs the OTel SDK, and logs now show up next to traces. (#6336)The new
@genkit-ai/otelpackage (0.2.0) emits spans that follow the OpenTelemetry GenAI semantic conventions. (#6340)import { configureInstrumentation } from 'genkit/tracing'; import { GenAiInstrumentation } from '@genkit-ai/otel'; new NodeSDK().start(); configureInstrumentation(new GenAiInstrumentation({ contentCapturingMode: 'SPAN_ONLY', emitToolSpans: true }));Reflection API outside dev mode, with optional auth
The reflection API can now run without the rest of dev mode, and you can protect it with a shared secret. (#6454, #6666)
GENKIT_REFLECTION_ENABLED=true \ GENKIT_REFLECTION_HOST=0.0.0.0 \ GENKIT_REFLECTION_PORT=3100 \ GENKIT_REFLECTION_SECRET_TOKEN=$(openssl rand -base64 32) \ node lib/index.js
genkit({ reflectionPort: 3200 })binds exactly that port and fails if it's taken.reflectionPort: 0lets the OS pick a port. Leaving it unset still searches upward from 3100.GENKIT_REFLECTION_ENABLED=falseturns the API off even underGENKIT_ENV=dev. Any value other thantrueorfalsethrows fromgenkit().
Features
OpenAI-compatible (
compat-oai)Added
gpt-6-astraand thegpt-5.6models to the OpenAI catalog. (#6303, #6357)New
strictconfig option for structured outputs. It maps toresponse_format.json_schema.strict.
Bug Fixes
Core / AI
Nested dotprompt partials are now named by their path (for example
support/_system), so partials with the same name in different folders no longer collide. Existing{{> system}}references still work when the short name is unique.
Middleware (
contextCompression)Fixed several edge cases:
inputTokensis now set oncandidates[0].message.Duplicate parallel tool responses are matched correctly.
Character limits are enforced on multipart tool responses.
preserveRecentno longer drops messages when summarization is skipped.Short histories that are over budget now fall back correctly.
Ported six fixes from the Go implementation. They cover a lost anchor message on re-compaction,
maxMessages: 1sending no conversation, the token-budget fallback being skipped, and more accurate token estimates for tool responses.Documented the missing
contextCompressionoptions.
Google GenAI
TTS models no longer report support for constrained output.
Fixed the Vertex multimodal embedding dimensions.
Anthropic
Empty signed thinking blocks are now sent back to the API instead of being dropped.
OpenAI-compatible (
compat-oai)Assistant text is kept when the same message also contains tool calls.
1.42.0
1 Sep 2026OpenTelemetry logs are now enabled by default; the
GENKIT_OTEL_ENABLE_LOGSflag has been removed, and custom log record processors set intelemetryConfigare no longer overwritten.plugins/google-genai: Surface API errors from streaming responses by mapping HTTP status codes to Genkit statuses and parsing JSON error bodies returned with HTTP 200 (e.g. overloaded models), so middleware like retry can react appropriately.
plugins/compat-oai: Fix inverted 401/403 status mapping so a bad or missing API key now surfaces as
UNAUTHENTICATEDinstead ofPERMISSION_DENIED; affects all compat-oai based providers (openai, xai, deepseek).
New: A2UI plugin (
@genkit-ai/a2ui)A new plugin that lets an agent stream A2UI ("Agent to UI") surfaces, rich interactive UI rendered incrementally by the client, instead of just prose. Server integration is a single model middleware you drop into an agent's
usearray. It injects the catalog's capabilities into the system prompt, then intercepts streamed and final model output, extractsa2uiblocks, validates them against the catalog, and rewrites them into A2UI data parts. A browser-safe/cliententrypoint (a2uiEnvelopes,actionToMessage) feeds envelopes to a renderer and sends user actions back to the agent. Ships with a runnablejs/testapps/a2uisample (Express backend + Vite/Lit frontend). (#5795, #6209, #6222)import { genkit } from 'genkit/beta'; import { googleAI } from '@genkit-ai/google-genai'; import { a2ui } from '@genkit-ai/a2ui'; const ai = genkit({ plugins: [googleAI()] }); export const uiAgent = ai.defineAgent({ name: 'uiAgent', model: 'googleai/gemini-flash-latest', system: 'You help users. Render UI when it is clearer than prose.', use: [a2ui()], // the only A2UI-specific line });Features
OpenTelemetry logs are now enabled by default; the
GENKIT_OTEL_ENABLE_LOGSflag has been removed, and custom log record processors set intelemetryConfigare no longer overwritten.
Bug Fixes
plugins/google-genai: Surface API errors from streaming responses by mapping HTTP status codes to Genkit statuses and parsing JSON error bodies returned with HTTP 200 (e.g. overloaded models), so middleware like retry can react appropriately.
plugins/compat-oai: Fix inverted 401/403 status mapping so a bad or missing API key now surfaces as
UNAUTHENTICATEDinstead ofPERMISSION_DENIED; affects all compat-oai based providers (openai, xai, deepseek).Add prompt name to
renderspan metadata for better Dev UI usability.
Dependency tracking
Know when your own dependencies move
genkit published 21 releases in the last 12 months. inlinr folds the routine ones into a line and keeps the few that need you.
Advisories reach you
An email when a critical or high advisory affects a project, before the next install.
Upgrades checked first
Peer ranges, Node, ESM-only and types changes read before you bump.
Only what matters
Majors and breaking notes stay; patches and sibling bumps fold into one line.
Reading releases, release notes and advisories…
Registry facts last checked 22 Nov 2026. Releases and advisories last read 22 Nov 2026.
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.