Skip to content

Releases: gunpal5/Google_GenerativeAI

v3.6.1

28 Dec 16:20

Choose a tag to compare

What's Changed

  • Improved handling of FinishReason to avoid deserialization errors when Google introduces new values by @MathiasZander in #98

Full Changelog: v3.5.0...v3.6.1

v3.5.0

26 Dec 16:02

Choose a tag to compare

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

Full Changelog: v3.4.1...v3.5.0

v3.4.1

08 Nov 09:20

Choose a tag to compare

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

Full Changelog: v3.4.0...v3.4.1

v3.4.0

21 Oct 19:59

Choose a tag to compare

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 tracking
  • BatchJobSource / BatchJobDestination - Support for GCS, BigQuery, and inlined data sources
  • InlinedRequest / InlinedResponse - Direct request/response embedding in batch jobs
  • JobState enum - Job lifecycle management (PENDING, RUNNING, SUCCEEDED, FAILED, etc.)
  • JobError - Structured error reporting for failed batch operations
  • ListBatchJobsResponse - 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: LearnLM2FlashExp for 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 identification
  • Part.ThoughtSignature - Thought reuse optimization
  • Video.Uri - Fixed JSON property mapping from "gcsUri" to "uri"

Advanced Safety Controls:

  • SafetySetting.Method - Harm blocking method selection (HarmBlockMethod enum)
  • SafetyRating.OverwrittenThreshold, ProbabilityScore, Severity, SeverityScore - Enhanced safety metrics
  • SafetyAttributes.ContentType - Content type identification

Function Calling Enhancements:

  • FunctionResponse.WillContinue, Scheduling, Parts - Async function call support
  • FunctionDeclaration.Behavior, ParametersJsonSchema, Response, ResponseJsonSchema - Advanced configuration
  • New types: Behavior, FunctionResponseScheduling, FunctionResponseBlob, FunctionResponsePart

Grounding & Context:

  • GroundingMetadata.GoogleMapsWidgetContextToken, RetrievalQueries - Maps integration
  • GroundingChunk.Maps, RetrievedContext - Enhanced grounding sources
  • Candidate.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 with AdapterSize enum (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 streams
  • BidiGenerateContentServerContent.TurnCompleteReason, WaitingForInput - Enhanced streaming control
  • GenerateContentResponse.CreateTime, ResponseId - Response metadata
  • New type: TurnCompleteReason enum (4 values)

Vertex AI Specific:

  • VertexRetrievalTool.ExternalApi - External API grounding support
  • New types: ExternalApi, ApiSpec enum, ExternalApiElasticSearchParams, ExternalApiSimpleSearchParams

Total New Supporting Types: 30+

All new types registered in TypesSerializerContext for Native AOT compatibility.

WebSocket Improvements

  • ClientCreated event - 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

Full Changelog: v3.3...v3.4.0

v3.3

03 Oct 13:58

Choose a tag to compare

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

10 Sep 00:37

Choose a tag to compare

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

07 Sep 01:38

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v3.0.0...v3.1.1

v3.0.0

21 Jul 20:16

Choose a tag to compare

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

Full Changelog: v2.7.0...v3.0.0

v2.7.0

02 Jun 23:40

Choose a tag to compare

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

Google_GenerativeAI.Microsoft

  • Added ThinkingConfig support into MEAI 9998b77

New Contributors

Full Changelog: v2.6.0...v2.7.0

v2.6.0

25 May 23:08

Choose a tag to compare

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