Scopri le novità in ogni release, con dettagli su funzionalità, miglioramenti e problemi risolti.
SemanticChunkQualityGate.NormalizeForEmbedding): Returns exactly the normalized text the chunk quality gate scores and embeds - HTML tags and entities, markdown markers, table rails, link URLs and over-long tokens removed - so any embedding pipeline can guarantee markup never reaches the model.TextExtraction.OverflowStrategy): OverflowResolutionStrategy.Segment splits the content into overlapping context-sized windows, runs one extraction pass per window in sequence, and folds the answers into the single object the schema describes. List fields hold the union of every window's items with duplicates removed, and single-value fields hold the first window that reported a value.TextExtraction.StopWhenAllFieldsFound, on by default): Windows are read in document order and a single-value field keeps the first window that answered it, so once every field has an answer the remaining windows cannot change the result and are skipped. For a long document whose fields sit near the front, the usual shape of forms, invoices and contracts, this turns dozens of inference passes into one. A schema containing a list field at any depth always reads every window, since a later one can still contribute an item.OverflowResolutionStrategy.Reject): Extraction raises NotEnoughContextSizeException with the required and available token counts instead of quietly spending one inference pass per window. Windowing is opt-in, so a large document cannot crowd out the rest of the workload unless the caller asks for it.nomic-embed-vision, U2Net and ModNet failed with "ONNX model family ... is not supported" because the family recorded in the .lmk archive no longer matched the shipped build.TextExtractionResultElement.Confidence and HumanVerificationRequired are meaningful again. A single-value field that two windows read differently keeps only a fraction of that confidence, so a contested value surfaces for review instead of being settled silently by the first window to answer.gemma4:12b: Google Gemma 4 11.9B dense model with 256K context, hybrid sliding/global attention, vision, tool calling, math, coding, and reasoning support. gemma4:12b is now the replacement model for the deprecated gemma3:12b.paddleocr-vl-1.6:0.9b: PaddleOCR-VL 1.6, an ultra-compact 0.9B vision-language model for document parsing (OCR, tables, formulas, charts, text spotting, seals, layout analysis), reaching 96.33% on OmniDocBench v1.6 (state of the art). Architecturally compatible with 1.5 for drop-in migration. The paddleocr-vl:0.9b model card is now deprecated in favor of paddleocr-vl-1.6:0.9b.LM-Kit.NET.Data.Connectors.PgVector): a new PgVectorEmbeddingStore that implements IVectorStore on top of PostgreSQL with the pgvector extension, joining the existing Qdrant connector as a backend for embedding storage, semantic memory, and RAG. Each collection maps to a table (id text primary key, embedding vector(N), metadata jsonb); similarity search uses cosine distance (<=>) and returns cosine-similarity scores. The store is thread-safe (pooled NpgsqlDataSource) and can be constructed from a connection string or an existing data source, with an optional schema. A static PgVectorEmbeddingStore.EnsureDatabaseExistsAsync(...) helper creates the target database on demand, and the connector auto-provisions the vector extension, schema, tables, and metadata indexes on first use.HibernationMode, IKVCache, Configuration, MultiTurnConversation, PdfChat, RagChat, AgentExecutor): new HibernationMode enum (Auto, None, Forced), per-conversation IKVCache.HibernationMode get/set property on every multi-turn conversation type, and a process-wide Configuration.DefaultContextHibernationMode that seeds the value on every new conversation. In Forced mode the runtime hibernates the KV-cache to disk in the background at the end of every turn; the caller returns immediately and the next turn rehydrates transparently. None keeps the context resident. Auto is the default, reserved for runtime-driven heuristics, and currently behaves like None.LMKit.Model): new LM(Stream) loads GGUF and LMK archives from a stream; LM.LoadEncryptedFromStream(...) does the same for encrypted GGUF (.lmke). No on-disk extraction.LMKit.Data.Attachment, LM-Kit.Server): .md / .markdown files are now recognized as plain-text attachments (text/markdown), handled identically to .txt end to end.LM.LoadingOptions.EnableMultiTokenPrediction (bool, default true): controls whether MTP head tensors are loaded into VRAM at model load time. Set to false to skip the heads and save a few hundred MiB to ~1 GiB of VRAM when you know you will not use MTP on this LM instance.LM.HasMultiTokenPrediction (bool): runtime capability check - true when the loaded model declares MTP heads and they were loaded.LMKit.Translation, LMKit.TextGeneration): higher output quality, better fidelity to the source text, and improved handling of long-form inputs across the TextTranslation, TextRewriting, and TextCorrection pipelines.LM-Kit.NET package now contains a runtimes/win-arm64/native/ folder with the default CPU (ARM Neon) and Vulkan backends (Qualcomm Adreno acceleration via Vulkan), plus pdfium and onnxruntime. dotnet publish -r win-arm64 produces a fully working self-contained build.LM-Kit.NET.Backend.Cuda13.Linux): NVIDIA GPU acceleration on Linux x64 using CUDA 13.x drivers. Requires the CUDA 13 Toolkit runtime libraries to be installed on the host. Closes the gap left by previously shipping CUDA 13 only on Windows x64.LM-Kit.NET.Backend.Cuda13.linux-arm64): NVIDIA GPU acceleration for ARM64 Linux systems, including Jetson Orin / Thor and Grace Hopper / Grace Blackwell.qwen3.6:27b (27B dense hybrid Gated DeltaNet + Gated Attention model, 64 blocks) and qwen3.6:35b-a3b (35B MoE, 3B active, 256 experts with 8 routed plus 1 shared, 40 blocks). Both support chat, vision, tool calling, code completion, math, and OCR with a native 262K context window extensible to 1M tokens via YaRN. The qwen3.5:27b and qwen3.5:35b-a3b model cards are now deprecated in favor of qwen3.6:27b and qwen3.6:35b-a3b respectively.LMKit.Agents.Observability.AgentDiagnostics): a new ActivitySource named LMKit.Agents emits spans for every orchestration run (orchestration.execute), every per-agent invocation (agent.execute), and every delegation (agent.delegate), with stable tag names (agent.name, orchestrator.name, orchestration.step, agent.planning_strategy, agent.status, agent.inference_count, delegation.from, delegation.to). Subscribe via OpenTelemetry.Trace.TracerProviderBuilder.AddSource(AgentDiagnostics.SourceName) or a standard System.Diagnostics.ActivityListener. Independent of and complementary to the existing IAgentTracer system.LMKit.Agents.Orchestration.Nodes): new IOrchestrationNode contract with composable primitives - AgentNode, SequentialNode, ParallelNode, ConditionalNode - and a GraphOrchestrator host. Build arbitrary orchestration shapes (e.g., a parallel block of pipelines feeding into a conditional router) without writing a custom orchestrator class. The prebuilt PipelineOrchestrator / ParallelOrchestrator / RouterOrchestrator / SupervisorOrchestrator remain available as named facades.OrchestrationOptions.ReasoningLevel (LMKit.Agents.Orchestration): orchestration-wide override propagated to every agent in the orchestration, including delegated workers in SupervisorOrchestrator. Set to ReasoningLevel.None to disable model-internal <think> emission across the whole graph (e.g. fast classification pipelines on thinking-capable models).AgentExecutionOptions.ReasoningLevel (LMKit.Agents): per-call override for an agent's model-internal reasoning level.TextGenerationResult.Content (LMKit.TextGeneration): user-visible portion of the assistant turn, reconstructed from the runtime's segment classification with <think> reasoning blocks excluded. Completion continues to expose the full text including reasoning.SupervisorOrchestrator propagates orchestration options to delegated workers: workers invoked through delegate_to_agent now respect the orchestration's MaxCompletionTokens, SamplingMode, MaxIterations, ReasoningLevel, and AgentTimeout. Previously workers ran with their own defaults regardless of the supervisor's options.LMKit.Agents.Tools.ToolRegistry, LMKit.Agents.AgentRegistry): registration, lookup, removal, and iteration are now safe to call concurrently.OrchestrationContext is parallel-safe (LMKit.Agents.Orchestration): AddResult, AddTrace, SetState, and stop-signaling properties (ShouldStop, StopReason) are correctness-safe under concurrent agent execution from ParallelOrchestrator and graph ParallelNode.LMKit.Agents.Orchestration.Streaming): IOrchestrator.StreamAsync no longer polls; tokens flow as soon as the model emits them. Slow IOrchestrationStreamHandler.OnTokenAsync callbacks no longer block the inference thread.AgentExecutor.DefaultOptions (LMKit.Agents): the public mutable property is gone. Pass AgentExecutionOptions per call to Execute / ExecuteAsync instead.AgentExecutionOptions.Default returns a fresh instance per access (LMKit.Agents): previously a shared mutable singleton. Code that read values is unaffected; code that mutated AgentExecutionOptions.Default.X = Y to set process-wide defaults must build options per call.LMKit.Cryptography, LMKit.Model, LMKit.Hardware): LM.LoadEncrypted now honors LoadingOptions.LoadTensors = false, mirroring the plaintext metadata-only path - only the metadata block is decrypted, no tensor bytes are read, and the resulting LM exposes architecture, vocabulary, context length, layer count, and other GGUF metadata. Use this for fast catalog inspection or pre-flight checks on protected .lmke containers.MemoryEstimation.FitParameters overload for encrypted containers (LMKit.Hardware): new FitParameters(string encryptedPath, GgufEncryptionScheme scheme, string password, ...) runs the native fit estimator against an encrypted GGUF without ever materializing tensor bytes; the existing FitParameters(LM model, ...) overload also now works on models loaded via LM.LoadEncrypted and reuses the metadata cached at load time, so callers do not need to re-supply the password. Tensor data is never decrypted during estimation.LM.IsEncrypted property (LMKit.Model): true when the instance was loaded via LM.LoadEncrypted. Lets downstream code branch on encryption state without inspecting the file path.LM.DeviceConfiguration.AutoFitToVram property (LMKit.Model): controls whether the model loader automatically retries with progressively fewer GPU layers when the first load attempt fails because the model does not fit in available VRAM. Default is true. When enabled, the runtime walks GpuLayerCount down - placing the remaining layers in system memory - until the model loads or the entire model is on CPU. Set to false to restore the previous behavior of failing loud on insufficient VRAM.LMKit.Model): when a model load fails because the model does not fit in the GPU's available VRAM, the loader now automatically retries with progressively fewer GPU layers - placing the remaining layers in system memory - until the model loads or the entire model is on CPU. Replaces the previous behavior where insufficient VRAM produced an immediate exception. The fallback is gated by the new DeviceConfiguration.AutoFitToVram flag (default true); set it to false to restore the previous fail-loud behavior.LMKit.Model, LMKit.TextGeneration): before allocating a new inference context, the runtime now estimates the KV-cache and compute-buffer cost for the requested context size and compares it to the device's currently free VRAM. If the projection exceeds free memory, the context size is reduced up-front, avoiding a doomed allocation attempt. On an actual allocation failure during creation, the runtime additionally retries with progressively smaller context sizes before throwing.LMKit.Exceptions): when the runtime cannot allocate an inference context even after its built-in retries, the thrown RuntimeException now includes the device's free VRAM at failure time and a hint to either set DeviceConfiguration.GpuLayerCount = 0 for CPU-only loading or shrink the requested context size.LM.DeviceConfiguration.ForceCpuMode property (LMKit.Model): functionally duplicated by setting GpuLayerCount = 0, which routes the entire model and KV cache to system memory. Callers who set ForceCpuMode = true should set GpuLayerCount = 0 instead.IKVCache public interface (LMKit.Inference): exposes residency, warmup, and hibernation capabilities on objects that own an inference KV-cache. Implemented by MultiTurnConversation, PdfChat, RagChat, and AgentExecutor (cast the instance to IKVCache to access).
KVCacheContent (textual projection of the cache).Residency (current ContextResidency).Warmup() (eagerly initializes the context or rehydrates it from disk so the first user-facing call is not penalized by lazy allocation).HibernateAsync(string filePath = null) which serializes the full context state to disk, frees the in-memory handle, and rehydrates transparently on the next inference call. Background hibernation requests are coalesced and deferred while the context is actively in use.ContextResidency enumeration (LMKit.Inference): lifecycle state of an inference context - NotCreated, InMemory, or Hibernated. Exposed via IKVCache.Residency.ContextHibernationDirectory property to Configuration (LMKit.Global): folder used for auto-generated hibernation files when IKVCache.HibernateAsync is called without an explicit path. Defaults to the system temp folder (Path.GetTempPath()); the setter auto-creates the directory if it does not exist and throws ArgumentException on null/empty input.Markdown member to the TextOutputMode enumeration.DocumentToMarkdownConverter (LMKit.Document.Conversion): end-to-end document - Markdown pipeline built for LLM ingestion. Accepts the full range of LM-Kit input modes (file path, byte[] + file name, Stream + file name, ImageBuffer, Uri, and pre-built Attachment) and exposes matching Convert / ConvertAsync overloads along with ConvertToFile / ConvertToFileAsync variants that write the Markdown directly to disk. Supports per-page observability and cancellation through the PageStarting and PageCompleted events.DocumentToMarkdownStrategy enumeration (LMKit.Document.Conversion): selects how each page is converted. TextExtraction uses the embedded text layer (fast, no model required); VlmOcr rasterizes each page and transcribes it with a vision-language model; Hybrid applies a per-page decision, keeping born-digital pages on the text path while routing scanned pages through vision OCR; Auto resolves to the best available strategy based on the input and on whether a vision model is configured.DocumentToMarkdownOptions (LMKit.Document.Conversion): exposes the full configuration surface of the converter, including strategy selection, 1-based PageRange filtering, TextOutputMode for the text-extraction path, VLM OCR tuning (VlmImageDetail, VlmMaximumCompletionTokens, VlmStripImageMarkup, VlmStripStyleAttributes), the hybrid HybridMinTextLength threshold, output shaping (IncludePageSeparators, PageSeparatorFormat, EmitFrontMatter, NormalizeWhitespace), and forwarded DOCX/EML options.DocumentToMarkdownResult and DocumentToMarkdownPageResult (LMKit.Document.Conversion): carry the aggregated Markdown, per-page diagnostics (StrategyUsed, Elapsed, GeneratedTokenCount, QualityScore, Warning), requested vs. effective strategy, source name, and total elapsed time.DocumentConversionPageStartingEventArgs and DocumentConversionPageCompletedEventArgs (LMKit.Document.Conversion): event payloads for the converter's page-level lifecycle, exposing PageIndex/PageNumber/PageCount, SourceName, PlannedStrategy, a Cancel flag, and the PageResult/Exception captured for each page.LMKit.Cryptography, LMKit.Model): new static LM.LoadEncrypted(string path, GgufEncryptionScheme scheme, string password, ...) factory loads a GGUF model from an LM-Kit encrypted container, decrypting tensor bytes on the fly from disk. The plaintext GGUF is never materialized in memory nor written back to disk: only the metadata block (a few MB) plus one tensor's worth of bytes at a time are ever decrypted. Intended for commercial deployments that need to protect model-file copyright on-device.EncryptedGguf static helper (LMKit.Cryptography): EncryptedGguf.Encrypt(plaintextGguf, outputLmke, scheme, password) streams a plaintext GGUF through AES-256-CTR (PBKDF2-HMAC-SHA256 key derivation, 100k iterations) into an .lmke container. EncryptedGguf.Reader.Open(path, password) exposes seekable, per-range decrypted reads for advanced scenarios.GgufEncryptionScheme enumeration (LMKit.Cryptography): lists supported schemes. Ships with AesCtr256 (seekable stream cipher required for per-tensor decryption during load).encrypted_model_loading (demos/console_net): end-to-end walkthrough that downloads a small model from the LM-Kit catalog, encrypts it to an .lmke container, loads it via LM.LoadEncrypted, and drives a multi-turn chat.ImageDetail property to IConversation and VlmOcr (LMKit.TextGeneration, LMKit.Extraction.Ocr): controls the pixel budget used when processing images for vision models. Accepts a member of the ImageDetail enumeration (Minimal, Low, Standard, High, Maximal). Default is High. Available on MultiTurnConversation, SingleTurnConversation, AgentExecutor, RagChat, PdfChat, and VlmOcr.TranslationProgress event to TextTranslation (LMKit.Translation): reports chunk-level progress (ChunkIndex, TotalChunks, TranslatedChunk) during text translation, with a Stop flag to abort remaining chunks.gemma4:31b: Google Gemma 4 31B dense model with 256K context, hybrid sliding/global attention, vision, tool calling, and reasoning support.PdfChat (LMKit.Retrieval): SaveSession() and SaveSession(string) serialize the full conversation state, loaded documents, passage retrieval indices, and configuration. Restore via new PdfChat(chatModel, embeddingModel, sessionData) or the file path overload.SkipThinking flag to AfterTextCompletionEventArgs (LMKit.TextGeneration.Events): when set during an InternalReasoning segment, the model immediately ends its thinking phase and begins generating the user-visible answer. The thinking suffix tokens are injected automatically.MaximumCompletionTokens from 2048 to -1 (unlimited): applies to MultiTurnConversation, SingleTurnConversation, PdfChat, RagChat, and AgentExecutionOptions. Set a positive value to restore a cap.SupervisorOrchestrator (LMKit.Agents.Orchestration): BeforeDelegation, AfterDelegation, and WorkerTextCompletion events let consumers observe the delegation lifecycle and stream worker text directly from the orchestrator, without reaching into Agent.EnableDelegation() or the internal DelegateTool. Events fire in both streaming and non-streaming orchestration.AfterTextCompletion delegate signature changed: added ref bool skipThinking parameter. Callers implementing the ModelController.AfterTextCompletion delegate must update their signatures.TextTranslation.AfterTextCompletion event removed: replaced by TranslationProgress. Migrate from AfterTextCompletionEventArgs.Text to TranslationProgressEventArgs.TranslatedChunk.SupervisorOrchestrator now emits OrchestrationStreamTokenType.Delegation tokens (LMKit.Agents.Orchestration): when the supervisor delegates to a worker via the delegate_to_agent tool, streaming consumers now receive a typed Delegation token (with from_agent, to_agent, and task metadata) immediately before the worker's AgentStarted token. Previously this token type was defined but never emitted, forcing UI code to infer delegation by parsing ToolCall metadata.Agent.EnableDelegation() is now idempotent (LMKit.Agents): repeated calls return the same DelegateTool instance instead of constructing a new one and overwriting the prior registration. BeforeDelegation, AfterDelegation, and AfterTextCompletion handlers subscribed before wrapping the agent in a SupervisorOrchestrator now fire reliably during orchestration. Added DelegateTool.ToolName constant ("delegate_to_agent") for registry lookups.OcrParameters, PdfSearchableMakerOptions, and PdfGenerationOptions now accept optional Languages and EnableOrientationDetection overrides. The PDF OCR server endpoint exposes languages and detect_orientation fields.Thinking tokens for internal reasoning segments.gemma4:e2b, gemma4:e4b, and gemma4:26b-a4b: Google Gemma 4 multimodal Mixture-of-Experts models with vision and tool calling support.'translategemma3:4b' and 'translategemma3:12b'. Google TranslateGemma 3 open translation models built on Gemma 3, supporting 55 languages with text and image inputs.Translation model capability (ModelCapabilities.Translation): New flag identifying models specifically trained for multilingual translation.'nemotron3-nano:4b'. NVIDIA Nemotron 3 Nano 4B, an edge-ready hybrid Mamba-2/Transformer model (3.97B parameters) with 262K context, supporting reasoning, agentic tasks, math, code, and tool calling.Embedder.GetQueryEmbeddings and Embedder.GetQueryEmbeddingsAsync (LMKit.Embeddings): compute embeddings with model-specific query instruction prefixes applied. Modern embedding models (Qwen3 Embedding, Nomic Embed, BGE v1.5) are trained with asymmetric prefixes for queries versus passages; these methods apply the correct prefix automatically based on the loaded model's architecture.RagEngine.FindMatchingPartitions and FindMatchingPartitionsAsync now apply the model's query instruction prefix when embedding search queries, improving retrieval recall without any code changes.qwen3-coder:30b-a3b and lightonocr-2-bbox:1b.SearchHighlightEngine (LMKit.Document.Search): searches text in paginated documents (PDF or image) and produces a highlighted copy. Supports exact, regex, and fuzzy (Damerau-Levenshtein) matching. Accepts optional pre-computed PageElement instances for raster PDFs or images.SearchHighlightOptions, SearchHighlightResult, HighlightAppearance, and SearchMode enum (LMKit.Document.Search).pdf_search_highlight built-in tool: searches text in a PDF and saves a highlighted copy with matches visually marked.LM.TensorOverride (LMKit.Model): enables fine-grained control over tensor device placement via regex pattern matching, particularly useful for offloading MoE (Mixture of Experts) expert weights to CPU while keeping attention layers on GPU. Includes factory methods TensorOverride.Cpu(pattern) and TensorOverride.Gpu(pattern, gpuIndex).LM.DeviceConfiguration.TensorOverrides property to configure per-tensor device placement at model load time.MultiTurnConversation (LMKit.TextGeneration): when AgentMemory.ExtractionMode is set to LlmBased, conversations now automatically extract and store facts after each turn. Previously, automatic extraction only worked through the Agent pipeline. This enables memory extraction for RagChat, PdfChat, and direct MultiTurnConversation usage.qwen3.5:0.8b, qwen3.5:2b, qwen3.5:4b and qwen3.5:9b.glm-4.6v-flash.glm-ocr: Z.ai GLM-OCR 0.9B vision-language model specialized in document parsing, OCR, and structured information extraction.qwen3.5:27b (27B dense hybrid GDN model) and qwen3.5:35b-a3b (35B MoE, 3B active). Both support chat, vision, tool calling, code completion, math, and OCR with a native 262K context window. The qwen3-vl:30b model card is now deprecated in favor of qwen3.5:35b-a3b.RagChat (LMKit.Retrieval): A turnkey multi-turn conversational RAG class that wraps a user-managed RagEngine with an internal MultiTurnConversation. Implements IMultiTurnConversation and orchestrates query contextualization, retrieval dispatch, prompt construction, and grounded response generation in a single call. Supports all four QueryGenerationMode strategies, tools, skills, and agent memory.RagQueryResult (LMKit.Retrieval): Returns type for RagChat.Submit/SubmitAsync, exposing the generated TextGenerationResult alongside the IReadOnlyList<PartitionSimilarity> used as context.RetrievalCompletedEventArgs (LMKit.Retrieval.Events): Event arguments for the RagChat.RetrievalCompleted event, providing the retrieval query, matched partitions, requested count, and elapsed time.RetrievalDefaults (LMKit.Retrieval): A static class centralizing default constants for the retrieval subsystem (e.g. MinRelevanceScore), used consistently by RagChat, PdfChat, RagEngine, and VectorSearch.QueryGenerationMode on PdfChat and RagChat):
Contextual: Follow-up questions are automatically reformulated into self-contained queries before retrieval, configurable via QueryContextualizationOptions.MultiQuery: Generates multiple query variants and merges results using Reciprocal Rank Fusion for improved recall, configurable via MultiQueryOptions.HypotheticalAnswer: Generates a hypothetical answer and uses it as the retrieval query, bridging the gap between question and document phrasing, configurable via HydeOptions.MmrLambda on RagEngine and PdfChat): Reduces near-duplicate passages in retrieval results by balancing relevance against diversity.ContextWindow on RagEngine and PdfChat): Automatically includes neighboring partitions around each match, providing the LLM with surrounding context for more accurate answers.IRetrievalStrategy on RagEngine and PdfChat):
VectorRetrievalStrategy: Semantic similarity via cosine distance on embeddings (default, unchanged behavior).Bm25RetrievalStrategy: BM25+ lexical ranking with configurable term saturation (K1), length normalization (B), long-document floor (Delta), proximity boosting (ProximityWeight), language-aware stopword filtering (Language), and custom stopword support (CustomStopWords).HybridRetrievalStrategy: Combines vector and BM25 strategies with weighted Reciprocal Rank Fusion, configurable via VectorWeight, KeywordWeight, and RrfK.MarkdownToPdf converter (LMKit.Document.Conversion) with full formatting support (headings, bold/italic, code blocks, lists, blockquotes, tables, links, horizontal rules).EmlToPdf converter (LMKit.Document.Conversion) with embedded attachment support.markdown_to_pdf and eml_to_pdf built-in document tools.paddleocr-vl:0.9b.VlmOcrIntent enum and VlmOcr(LM, VlmOcrIntent) constructor for explicit OCR intent selection (plain text, table, formula, chart, coordinates, seal, Markdown).VlmOcr.GetSupportedIntents(LM) to query the intents a model is known to support with dedicated behavior.Canvas drawing API (LMKit.Graphics.Drawing): A fluent, in-place 2D drawing surface backed by ImageBuffer with coverage-based antialiasing, Pen/Brush styling, and support for lines, rectangles, quadrilaterals, ellipses, polygons, and rounded rectangles.VlmOcrIntent.OcrWithCoordinates). Each recognized text region is returned as a TextElement with a bounding box mapped back to the original source image coordinates.LMKit.TextGeneration.Filters).
FilterPipeline with IPromptFilter, ICompletionFilter, and IToolInvocationFilter following the ASP.NET Core middleware (onion) pattern.MultiTurnConversation and Agent.LMKit.TextGeneration.Prompts).
PromptTemplate class with Mustache syntax, conditionals, loops, filter chaining, custom helpers, and strict mode.AgentMemory.UserScopedMemory for multi-user memory isolation.AgentMemory.ConsolidateAsync on AgentMemory.SummarizeConversationAsync on AgentMemory.MemoryEstimation static class in LMKit.Hardware for accurate VRAM/context fitting.LMKit.Document.Conversion:
MarkdownHtmlConverter.MarkdownToHtml(string) method to convert Markdown to HTML.MarkdownHtmlConverter.HtmlToMarkdown(string) method to convert HTML back to Markdown.MarkdownDocxConverter.MarkdownToDocx(string) and MarkdownDocxConverter.MarkdownToDocxFile(string, string) methods to convert Markdown to DOCX.MarkdownDocxConverter.DocxToMarkdown(...) overloads for DOCX byte arrays and DOCX file paths.convert_markdown_to_html and convert_html_to_markdown.ConfidenceScore property on TextExtractionResultElement exposes a [0.0, 1.0] quality score computed from per-token probabilities during grammar-constrained generation.HumanVerificationRequired property on TextExtractionResult signals when any element falls below the configurable threshold.HumanVerificationThreshold property on TextExtraction (default 0.7) controls the verification flag.Progress event on TextExtraction reports phase transitions: OcrProcessing, Extracting, PostProcessing, Completed.ExtractionPhase enum and ExtractionProgressEventArgs class.EntityKind public enum (102 values) identifies the semantic kind of each extracted field (email, phone, IBAN, postal code, URI, etc.).DetectedEntityKind property on TextExtractionElement exposes the automatically inferred entity kind.Validation property on TextExtractionResultElement returns an EntityValidationResult with Status (Valid, Invalid, Repaired, NotApplicable), EntityKind, and OriginalValue (when repaired).HumanVerificationRequired flag alongside low confidence scores.NullOnDoubt is disabled, enabling inspection without value nullification.HtmlChunking class implements IChunking with DOM-aware splitting using AngleSharp.StripBoilerplate option (default: true) removes nav, footer, sidebar, and ad containers.PreserveHeadingContext option (default: true) prepends heading breadcrumb trail to chunks.ExtractPagesAsync overloads for file-path based extraction (pageRange and pageIndexes).SplitToFilesAsync overloads for attachment and file-path workflows (including DocumentSplittingResult-based splitting).CancellationToken.TextExtractionElementFormat.Pattern supports regex patterns and compact descriptors such as 4N-26A2N-1A.SetElementsFromJsonSchema parse + JsonSchema generation).String and StringArray fields when pattern conversion is supported.IToolMetadata interface:
IToolMetadata, exposing Category, SideEffect, RiskLevel, DefaultApproval, IsIdempotent, and IsReadOnly.ToolSideEffect enum: None, LocalRead, LocalWrite, NetworkRead, NetworkWrite, Irreversible.ToolRiskLevel enum: Low, Medium, High, Critical.ToolApprovalMode enum: Never, Conditional, Always.ITool implementations may optionally implement IToolMetadata to participate in policy-based governance.ToolPermissionPolicy for centralized tool access control:
Allow(), Deny(), AllowCategory(), DenyCategory(), RequireApproval(), RequireApprovalForCategory(), and SetMaxRiskLevel().Deny("fs.*")) and category-level rules.DefaultAction (Allow or Deny) for whitelist/blacklist modes.ToolPermissionResult enum: Allowed, Denied, ApprovalRequired.ToolApprovalRequestEventArgs event args class with ToolCall, Tool, RiskLevel, SideEffect, Approved, and DenialReason properties.BeforeToolInvocationEventArgs now exposes Tool and PermissionResult properties for policy-aware interception.ToolPermissionPolicy integration to ToolRegistry and AgentBuilder:
ToolRegistry.PermissionPolicy property for attaching a policy to the registry.ToolRegistry.EvaluatePermission(ITool) method for programmatic policy checks.AgentBuilder.WithPermissionPolicy() methods (direct and inline configuration).BuiltInTools:
GetByMaxRisk(ToolRiskLevel): filter tools by maximum risk level.GetByCategory(string): filter tools by category.GetReadOnly(): get all read-only tools.ToolInfo with rich security metadata:
Category, SideEffect, RiskLevel, DefaultApproval, IsIdempotent, and IsReadOnly in addition to existing HasIOCapabilities.pdf_search built-in document tool and reusable LMKit.Document.Pdf.PdfSearch API:
pdf_search for searching text in PDF files with page ranges, case sensitivity, result limits, and contextual snippets.PdfSearchTool now delegates to LMKit.Document.Pdf.PdfSearch (domain logic moved out of tool layer).PdfSearch now uses existing LayoutSearchEngine + TextSearchOptions.PdfSearch.FindTextAsync(...) and sync wrapper PdfSearch.FindText(...).filesystem_search built-in IO tool for recursive file search:
FileSystemToolOptions policy.http_download built-in Net tool for streaming file downloads:
FileSystemTool, ProcessTool, CompressTool, ClipboardTool, HttpTool, FtpTool, DatabaseTool, SpreadsheetTool) have been replaced by individual atomic tools, each performing exactly one operation.PdfSplitTool now handles split operations only; new PdfExtractTool handles page extraction.BuiltInTools factory properties updated: BuiltInTools.FileSystem is now BuiltInTools.FileSystemRead, BuiltInTools.HttpGet is now BuiltInTools.HttpGet, etc.AddFileSystemTools(), AddHttpTools(), AddProcessTools(), etc. via BuiltInToolsExtensions.ToolPermissionPolicy wildcard patterns now work with atomic names: Allow("filesystem_*"), Deny("filesystem_delete"), RequireApproval("process_*").PdfSplitter class for physically splitting PDF documents by page ranges.
Attachment instances or file paths.ExtractPages methods for single output and Split/SplitToFiles methods for multi-output splitting.DocumentSplittingResult to extract AI-detected segments into separate PDF files.DocumentSplitting class for detecting logical document boundaries within multi-page files.DocumentSplittingResult class.DocumentSegment class.PdfMerger class for merging multiple PDF documents into one.
Attachment instances or file paths.Merge methods for in-memory output and MergeToFile/MergeFiles methods for file output.DatabaseTool to built-in tools for SQLite database operations.
SpreadsheetTool to built-in tools for Excel (.xlsx) file operations.
RssFeedTool to built-in tools for RSS and Atom feed operations.
ClipboardTool to built-in tools for system clipboard access.
FtpTool to built-in tools for FTP file transfer operations.
PdfToImage class to support JPEG output.
RenderToFiles now accepts "jpg" as a format option.ImageToPdf class for converting images into PDF documents.
Attachment inputs.PdfUnlocker class for removing password protection from PDFs.
Attachment inputs with file or in-memory output.SaveAsJpeg method to ImageBuffer.
Document category to built-in tools with 11 document processing tools.
PdfSplitTool: Extract pages, split PDFs by ranges, and query page count.PdfInfoTool: Retrieve page count, dimensions, metadata, and text content from PDFs.PdfToImageTool: Render PDF pages as JPEG, PNG, or BMP images with configurable zoom and quality.PdfMergeTool: Merge multiple PDF files into a single output file.ImageToPdfTool: Convert one or more JPEG, PNG, or BMP images into a single PDF document.PdfUnlockTool: Remove password protection from a PDF using the known password.ImageDeskewTool: Detect and correct skew in scanned documents.ImageCropTool: Auto-crop uniform borders from scanned documents and images.ImageResizeTool: Resize images with exact dimensions or aspect-ratio-preserving box fit, convert pixel formats.DocumentTextTool: Extract text from PDF, DOCX, XLSX, PPTX, and HTML files.OcrTool: Extract text from images using Tesseract OCR with support for 34 languages.SupervisorOrchestrator to use a single-pass execution model.
ExecuteAgentAsync call, since AgentExecutor handles multi-turn tool calling internally.DelegateTool to return plain text on successful delegation.
AfterTextCompletion event to DelegateTool for streaming worker tokens in real time.SupervisorOrchestrator now wires up BeforeDelegation, AfterDelegation, and AfterTextCompletion events to emit AgentStarted, Content, and AgentCompleted stream tokens for worker agents.SupervisorOrchestrator.DefaultSupervisorPrompt to instruct the supervisor to relay single-worker responses verbatim.minicpm-o-45, lightonocr-2:1b, and glm4.7-flash.StripStyleAttributes property to VlmOcr.LM-Kit.NET.Integrations.ExtensionsAI NuGet package for Microsoft.Extensions.AI integration.
IChatClient via LMKitChatClient, enabling LM-Kit.NET models to be used through the standard Microsoft.Extensions.AI abstraction layer.IEmbeddingGenerator<string, Embedding<float>> via LMKitEmbeddingGenerator for embedding generation.AIFunction/AITool to LMKit's ITool interface.ChatOptions properties include: Temperature, TopP, TopK, MaxOutputTokens, StopSequences, FrequencyPenalty, PresencePenalty, ToolMode, and JSON response format.ChatResponse.IServiceCollection extension methods (AddLMKitChatClient and AddLMKitEmbeddingGenerator) for dependency injection.IOrchestrationStreamHandler interface for handling streaming output from multi-agent workflows.DelegateOrchestrationStreamHandler with built-in console output handlers.OrchestrationStreamToken class with agent context (agent name, step, token type).StreamHandler and StreamToolCalls properties to OrchestrationOptions.StreamAsync, StreamContentAsync, RunStreamingAsync, and RunStreamingToConsoleAsync.SupervisorOrchestrator, PipelineOrchestrator, ParallelOrchestrator, and RouterOrchestrator.ConversationId property to the ChatHistory class for session correlation across distributed systems.SamplingRequested event and SetSamplingHandler method for handling sampling requests.McpSamplingRequest, McpSamplingResponse, McpSamplingMessage, and McpModelPreferences classes.AddRoot, RemoveRoot, ClearRoots methods for managing roots.RootsRequested event for server root list requests.McpRoot class with FromPath factory method.ElicitationRequested event and SetElicitationHandler method.McpElicitationRequest and McpElicitationResponse classes.ProgressReceived event for progress notifications.CreateProgressToken, UnregisterProgressToken, and SendProgress methods.McpProgressToken and McpProgressEventArgs classes.CancellationReceived event for cancellation notifications.CancelRequest method to send cancellation notifications.McpCancellationEventArgs class.LogMessageReceived event for log messages.SetLogLevel method to configure minimum log level.McpLogLevel enum and McpLogMessageEventArgs class.GetPromptCompletions and GetResourceCompletions methods.McpCompletionResult class.GetResourceTemplates and RefreshResourceTemplates methods.McpResourceTemplate class.SubscribeToResource and UnsubscribeFromResource methods.ResourceUpdated event and McpResourceUpdatedEventArgs class.gen_ai.client.token.usage histogram metric with token type tagging (input/output).gen_ai.client.operation.duration histogram metric.gen_ai.conversation.id span attribute for session correlation.gen_ai.response.id span attribute for response identification.gen_ai.response.finish_reasons span attribute (stop, length, tool_calls, etc.).gen_ai.request.temperature, gen_ai.request.top_p, and gen_ai.request.top_k span attributes.gen_ai.request.max_tokens span attribute.gen_ai.embeddings.dimension.count span attribute for embedding operations.gen_ai.agent.name, gen_ai.agent.id, and gen_ai.agent.description.gen_ai.tool.name and gen_ai.tool.call.id.IMcpTransport interface for transport abstraction.StdioTransport class for subprocess-based MCP communication.StdioTransportOptions class for detailed stdio configuration.McpTransportException class for transport-specific errors.McpClientBuilder class for fluent client construction.ForStdio factory methods to the McpClient class.TransportType, IsStdioTransport, and Transport properties to McpClient.LMKit.Agents namespace with comprehensive agent framework.
Agent, AgentBuilder, AgentExecutor, AgentRegistry.AgentCapabilities, AgentIdentity, AgentExecutionOptions.AgentExecutionResult, AgentExecutionStatus.LMKit.Agents.Orchestration namespace.
IOrchestrator interface with PipelineOrchestrator, ParallelOrchestrator, RouterOrchestrator, and SupervisorOrchestrator implementations.OrchestrationContext, OrchestrationOptions, OrchestrationResult.LMKit.Agents.Tools.BuiltIn namespace with 56 built-in tools.
JsonTool, XmlTool, CsvTool, YamlTool, HtmlTool, MarkdownTool, CountryTool, QRCodeTool, Base64ImageTool, IniTool.TextTool, DiffTool, RegexTool, TemplatingTool, EncodingTool, SlugTool, PhoneticTool, FuzzyTool, AsciiArtTool.CalculatorTool, ConversionTool, StatsTool, RandomTool, GuidTool, IpCalcTool, FinancialTool, BitwiseTool, CurrencyTool, ExpressionTool.HashTool, CryptoTool, ValidatorTool, JwtTool, ChecksumTool, PasswordTool.DateTimeTool, CronTool, SemVerTool, UrlTool, ColorTool, PerformanceTool, PathTool, MimeTool, TimeZoneTool, LocaleTool, HumanizeTool, DurationTool, ScheduleTool.FileSystemTool, EnvironmentTool, ProcessTool, CompressTool, WatchTool.HttpTool, NetworkTool, SmtpTool, WebSearchTool.BuiltInTools and fluent registration extensions.LMKit.Agents.Planning namespace.
IPlanningHandler interface with ReActHandler, ChainOfThoughtHandler, TreeOfThoughtHandler, PlanAndExecuteHandler, and ReflectionHandler implementations.PlanningStep, PlanningStepResult, PlanningContext, PlanningStrategy.LMKit.Agents.Delegation namespace.
DelegationManager, DelegateTool, IDelegationRouter.DelegationRequest, DelegationResult.LMKit.Agents.Streaming namespace.
IAgentStreamHandler interface with BufferedStreamHandler, MulticastStreamHandler, TextWriterStreamHandler, DelegateStreamHandler.StreamingAgentExecutor, AgentStreamResult, AgentStreamToken.LMKit.Agents.Resilience namespace.
IResiliencePolicy interface with RetryPolicy, CircuitBreakerPolicy, TimeoutPolicy, RateLimitPolicy, BulkheadPolicy, FallbackPolicy, CompositePolicy.ResilientAgentExecutor, FallbackAgentExecutor, AgentHealthCheck.LMKit.Agents.Observability namespace.
IAgentTracer interface with ConsoleTracer, InMemoryTracer, CompositeTracer, NoOpTracer.AgentSpan, AgentMetrics, AgentTracing, TracingAgentExecutor, JsonTraceExporter.LMKit.Agents.Templates namespace.
AgentTemplate base class with 18 pre-built templates: ChatAgentTemplate, AssistantAgentTemplate, ToolAgentTemplate, ReActAgentTemplate, CodeAgentTemplate, WriterAgentTemplate, AnalystAgentTemplate, PlannerAgentTemplate, ResearchAgentTemplate, ReviewerAgentTemplate, SummarizerAgentTemplate, ExtractorAgentTemplate, TutorAgentTemplate, TranslatorAgentTemplate, ClassifierAgentTemplate, DebuggerAgentTemplate, EditorAgentTemplate, QAAgentTemplate.AgentTemplates.LMKit.Agents.Skills namespace with Agent Skills Protocol support.
AgentSkill, SkillRegistry, SkillBuilder, SkillActivator, SkillParser.SkillMetadata, SkillContext, SkillMatch, SkillResource.SkillInjectionMode, SkillResourceType.SkillRegisteredEventArgs, SkillRemovedEventArgs.SkillParseException./skill-name arguments).MultiTurnConversation class.
Skills property for registering tool collections.RegisterSkill and RegisterSkillAsync methods.UnregisterSkill method.SkillInvoked and SkillCompleted events.EnableSkills property to control skill execution.whisper-large2 and devstral-small2.LMKit.Speech.Dictation namespace with Formatter, Command, CommandInfo, CommandMatch, and FormatterOptions classes for dictation text formatting.SuppressHallucinations property to the SpeechToText class.SuppressNonSpeechTokens property to the SpeechToText class.NamedEntityRecognitionTrainingDataset class.DeleteDocument and DeleteDocumentAsync methods to the DocumentRag class.AddDataSource and AddDataSourceAsync overloads to the RagEngine class that load an existing DataSource from a vector store.LoadWarnings and HasLoadWarnings properties to the DataSource class for inspecting sections that could not be read during partial loading.LoadWarning class.nemotron3-nano and falcon-h1r:7b.ModelID property to the LM class.PromptTokenCount and PromptProcessingRate properties to the TextGenerationResult class.GeneratedTokenCount property to the TextGenerationResult class.AttachmentReference class.GetText and GetTextAsync overloads to the Attachment class that take a page range as a parameter.Structured and Auto members to the TextOutputMode enumeration.SetText overloads to the Attachment class that accept a page index.CreateFromUriAsync factory method to the Attachment class for loading attachments from remote URIs.CreateFromFileAsync and CreateFromStreamAsync factory methods to the Attachment class for asynchronous loading.HasTextOnPage and HasTextOnPageAsync methods to the Attachment class.IMultiTurnConversation enumeration.FileSystemVectorStore class.IChunking interface.MarkdownChunking class.QueryPartitions and QueryPartitionsAsync overloads to RagEngine that accept a custom prompt template.DocumentRag class.PdfChat class.DocumentReference class.DocumentIndexingResult class.DocumentImportProgressEventArgs class.CacheAccessedEventArgs class.PassageRetrievalCompletedEventArgs class.ResponseGenerationStartedEventArgs class.DocumentImportPhase enumeration.DocumentQueryResult class.PageProcessingMode class.MaximumCompletionTokens and StripImageMarkup properties to the VlmOcr class.SetContent overloads to the TextExtraction class that accept a page index or a page range.LMKitTelemetry class.VlmOcr engine.SpeechToText engine.Prompt class, use ChatHistory.Message instead.