Releases: gunpal5/Google_GenerativeAI
v3.6.1
What's Changed
- Improved handling of
FinishReasonto avoid deserialization errors when Google introduces new values by @MathiasZander in #98
Full Changelog: v3.5.0...v3.6.1
v3.5.0
New Features
Gemini 3 Support
- Added ThinkingLevel enum for controlling thinking/reasoning depth in Gemini 3 models
- Added ThoughtSignature property support for tracking thought content in responses
- New ThinkingConfig with IncludeThoughts and ThinkingBudget settings
- Full integration with Microsoft.Extensions.AI via AdditionalPropertiesKeys
Dynamic Tools Enhancement
- Added JsonNode and JsonObject parameter support in QuickTool
- Enables dynamic tool handling where functions receive raw JSON directly
- Useful for tools that need to accept arbitrary JSON structures
MCP Tools Gemini Live API Compatibility
- Fixed MCP Tools to work with Gemini Live API
- Uses Parameters (compatible schema subset) by default
- Falls back to ParametersJsonSchema only for unsupported schema features
- Resolves "parameters_json_schema must not be set when parameters is set" error
Image Output Configuration
- Added support for image output configuration in Microsoft.Extensions.AI
- New keys: AspectRatio, ImageSize, MimeType, CompressionQuality
Bug Fixes
- fix: Support Dimensions parameter in GenerativeAI.Microsoft (#96)
- fix: Improved Schema serialization for Gemini 3 compatibility
- fix: MCP Tools now correctly use only one of Parameters OR ParametersJsonSchema
Dependencies
- Updated to Gunpal5.CSharpToJsonSchema v1.0.0 (forked with AOT compatibility fixes)
New Contributors
- @trapezoid - ThoughtSignature support
- @dogdie233 - Dimensions parameter fix (#95)
- @xtradegmbh - Image output configuration for MEAI
Full Changelog: v3.4.1...v3.5.0
v3.4.1
What's Changed
- update MEAI image generation support and basic usage tracking for streaming by @MathiasZander in #83
- Correct Vertex global region endpoint URL construction by @MathiasZander in #84
- feat: Add McpTool for easy MCP Server integration by @gunpal5 in #85
New Contributors
- @MathiasZander made their first contribution in #83
Full Changelog: v3.4.0...v3.4.1
v3.4.0
New Features
Batch Processing API
Complete implementation of asynchronous batch processing for efficient handling of large-scale AI workloads.
New Types (10):
BatchJob- Main batch job entity with comprehensive status trackingBatchJobSource/BatchJobDestination- Support for GCS, BigQuery, and inlined data sourcesInlinedRequest/InlinedResponse- Direct request/response embedding in batch jobsJobStateenum - Job lifecycle management (PENDING, RUNNING, SUCCEEDED, FAILED, etc.)JobError- Structured error reporting for failed batch operationsListBatchJobsResponse- Paginated batch job listings
Features:
- Create batch jobs for content generation and embeddings
- Support for multiple input sources (Google Cloud Storage, BigQuery, inlined requests)
- Configurable output destinations
- Job status monitoring and management
- Job cancellation and deletion operations
Model Constants Update
Added support for latest Google AI and Vertex AI models with cleanup of deprecated versions.
Added Models:
- Gemini 2.5 series:
Gemini25Flash,Gemini25FlashLite,Gemini25Pro - Latest aliases:
GeminiFlashLatest,GeminiFlashLiteLatest,GeminiProLatest - Gemini 2.0:
Gemini2FlashLatest,Gemini2FlashLite - Gemma 3 variants:
Gemma3_1B,Gemma3_4B,Gemma3_12B,Gemma3_27B,Gemma3n_E4B,Gemma3n_E2B - Imagen 4:
Imagen4Generate001,Imagen4UltraGenerate001,Imagen4FastGenerate001 - Veo 3 & 3.1:
Veo3Generate001,Veo3FastGenerate001,Veo31GeneratePreview,Veo31FastGeneratePreview - Experimental:
LearnLM2FlashExpfor educational applications
Removed Models:
- All Gemini 1.5 models (Flash, Flash-8B, Pro)
- All Gemini 1.0 models (Pro, Pro Vision)
- Deprecated Gemini 2.x experimental variants
Enhanced Type System
Systematic alignment with Python SDK to ensure complete API coverage.
51+ New Properties Added Across 16 Core Types:
Enhanced Multimodal Support:
Blob.DisplayName/FileData.DisplayName- User-friendly file identificationPart.ThoughtSignature- Thought reuse optimizationVideo.Uri- Fixed JSON property mapping from "gcsUri" to "uri"
Advanced Safety Controls:
SafetySetting.Method- Harm blocking method selection (HarmBlockMethodenum)SafetyRating.OverwrittenThreshold,ProbabilityScore,Severity,SeverityScore- Enhanced safety metricsSafetyAttributes.ContentType- Content type identification
Function Calling Enhancements:
FunctionResponse.WillContinue,Scheduling,Parts- Async function call supportFunctionDeclaration.Behavior,ParametersJsonSchema,Response,ResponseJsonSchema- Advanced configuration- New types:
Behavior,FunctionResponseScheduling,FunctionResponseBlob,FunctionResponsePart
Grounding & Context:
GroundingMetadata.GoogleMapsWidgetContextToken,RetrievalQueries- Maps integrationGroundingChunk.Maps,RetrievedContext- Enhanced grounding sourcesCandidate.FinishMessage,UrlContextMetadata- Extended candidate information- New types:
RagChunk,GroundingChunkMaps,GroundingChunkRetrievedContext
Generation Configuration:
GenerationConfig.ModelSelectionConfig,EnableAffectiveDialog,ResponseJsonSchema- Advanced control- New types:
ModelSelectionConfig,FeatureSelectionPreference
Tool Ecosystem:
Tool.EnterpriseWebSearch,GoogleMaps,UrlContext,ComputerUse- New tool types- New types:
Environment,EnterpriseWebSearch,GoogleMaps,UrlContext,ComputerUse
Video Generation:
GenerateVideosConfig.GenerateAudio,LastFrame,ReferenceImages,Mask,CompressionQuality- New types:
VideoCompressionQuality,VideoGenerationReferenceType,VideoGenerationMaskMode
Model Management:
Model.Endpoints,Labels,TunedModelInfo,SupportedActions,DefaultCheckpointId,Checkpoints- New types:
Endpoint,TunedModelInfo,Checkpoint
Schema Validation:
- 14 JSON Schema properties:
additionalProperties,defs,ref,anyOf,default,example,maxItems,minItems,maxLength,minLength,maxProperties,minProperties,pattern,title
Authentication & Security:
Hyperparameters.AdapterSize- Tuning configuration withAdapterSizeenum (7 values)CachedContent.KmsKeyName- Customer-managed encryption key support- New types:
AuthConfig,AuthType,ApiKeyConfig,AuthConfigGoogleServiceAccountConfig,AuthConfigHttpBasicAuthConfig,AuthConfigOauthConfig,AuthConfigOidcConfig
Streaming & Usage:
BidiResponsePayload.UsageMetadata- Token usage tracking in bidirectional streamsBidiGenerateContentServerContent.TurnCompleteReason,WaitingForInput- Enhanced streaming controlGenerateContentResponse.CreateTime,ResponseId- Response metadata- New type:
TurnCompleteReasonenum (4 values)
Vertex AI Specific:
VertexRetrievalTool.ExternalApi- External API grounding support- New types:
ExternalApi,ApiSpecenum,ExternalApiElasticSearchParams,ExternalApiSimpleSearchParams
Total New Supporting Types: 30+
All new types registered in TypesSerializerContext for Native AOT compatibility.
WebSocket Improvements
ClientCreatedevent - Allows configuration of WebSocket client before connection establishment- Improved disconnection handling with better error reporting and resilience
What's Changed
- Added languageCode and multiSpeakerVoiceConfig properties to SpeechConfig by @ladenedge in #78
- Refactored DisconnectionHappened handler to always report errors by @ladenedge in #82
- Offer a new event 'ClientCreated' that is invoked before a websocket connection is attempted by @ladenedge in #80
New Contributors
- @ladenedge made their first contribution in #78
Full Changelog: v3.3...v3.4.0
v3.3
What's Changed
- @stephentoub Update to M.E.AI.Abstractions 9.9 #75
- feat: add CODE_RETRIEVAL_QUERY task type and enhance embedding task type support
- Add CODE_RETRIEVAL_QUERY task type for code search optimization
- Update all TaskType enum descriptions with optimization details and use cases
- Add WithTaskType() extension method for easier task type configuration
- Add comprehensive unit tests for new task type functionality
Release v3.2.0
What's Changed
- Add image support to GenerativeAI.Microsoft by @ericstj in #73
- Add Embedding Generator in GenerativeAI.Microsoft
New Contributors
Full Changelog: v3.1.1...v3.2
v3.1.1
What's Changed
- Fixes: #61 #55
- Fix for Vertex Express mode not working by @clarity99 in #62
- Remove unsupported formats from schemas in IChatClient implementation by @stephentoub in #63
- Update the current Gemini Models by @tenowg in #68
- Added error message propagation to client. by @LukaszFliegel in #67
New Contributors
- @clarity99 made their first contribution in #62
- @tenowg made their first contribution in #68
- @LukaszFliegel made their first contribution in #67
Full Changelog: v3.0.0...v3.1.1
v3.0.0
What's Changed
- Code Quality improvements
- Add audio transcription settings to MultiModalLiveClient by @yarns123 in #50
- Fixed an issue where multiple Tools with FunctionDeclarations by @trapezoid in #56
- Fix: Correctly handle chat history in StreamContentAsync for function… by @RyanStanLin in #58
- Fixed an issue where FunctionCalling was handled by GenerativeModel when passing IPlatformAdapter by @trapezoid in #59
New Contributors
- @trapezoid made their first contribution in #56
- @RyanStanLin made their first contribution in #58
Full Changelog: v2.7.0...v3.0.0
v2.7.0
What's Changed
Google_GenerativeAI.Live
-
feat: Added Input and Output Transcription support ca1f49f
-
feat: Added support to session resumption
-
Introduced new events
- InputTranscriptionReceived
- OutputTranscriptionReceived
- GoAwayReceived
- SessionResumableUpdateReceived
-
Introduced new configuration properties into BidiGenerateContentSetup
- OutputAudioTranscription
- InputAudioTranscription
- ContextWindowCompression
- Proactivity
- SessionResumption
-
Add logging for invalid WebSocket payloads and new properties by @yarns123 in #49
Google_GenerativeAI.Auth
- Introduced new constructor into GoogleServiceAccountAuthenticator to Initialize with stream 1315d40
Google_GenerativeAI.Microsoft
- Added ThinkingConfig support into MEAI 9998b77
New Contributors
Full Changelog: v2.6.0...v2.7.0
v2.6.0
What's Changed?
- Added support for Parallel Function Calling
- Added Part.Thought property
- Added Gemini model IDs
- gemini-2.5-flash-preview-05-20
- gemini-2.5-flash-preview-native-audio-dialog
- gemini-2.5-flash-exp-native-audio-thinking-dialog
- gemini-2.5-flash-preview-tts
- gemini-2.5-pro-preview-05-06
- gemini-2.5-pro-preview-tts
Full Changelog: v2.5.9.1...v2.6.0