NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #1971 most downloaded on pub.dev
Genkit Dart package, a Generative AI library for pure Dart client/server and Flutter apps.
Last release today
07 Oct 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 24 of 24 stable releases
Nothing withdrawn
no release was ever pulled
1 years old
49 releases · first in 2025
One column per month.
This release has a lot of breaking changes. Most of them are small renames and tightened types that came out of a full review of the public API before…
Genkit Dart is now 1.0. The core genkit package, schemantic, and the main plugins are stable and covered by semantic versioning. Some packages stay on 0.x because their underlying platforms or APIs are still changing:
| Package | Version |
|---|---|
genkit, schemantic, schemantic_builder |
1.0.0 |
genkit_google_genai, genkit_vertexai, genkit_anthropic, genkit_openai |
1.0.0 |
genkit_middleware, genkit_mcp, genkit_shelf |
1.0.0 |
genkit_firebase_ai, genkit_google_cloud |
0.3.0 |
genkit_chrome, genkit_otel, genkit_vertex_auth |
0.2.0 |
genkit_a2ui |
0.4.0 |
This release has a lot of breaking changes. Most of them are small renames and tightened types that came out of a full review of the public API before freezing it. The ones you are most likely to hit are GenkitRouter (if you used genkit_shelf), prompts, and GenerateResult.
The stable API is now clearly separated from experimental features. Stable libraries are covered by semver:
import 'package:genkit/genkit.dart';
import 'package:genkit/client.dart';
import 'package:genkit/lite.dart';
import 'package:genkit/plugin.dart';
import 'package:genkit/telemetry.dart';
import 'package:genkit/io.dart'; // new: HTTP serving (dart:io)Experimental features have their own imports. They can change or be removed in any minor release:
import 'package:genkit/experimental.dart'; // agents, sessions, snapshots, live/bidi models
import 'package:genkit/experimental_client.dart'; // browser-safe agent client
import 'package:genkit/experimental_io.dart'; // FileSessionStore, GenkitRouter.addAgent
import 'package:genkit_middleware/agents.dart'; // agents() sub-agent delegation middlewareThese libraries are annotated @experimental, so the analyzer warns (experimental_member_use) as soon as you import one. If you've accepted the instability, you can silence the warning:
# analysis_options.yaml
analyzer:
errors:
experimental_member_use: ignoreWhat moved:
AgentOutput, AgentInput, SessionSnapshot, TurnEnd, Artifact, JsonPatchOperation, and about 15 more) are no longer exported from the stable libraries. Import experimental.dart or experimental_client.dart. (#480)genkit_middleware no longer re-exports agents(), AgentsPlugin, AgentsOptions and related types. Import package:genkit_middleware/agents.dart directly. (#482)Action.streamBidi() now triggers the experimental warning. BidiActionStream and BidiActionFn are exported from experimental.dart. (#483)GenkitRouterHTTP serving now lives in core (package:genkit/io.dart) and runs on plain dart:io. genkit_shelf is now a thin adapter on top of it. startFlowServer and FlowWithContextProvider are gone. (#533)
import 'package:genkit/io.dart';
final genkit = GenkitRouter()
..addAction(helloFlow) // POST /hello
..addAction(secureFlow, contextProvider: bearerAuth) // per-action auth
..addAction(googleAI().model('gemini-flash-latest')); // models and tools can be served too
await genkit.serve(port: 8080, cors: const CorsOptions());Context providers get a framework-neutral RequestData instead of a shelf Request. Header names are lowercased:
Future<Map<String, dynamic>> bearerAuth(RequestData request) async {
final user = await verifyToken(request.headers['authorization']);
if (user == null) {
throw GenkitException('Unauthorized', status: StatusCode.unauthenticated); // 401
}
return {'userId': user.id}; // becomes ctx.context
}You can also mount it inside your own server, or serve a single action:
// your own dart:io server
await for (final request in server) {
if (await genkit.handleHttpRequest(request, basePath: '/api')) continue;
// ...your routes
}
// single action
final handleHello = ioHandler(helloFlow, contextProvider: bearerAuth);
// shelf
final app = Router()
..post('/hello', shelfHandler(helloFlow))
..mount('/api/', genkit.asShelfHandler());Agents (experimental) mount with one call. You no longer need hand-written /getSnapshot and /abort routes:
import 'package:genkit/experimental_io.dart';
final api = GenkitRouter()
..addAgent(weatherAgent) // turn + /getSnapshot + /abort
..addAgent(bankingAgent, contextProvider: bearerAuth);Migrating from startFlowServer:
// before
await startFlowServer(
flows: [helloFlow, FlowWithContextProvider(flow: secureFlow, context: bearerAuth)],
cors: {'origin': '*'},
);
// after
final genkit = GenkitRouter()
..addAction(helloFlow)
..addAction(secureFlow, contextProvider: bearerAuth);
await genkit.serve(cors: const CorsOptions());Wire format change: streamed responses now use Content-Type: text/event-stream, and a failed stream ends with a data: {"error": ...} frame instead of error: {...}. This matches the Go and Python servers. Clients from genkit 0.17 and earlier only understand the old frame. If you have shipped apps (for example Flutter apps) that use an old client, turn on the legacy frame:
final genkit = GenkitRouter(sendLegacyErrorFrame: true);See #533 for the full design and migration guide.
Some models don't support constrained (schema-enforced) output natively. For those, you can opt into simulateConstrainedGeneration(). It moves the output schema into the prompt as instructions, so structured output still works. It's built in, so you don't need to register a plugin. (#453, #519)
final response = await ai.generate(
model: someModel,
prompt: 'Describe a cat',
outputSchema: Cat.$schema,
use: [simulateConstrainedGeneration()],
);
// Lite API
await lite.generate(
model: model,
outputSchema: Cat.$schema,
use: [SimulateConstrainedGenerationMiddleware()],
);Nothing is rewritten unless you add the middleware. If a model doesn't support constrained output (for example Chrome's built-in model), add the middleware or use the provider's own config option, such as Chrome's responseConstraint.
Prompts now have an Output type parameter, so they return typed structured output just like generate. ExecutablePrompt is renamed to Prompt. Call options are now named parameters, the same ones generate takes. (#527, #622)
final joke = ai.definePrompt(
name: 'joke',
inputSchema: JokeInput.$schema,
outputSchema: Joke.$schema,
prompt: 'Tell a joke about {{topic}}',
); // Prompt<JokeInput, Joke>
final Joke? j = (await joke(JokeInput(topic: 'cats'), config: {'temperature': 0.2})).output;
// typed lookup
final p = await ai.prompt<JokeInput, Joke>('joke');
// .prompt file with a schema but no Dart type
final s = await ai.prompt('summarize', outputParserSchema: Summary.$schema);The Lite API's generate / generateStream also infer a typed output from outputSchema now. (#499)
ai.defineGenerateMiddleware registers middleware from app code, with no plugin needed. The top-level defineMiddleware used by plugin authors is renamed to generateMiddleware. (#571)
final logging = ai.defineGenerateMiddleware<LoggingOptions>(
name: 'logging',
configSchema: LoggingOptions.$schema,
create: (config, ctx) => LoggingMiddleware(config),
);
await ai.generate(prompt: 'hi', use: [logging(LoggingOptions(level: 'debug'))]);retry() works out of the box. RetryPlugin is removed; delete it from plugins:. Delays are now Durations, and retryModel is now noRetryModel. (#531, #549)
use: [retry(maxRetries: 3, initialDelay: const Duration(milliseconds: 500))]The middleware tool hook returns ToolResult. GenerateMiddleware.tool now returns Future<ToolResult>, and ToolInterruptException is removed. Return .interrupt(data) instead of throwing. (#503)
genkit)GenerateResponseHelper is renamed to GenerateResult. rawResponse is now modelResponse, rawChunk is now modelChunk, and jsonOutput is removed (use output). (#534)GenerateResult and GenerateResponseChunk are now read-only views. They no longer extend the wire types and have no setters or toJson(). To forward chunks to a flow, use onChunk: (c) => ctx.sendChunk(c.modelChunk). (#547)inputTokens, outputTokens, Candidate.index, ...) are now int instead of double. (#546)ExecutablePrompt<Input> is now Prompt<Input, Output>. Type parameter order is now payload types first, config last, everywhere: generate<Output, CustomOptions>, definePrompt<Input, Output, CustomOptions>, defineAgent<Input, State, CustomOptions>. (#527)Prompt.call / stream / render take named parameters. PromptGenerateOptions is removed. (#622)ExecutablePrompt.ref is now a PromptRef class instead of a record. PromptConfig is no longer exported. (#528, #529)| Before | After | PR |
|---|---|---|
StatusCodes.NOT_FOUND |
StatusCode.notFound (use .wireName for 'NOT_FOUND') |
#542 |
EvalStatusEnum.PASS |
EvalStatus.pass |
#545 |
GenkitException(underlyingException:) |
GenkitException(cause:). statusCode is removed (use status.value or status.httpStatus) |
#548 |
ToolFnArgs |
ToolFnArg |
#537 |
remoteModel(modelInfo:), modelMetadata(modelInfo:) |
info: |
#537 |
RemoteAction.dispose() |
close() |
#537 |
Tool(toolOutputSchema:) |
Tool(outputSchema:) |
#530 |
ai.embedMany(documents:) |
ai.embed(documents:) |
#535 |
cacheTtlMillis: 60000 |
cacheTtl: const Duration(minutes: 1) (also in genkit_mcp) |
#539 |
defineMiddleware(...) |
generateMiddleware(...) |
#571 |
toolChoice is now a ToolChoice open enum instead of String, for example toolChoice: .required. (#493)Role, FinishReason, ToolChoice, ...) are now const, so you can use them as switch cases. (#544)ActionFnArg, GenerateTurnState and GenerateMiddlewareContext are now final classes instead of record typedefs. Code that built them with record literals needs to use the constructors. (#484, #485, #486)Model, Flow, Tool, ...) are base. Handle types are final. Registry is final, and its plumbing methods are now @internal. (#487, #529)Model, Embedder, Evaluator and Flow constructors now take non-null input, so plugin authors no longer need req!. Evaluator drops its unused type parameter. (#536, #528)ActionStream.setResult / setError and the ActionMetadata.key setter are now @internal. BidiModel.customOptions and Embedder.customOptions are now final. (#488, #489, #528)GenerateMiddlewareDef is now a final, callable class. Build one with generateMiddleware or ai.defineGenerateMiddleware. (#571)ToolFnArgs.interrupt(). Return .interrupt(data) from the tool instead. (#497)ToolInterruptException. (#503)RetryPlugin. (#531)Formatter, FormatterHandlerResult, MessageParser and ChunkParser exports. (#491)createResourceMatcher from genkit.dart. It's now exported from plugin.dart. (#529)package:genkit/io.dart. The name is reused for the new HTTP serving library. (#498, #533)Types that appeared in public signatures but couldn't be named are now exported: ActionStream, Evaluator, ActionFn, StreamingCallback, Registry, and others. (#490)
.prompt files now use spec-compliant Picoschema:
tags(array): string is now an array of strings. It used to be a string with the description "array".(*): string now maps to additionalProperties.email(the email): string logs a warning at load time and fails at render time. Use email: string, the email instead.(#573)
genkit_shelfstartFlowServer and FlowWithContextProvider are removed. Use GenkitRouter with shelfHandler / asShelfHandler(). Context providers take RequestData. See Serving over HTTP. (#533)genkit_middlewarepackage:genkit_middleware/agents.dart. (#482)genkit_google_genai / genkit_vertexaiGoogleAiModels is removed. Name models by string: googleAI.gemini('gemini-flash-latest'), googleAI.geminiTts('gemini-3.8-flash-tts'). Catalog enums are no longer exported. (#524)ThinkingConfig is now GeminiThinkingConfig. The same applies to GeminiSafetySettings, GeminiFunctionCallingConfig, GeminiGoogleSearch, GeminiFileSearch, and the speech/voice config types. TextEmbedderOptions is now GoogleGenAiEmbedderOptions. (#572)genkit_anthropicThinkingConfig is now AnthropicThinkingConfig. (#572)toolChoice: required now maps to Anthropic's any. (#492)genkit_openaiOpenAIModels, OpenAIEmbedders, XaiModels and DeepSeekModels are removed. Use openAI.model('gpt-5.5'), xAI.model(...), deepSeek.model(...) and openAI.embedder(...). modelInfoFor and related functions are still exported. OpenAIModelKind is now a class. (#525)GenkitConverter, getModelType, the capability-set constants) are no longer exported. (#502)schemanticjson_schema_builder calls. $Schema and the SchemaValidation re-export are removed. Regenerate your .g.dart files with schemantic_builder 1.0.0. (#522)genkit)Interrupt tool class for human-in-the-loop patterns. Tool and the related types are now exported from the Lite API. (#399)genkit_openaitts-1, tts-1-hd and gpt-4o-mini-tts through openAI.speechModel(). (#405)whisper-1, gpt-4o-transcribe and gpt-4o-mini-transcribe through openAI.transcriptionModel(), including Whisper translation. (#406)reasoningEffort and verbosity options, plus reasoning output. (#430)genkit_anthropicapiVersion, betas) and native structured output through output_config.format. Structured output now works together with extended thinking and with your own tools. (#402)http.Client. (#226)genkit_google_genai / genkit_vertexaigemini-embedding-* embedders are discovered automatically and can embed media. (#394)genkit)defineSchema names in .prompt files are resolved at render time. (#570)package:logging instead of print(). (#508)genkit_middlewareToolApprovalPlugin(approvedTools:) is honored when toolApproval() is called without a list. (#538)toolChoice option. (#494, #495, #496)list() falls back to the curated catalog when model discovery fails. (#512)gemini-2.5-pro. (#509)example/ programs added for genkit_chrome, genkit_firebase_ai and genkit_google_cloud. (#505)Full Changelog: genkit-v0.17.0...genkit-v1.0.0
Release genkit-v1.0.0-rc.3
Release genkit-v1.0.0-rc.3
Release genkit-v1.0.0-rc.2
Release genkit-v1.0.0-rc.2
Release genkit-v1.0.0-rc.1
Release genkit-v1.0.0-rc.1
We're moving fast towards a stable 1.0 release. This is a big release centered on making generate and agents resilient to failures and cancellation, a
We're moving fast towards a stable 1.0 release. This is a big release centered on making generate and agents resilient to failures and cancellation, a redesigned telemetry system, and a batch of plugin improvements.
generate no longer throws on model/tool errors, cancellation, or maxTurns. It now resolves to a GenerateResponse with a failed or aborted finish reason plus the last-good history, so you can inspect what happened and resume from where it stopped. (#397, #413)failed and aborted snapshots can be rerun. (#411, #413)Most of these are subtle behavior shifts rather than large API rewrites. Details and migration below.
generate resolves instead of throwing (#397, #413)Three related changes to how errors and cancellation surface:
maxTurns no longer throws. Previously a maxTurns overrun threw a GenkitException with ABORTED status. It now returns a response with finishReason: aborted carrying the last turn's history.GenerateResponse with finishReason: failed, carrying a structured error and the last-good history (the failing turn's partial output is dropped).fn that throws (or a tool-not-found) previously got swallowed into an Error: ... tool response and fed back to the model. It now fails the generation with finishReason: failed and the last-good history. A caller-token cancellation resolves to aborted.Migration: callers that wrapped generate() in try/catch to observe model or tool errors must now branch on the finish reason instead.
final res = await ai.generate(model: m, prompt: 'hi', toolNames: ['myTool']);
switch (res.finishReason) {
case FinishReason.failed:
print(res.error?.status); // structured, serializable error
print(res.cause); // raw thrown object, in-process only
// res.messages holds the last-good history; feed it back to resume.
case FinishReason.aborted:
// cancelled or maxTurns; res.messages is the resume point.
default:
print(res.text);
}See #397 and #413 for the full walkthrough, including resuming a cancelled request.
aborting status and resumable terminal snapshots (#411, #413)Brings the Dart agent abort lifecycle in line with the Go reference implementation.
aborting snapshot status for the mid-flight abort window. It is transient and non-terminal: keep polling until a terminal status. DetachedTask.wait()/poll() already do this.abort() now returns the resulting status (pending -> aborting, already-terminal -> existing status, missing -> null) rather than the previous status. This diverges intentionally from JS.completed snapshots. Terminal failed and aborted snapshots that carry state can now be rerun.Migration: if you read the return value of abort(), note it now reflects the new state, not the prior one. When reading snapshots directly, branch on the status and re-read non-terminal ones (pending, aborting); a stale heartbeat surfaces as expired.
The agent stack (agents, sessions, snapshots) and the live/bidi model surface are no longer part of the stable, SemVer-covered API. They now live behind explicit opt-in imports so they can keep evolving without forcing major bumps.
Migration: add the relevant experimental import. Call sites are otherwise unchanged.
import 'package:genkit/genkit.dart';
import 'package:genkit/experimental.dart'; // agents, sessions, snapshots, bidi
import 'package:genkit/experimental_client.dart'; // browser-safe agent client
import 'package:genkit/experimental_io.dart'; // dart:io extras (FileSessionStore)Experimental members are annotated with @experimental, so the analyzer flags their use. To opt out of the warning, set experimental_member_use: ignore in your analysis_options.yaml.
agent.send() now runs over the streaming transport (#457)AgentTransport.run has been removed. send() now calls sendStream() and drains it, which fixes server-managed agents returning null state from send() (they carry state through streamed patches). Matches JS and Go.
Migration: a third-party transport that overrode run will no longer compile; remove the override.
Brings the Dart dynamic action provider (DAP) to parity with JS across generate, the registry, reflection, and the MCP plugin. The getAction/getActionFn/resolveAction signatures changed, and dynamically provided action names are shortened (full name preserved in metadata.originalName). See the PR for details if you build on the registry directly.
Pluggable instrumentation provider system (#348). Instrumentation is now an externally configurable abstraction rather than a hardcoded OpenTelemetry dependency. By default Genkit is not instrumented; in dev, a built-in provider is auto-injected (when a telemetry server is available) so the Developer UI works out of the box. Third parties can implement the Instrumentation interface without an OTel dependency.
import 'package:genkit/telemetry.dart';
void main() {
configureInstrumentation(myInstrumentation());
final ai = Genkit(/* ... */);
}ai.run and agent runTurn spans are now tagged with their action type (#445).
agents middleware gains a background delegation flag plus check_background_tasks, wait_for_background_tasks, abort_background_tasks, and continue_task tools. A background delegation detaches a server-managed sub-agent and returns a taskId immediately; the orchestrator collects results later. See testapps/agents/bin/async_agent_sample.dart.metadataOnly snapshot reads (#416). Fetch snapshot metadata without the full state payload.OpenAIModels gives a typed ModelRef per live model. Uncurated ids still resolve (now defaulting to full multimodal chat capability). Note some behavior shifts: -pro tiers are no longer curated (Responses-API only), retired models resolve but are never listed, and gpt-5-chat-latest is now listed.json_object sent for schemaless JSON output (#415, breaking). outputFormat: 'json' without a schema now sends json_object so the model is actually told to emit JSON. Also fixes jsonMode (was dead code) and strict-mode 400s. Breaking bit: strict: true is now strict: false on json_schema, so the schema becomes advisory rather than guaranteed. See #415.toAnthropicMessage had no reasoning branch, so thinking blocks were dropped from follow-up requests, breaking multi-turn thinking and tool loops. Now rebuilds thinking and redacted-thinking blocks. The signature metadata key is renamed from signature to thoughtSignature to match the Gemini plugins and Genkit JS; the old shape is still accepted on read. See #400.UNAVAILABLE (#459).seed is now sent in GenerationConfig (#452).generateContent support (#440).Rebuilt on mcp_dart for protocol handling (#341, breaking). Delegates protocol negotiation, request correlation, errors, and native stdio/Streamable HTTP handling to mcp_dart, mirroring how Genkit JS wraps the native MCP SDK. Prefers the stateless MCP 2026-07-28 protocol with automatic fallback to 2025-11-25. Breaking notes:
StreamableHttpClientTransport export removed; connect via McpServerConfig(url: ...), and custom client transports implement the new McpClientTransport interface.allowedHosts (and should set allowedOrigins).cacheTtlMillis semantics changed (positive overrides the server hint, negative disables caching, null/0 uses the protocol hint).See #341 for the full migration.
dart:io (#442).openai_dart to v8.0.0 (#418).Full Changelog: genkit-v0.16.1...genkit-v0.17.0
failed responses (model + tool errors) + rerunnable failed snapshots (#413)aborting snapshot status + rerunnable aborted snapshots (Go parity) (#411)Release genkit-v0.17.0-rc.1
Release genkit-v0.17.0-rc.1
Agent session-store operations now receive the ambient request context. Previously the server-side agent runtime ( defineAgent / defineCustomAgent ) d
genkit
defineAgent / defineCustomAgent) dropped the request context when calling SessionStore, so context-scoped stores like FirestoreSessionStore with snapshotPathPrefix always resolved the default "global" prefix instead of the correct per-tenant one. Context is now forwarded through session resolution, snapshot saves, detached tasks, heartbeats, snapshot reads, and abort, so multi-tenant isolation works as documented. (#410)AgentTransport.getSnapshot and AgentTransport.abort gained an optional context parameter. Third-party AgentTransport subclasses must update their overrides to accept it. See #410 for details. (#410)redesign tool API around ToolResult + multipart, type actionType with ActionType
Nothing published for this version
Release genkit-v0.16.0-rc.1
Release genkit-v0.16.0-rc.1
fix: normalize nested models to JSON in generated setters by @pavelgj in #337
Full Changelog: genkit-v0.15.0...genkit-v0.15.1
This release introduces Agents : a first-class way to build stateful, multi-turn AI experiences in Dart. Agents wrap generate with durable sessions, t
This release introduces Agents: a first-class way to build stateful, multi-turn AI experiences in Dart. Agents wrap generate with durable sessions, tool calling, human-in-the-loop interrupts, sub-agent delegation, and a transport-agnostic client — so you can go from a one-shot prompt to a full conversational agent (running locally or served over HTTP) with a few lines of code.
Defining an agent is one call. It handles the model, tools, and session state for you:
import 'package:genkit/genkit.dart';
import 'package:genkit/io.dart';
import 'package:genkit_google_genai/genkit_google_genai.dart';
final ai = Genkit(
plugins: [googleAI()],
model: googleAI.gemini('gemini-flash-latest'),
);
final getWeather = ai.defineTool(
name: 'getWeather',
description: 'Get the current weather for a given location.',
inputSchema: GetWeatherInput.$schema,
outputSchema: GetWeatherOutput.$schema,
fn: (input, _) async =>
GetWeatherOutput(weather: 'Sunny in ${input.location}', temperature: '71F'),
);
final weatherAgent = ai.defineAgent(
name: 'weatherAgent',
system: 'You are an assistant helping with weather information. '
'Use the getWeather tool.',
tools: [getWeather],
store: FileSessionStore('.sessions'), // durable, multi-turn state
);Talk to it - streaming, multi-turn, with state carried automatically between turns:
final chat = weatherAgent.chat(sessionId: 'user-123');
// Stream the first turn.
final turn = chat.sendStream(text: 'What is the weather like in Tokyo?');
await for (final chunk in turn.stream) {
stdout.write(chunk.text);
}
// Follow-up turn — prior context is threaded automatically.
final res = await chat.send(text: 'What about Paris?');
print(res.text);Serve it over HTTP with genkit_shelf, and any client (Dart, JS, browser) can
drive it:
router.post('/api/weatherAgent', shelfHandler(weatherAgent.action));// From a Dart CLI or Flutter/web app — no server-side deps required.
import 'package:genkit/client.dart';
final weather = remoteAgent(url: 'http://localhost:8080/api/weatherAgent');
final chat = weather.chat(sessionId: 'user-123');
await for (final chunk in chat.sendStream(text: 'Weather in Tokyo?').stream) {
stdout.write(chunk.text);
}InMemorySessionStore, FileSessionStorepackage:genkit/io.dart), and FirestoreSessionStore (newgenkit_google_cloud package). Load any past turn from a snapshot, or fork asend / sendStream, with session statectx.interrupt(...)) and be resumed/restarted with an approval payload, sostateSchema and mutate structured sessioncustomPatch chunk to the client.agents() middleware auto-injectsdelegate_to_* tools, discovers sub-agent descriptions, and adds guard railsmaxDelegations, historyLength) for orchestrator/worker patterns.definePromptAgent wires a .prompt (dotprompt) filepromptInput.defineCustomAgent for multi-step flows withdetach + status polling + abort for long-runningremoteAgent from package:genkit/client.dartSee the full runnable showcase in testapps/agents - 11 demo pages covering
chat, interrupts, artifacts, background/detach, branching, task state, research,
delegation, and coding agents.
GenkitAI.Full Changelog: genkit-v0.14.1...genkit-v0.15.0
apply input and output schemas when loading .prompt files
add dotprompt integration with executable prompts and folder loading
system parameter to generate() (#289)preserve middleware in generation
generate docs for generated schemantic types
introduce GenerateTurnState to middleware generate hook and improve chunk indexing
support middleware and defaultModel in listValues
changed middleware tool hook return type to Part for greater flexibility
Allow asynchronous header generation for remote models
changed tool hook signature on middleware, pass toolRequest to tool
Packages with breaking changes:
remoteModel for defining remote AI models with lite api (#198).Packages with breaking changes:
Packages with other changes:
Graduate package to a stable release. See pre-releases prior to this version for changelog entries.
Packages with breaking changes:
extract function to support primitive JSON types (string and numbers) (#195).Packages with breaking changes:
Packages with other changes:
REFACTOR: Tweak RegExps and avoid non-linear complexity (#175).
final or base (#179).REFACTOR: hide package:json_schema_builder (#167).
REFACTOR: Introduce a dedicated plugin.dart entry point for plugin-related exports (#149).
FIX: prevent incorrect partial JSON repair by validating stack state (#144).
REFACTOR: automate telemetry exporter configuration (#131).
FIX: Wrap error responses in a JSON object under an 'error' key (#130).
Note: This release has breaking changes.
FEAT: introducing registered middleware (#87).
FIX: Coerce num values to double for generated double fields during JSON parsing. (#65).
num values to double for generated double fields during JSON parsing. (#65).generate and generateBidi to accept Tool objects directly in the tools list alongside tool names (#79).maxTurns error handling with a new default. (#75).$GenerateResponse type, refine schema types, and update generated class constructors to use late final and regular constructors. (#66).FEAT: updated AnyOf support for union types in Schemantic, including helper class generation and schema type handling. (#62).
REFACTOR: reimplement schema generation from extension types to classes, enhance PartExtension getters, and simplify GenerateResponse and tool invocat
PartExtension getters, and simplify GenerateResponse and tool invocation. (#53).$schema for unified schema access. (#60).Note: This release has breaking changes.
PartExtension getters, and simplify GenerateResponse and tool invocation. (#53).$schema for unified schema access. (#60).BREAKING REFACTOR: renamed JsonExtensionType to SchemanticType (#44).
Note: This release has breaking changes.
REFACTOR: Consolidate Google GenAI examples into a single file, fixed tools calling, and schema flattening helper (#43).
BREAKING FEAT: Refactor basic types into factory functions to support schema constraints (#34).
Note: This release has breaking changes.
REFACTOR: move the package-specific schema generator into a peer package (#31).
Note: This release has breaking changes.
REFACTOR: make generated JsonExtensionType factory classes (*TypeFactory) private (#29).
FEAT: bump analyzer dependency (#25).
Note: This release has breaking changes.
FIX: register generate action with the correct name.
BREAKING CHANGE: RemoteAction has 2 extra generic type parameters I and Init for the input and init types.
RemoteAction has 2 extra generic type parameters I and Init for the input and init types.Made fromResponse and fromStreamChunk optional in defineRemoteAction. If not provided, the response and stream chunks will be dynamic objects decoded
fromResponse and fromStreamChunk optional in defineRemoteAction. If not provided, the response and stream chunks will be dynamic objects decoded from JSON, instead of requiring a typed conversion function.BREAKING CHANGE: The .stream() method now returns an ActionStream instead of a FlowStreamResponse record. ActionStream is a Stream that provides two w…
BREAKING CHANGE: The .stream() method now returns an ActionStream instead of a FlowStreamResponse record. ActionStream is a Stream that provides two ways to access the flow's final, non-streamed response:
onResult: A Future that completes with the result. This is the recommended approach. It will complete with a GenkitException if the stream terminates with an error or is cancelled.result: A synchronous getter that should only be used after the stream is fully consumed. It will throw a GenkitException if the stream is not consumed, terminates with an error or is cancelled.Migration: Code that previously looked like this:
final (:stream, :response) = myAction.stream(input: ...);
await for (final chunk in stream) {
// ...
}
final finalResult = await response;
Should be updated to use onResult:
final stream = myAction.stream(input: ...);
await for (final chunk in stream) {
// ...
}
final finalResult = await stream.onResult;
// or
final finalResult = stream.result;
BREAKING CHANGE: The package has been renamed from package:genkit/genkit.dart to package:genkit/client.dart. You will need to update your import state…
package:genkit/genkit.dart to package:genkit/client.dart. You will need to update your import statements.response future returned by the .stream() method is now nullable (Future<O?>). This change supports improved error handling and cancellation.stream itself. This allows you to catch exceptions directly within a try/catch block surrounding an await for loop.Added standard Genkit data classes for working with generative models, including GenerateResponse, Message, and Part types.
GenerateResponse, Message, and Part types..text and .media for easier data extraction.- README cleanup
Enhanced type-safe client: Added comprehensive generics support for type-safe operations
GenkitException with detailed error information and HTTP status codesjson_serializable for object serialization- Initial version.
Your coding agent can read these notes before it upgrades. Set up the MCP server →