NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #2543 most downloaded on pub.dev
Shelf integration for Genkit Dart.
Last release today
07 Oct 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 17 of 17 stable releases
Nothing withdrawn
no release was ever pulled
8 months old
42 releases · first in 2026
One column per month.
Release genkit_shelf-v1.0.0
Release genkit_shelf-v1.0.0
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_shelf-v1.0.0-rc.3
Release genkit_shelf-v1.0.0-rc.3
Release genkit_shelf-v1.0.0-rc.2
Release genkit_shelf-v1.0.0-rc.2
Release genkit_shelf-v1.0.0-rc.1
Release genkit_shelf-v1.0.0-rc.1
BREAKING REFACTOR: moved vertexAI plugin from genkit_google_genai into genkit_vertexai package (#202).
Nothing published for this version
Release genkit_shelf-v0.1.13
Release genkit_shelf-v0.1.13
- updated internal dependencies.
Nothing published for this version
Release genkit_shelf-v0.1.12-rc.1
Release genkit_shelf-v0.1.12-rc.1
- updated internal dependencies.
HTTP / remote agent client (6/8)
- updated internal dependencies.
update model references to gemini-flash-latest
- updated internal dependencies.
- updated internal dependencies.
- updated internal dependencies.
- updated internal dependencies.
- updated internal dependencies.
- updated internal dependencies.
Add context provider examples to genkit_shelf README and update schema helper syntax
genkit_shelf README and update schema helper syntax (#208)Packages with breaking changes:
Packages with breaking changes:
Packages with other changes:
genkit - v0.10.0-dev.19genkit_mcp - v0.1.0-dev.1genkit_google_genai - v0.1.0-dev.1genkit_vertex_auth - v0.1.0-dev.1genkit_openai - v0.1.0-dev.1genkit_anthropic - v0.1.0-dev.1genkit_shelf - v0.1.0-dev.1genkit_chrome - v0.0.1-dev.10genkit_middleware - v0.1.0-dev.1Packages with dependency updates only:
Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
genkit_mcp - v0.1.0-dev.1genkit_google_genai - v0.1.0-dev.1genkit_vertex_auth - v0.1.0-dev.1genkit_openai - v0.1.0-dev.1genkit_anthropic - v0.1.0-dev.1genkit_shelf - v0.1.0-dev.1genkit_chrome - v0.0.1-dev.10genkit_middleware - v0.1.0-dev.1Update a dependency to the latest release.
Update a dependency to the latest release.
REFACTOR: migrate Vertex AI authentication to use the genkit_vertex_auth (#193).
genkit_vertex_auth (#193).final or base (#179).Note: This release has breaking changes.
final or base (#179).REFACTOR: hide package:json_schema_builder (#167).
Note: This release has breaking changes.
REFACTOR: remove GoogleSearchRetrieval option (deprecated) (#147).
Packages with breaking changes:
Packages with breaking changes:
Packages with other changes:
genkit - v0.10.0-dev.14genkit_anthropic - v0.0.1-dev.5genkit_google_genai - v0.0.1-dev.14genkit_openai - v0.0.1-dev.3genkit_shelf - v0.0.1-dev.14schemantic - v0.0.1-dev.16genkit_mcp - v0.0.1-dev.3genkit_chrome - v0.0.1-dev.5genkit_middleware - v0.0.1-dev.3Packages with dependency updates only:
Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
genkit_mcp - v0.0.1-dev.3genkit_chrome - v0.0.1-dev.5genkit_middleware - v0.0.1-dev.3REFACTOR: automate telemetry exporter configuration (#131).
REFACTOR: remove detailed token usage arrays from usage metadata and add tests for usage extraction. (#127).
FEAT: added support for embedders (embedding models) (#88).
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).$GenerateResponse type, refine schema types, and update generated class constructors to use late final and regular constructors. (#66).Note: This release has breaking changes.
FEAT: updated AnyOf support for union types in Schemantic, including helper class generation and schema type handling. (#62).
REFACTOR: make all classes final or base (#179).
final or base (#179).Note: This release has breaking changes.
$schema for unified schema access. (#60).REFACTOR: hide package:json_schema_builder (#167).
Note: This release has breaking changes.
REFACTOR: Tweak RegExps and avoid non-linear complexity (#175).
final or base (#179).REFACTOR: hide package:json_schema_builder (#167).
Note: This release has breaking changes.
REFACTOR: Introduce a dedicated plugin.dart entry point for plugin-related exports (#149).
BREAKING REFACTOR: generate api cleanup (#125).
REFACTOR: automate telemetry exporter configuration (#131).
Note: This release has breaking changes.
Packages with breaking changes:
Packages with breaking changes:
genkit - v0.10.0-dev.17genkit_anthropic - v0.0.1-dev.8genkit_google_genai - v0.0.1-dev.17genkit_mcp - v0.0.1-dev.6genkit_middleware - v0.0.1-dev.6genkit_openai - v0.0.1-dev.6genkit_shelf - v0.0.1-dev.17schemantic - v0.0.1-dev.18Packages with other changes:
Packages with dependency updates only:
Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
genkit_chrome - v0.0.1-dev.8- Initial release.
Your coding agent can read these notes before it upgrades. Set up the MCP server →