-
Notifications
You must be signed in to change notification settings - Fork 5
Releases: YumchaLabs/siumai
v0.11.0-beta.9
28cf639 Added
- (elevenlabs) add voice edit resources
- (elevenlabs) add PVC verification resources
- (elevenlabs) add PVC sample resources
- (elevenlabs) add PVC voice metadata resources
- (elevenlabs) add IVC voice creation
- (elevenlabs) add voice delete resources
- (elevenlabs) add voice settings resources
- (elevenlabs) add pronunciation dictionary download
- (elevenlabs) add pronunciation dictionary rule mutations
- (elevenlabs) add pronunciation dictionary metadata update
- (elevenlabs) add pronunciation dictionary file creation
- (elevenlabs) add pronunciation dictionary rule creation
- (elevenlabs) add pronunciation dictionary resources
- (elevenlabs) add voice resources
- (elevenlabs) expose facade audio provider
- (deepgram) expose facade provider surface
- (cerebras) add openai compatible provider surface
- (gateway) add vercel ai gateway provider
Fixed
- harden feature matrix clippy
- clean ci all-features failures
- preserve hosted tool result ownership
- (bedrock) align enterprise provider package surface
Other
- route legacy content through compat imports
- deepen provider harness contracts
- clarify cancelable stream contract
- refresh provider model catalogs
- retire minimaxi ollama model constants
- narrow facade compat types
- classify compatibility shims
- split video facade helpers
- split image facade helpers
- split prelude facade module
- split experimental facade module
- split facade namespace modules
- narrow tooling facade exports
- guard openai-compatible provider aliases
- narrow retry facade exports
- narrow ui facade exports
- guard google provider facade alias
- scope legacy provider params
- scope prompt data helpers out of unified prelude
- narrow registry and provider utility boundaries
- harden clean architecture boundaries
- isolate legacy content compatibility surface
- deepen provider and bridge module boundaries
Added
- Added
siumai-provider-utilsas the shared home for AI SDK-style provider/protocol helpers. - Added explicit content namespaces:
siumai::content::prompt,siumai::content::output, andsiumai::content::compat. - Added first-class provider surfaces for Cerebras, Vercel AI Gateway, and ElevenLabs voice/pronunciation-dictionary resources.
Changed
- Aligned streaming, tool ownership, usage, diagnostics, and unsupported-capability behavior with Vercel AI SDK semantics across spec, core, protocol, bridge, registry, and facade APIs.
- OpenAI Responses now preserves provider-executed hosted tool results, final response text/reasoning replay, cumulative usage snapshots, and private raw diagnostics more consistently.
- Registry and provider construction now prefer family-first handles for language, embedding, image, rerank, speech, transcription, and video models, while compatibility
LlmClientpaths stay scoped to migration and extension use. - Bridge request normalization and OpenAI-compatible message conversion now preserve existing public helpers while improving provider-specific OpenAI Responses, Chat Completions, Anthropic Messages, Gemini GenerateContent, Perplexity, DeepSeek, xAI, and Mistral behavior.
- Errors shown through normal user-facing APIs are safer by default; raw provider messages, headers, bodies, and request/response details stay in explicit diagnostics paths.
- Legacy
ContentPartremains available from explicit compatibility namespaces, and high-value production use now imports those paths directly while the broader root-path move remains gated by ADR-0008.
Removed
- Removed the no-op
SiumaiBuildercapability flag methods:with_capability(),with_audio(),with_embedding(), andwith_image_generation().
Migration Notes
- New provider/protocol code should import shared helpers from
siumai-provider-utilsinstead of oldersiumai-core::utils::*paths. - Import legacy
ContentPartfrom explicit compatibility paths such assiumai::compat::content::ContentPartorsiumai::content::compat::ContentPart. - Prefer registry family handles and provider-specific builders for stable model execution; keep generic
LlmClientconstruction for compatibility or extension-only integration paths. - Replace removed
SiumaiBuilder::with_*capability flags with explicit provider builders, registry family handles, or extension modules.
Assets 2
v0.11.0-beta.8
412a79f Stabilization release after 0.11.0-beta.7. Most chat/text users can upgrade by changing the Cargo
version only. Review the notes below if you use OpenAI-compatible streaming, SiliconFlow, Gemini
Interactions, MCP HTTP, or deprecated beta-era aliases.
Fixed
- Fixed OpenAI-compatible streaming dropping whitespace and line-break-only text deltas. This fixes
#19; thanks @longzou for the report. - Fixed SiliconFlow streaming usage reporting for the built-in preset. This fixes
#20; thanks @longzou for the report. - Improved OpenAI and OpenAI-compatible streaming metadata, including final usage and raw finish
reasons.
Added
- Added Gemini Interactions request, response, streaming, and reconnect support across the public
provider paths. - Added OpenAI support for
gpt-image-2image models and Responses allowed-tools options.
Changed
- Updated
siumai-extrasMCP integration to the current streamable HTTP transport and refreshed
the related examples. - Aligned more provider package surfaces with the AI SDK-style construction model, including
OpenAI, Azure, Google Vertex, xAI, and OpenAI-compatible vendors.
Upgrade Notes
- If you used deprecated beta-era root/prelude/provider aliases, move to registry, model-family
modules, orprovider_ext::*. - If you used
execute_json_request_with_headers(...), useexecute_json_request(...)with
HttpExecutionConfigandProviderSpec. - If your tests snapshot raw stream chunks, update snapshots that assumed whitespace-only deltas
were omitted. - For MCP HTTP integrations, prefer
siumai_extras::mcp::mcp_tools_from_http.
Assets 2
v0.11.0-beta.7
This beta focuses on AI SDK compatibility, provider metadata correctness, and making the public
facade easier to use. Most regular chat/text callers should not need code changes, but users who
inspect raw provider metadata, AI SDK projection structs, or serialized compatibility types should
read the upgrade notes below.
Highlights
- Much broader AI SDK-style facade coverage for text, structured output, embedding, rerank, image,
video, speech, transcription, tools, telemetry, downloads, JSON helpers, schema helpers, and
provider utility functions. - More complete provider response metadata across text, completion, streaming, structured output,
embedding, rerank, image, video, audio, and transcription helpers. - Simpler model-family APIs across embedding, image, rerank, speech, transcription, and video:
helpers now use the canonical*Modeltraits directly, with AI SDK-facing V4 markers reserved
for provider-contract alignment. - Stronger OpenAI Responses API and OpenAI-compatible provider alignment, including xAI, Groq,
DeepSeek, TogetherAI, Perplexity, Alibaba/Qwen, Mistral, Fireworks, MoonshotAI, DeepInfra, and
Vertex MaaS paths. - Google Vertex and Anthropic-on-Vertex now have a more complete settings/model surface and better
image, video, base-url, auth, and metadata behavior. - Live smoke coverage now verifies OpenAI, Anthropic, Gemini, DeepSeek, and Groq through both
builder and registry construction paths.
Migration from 0.11.0-beta.6
Most chat/text applications can upgrade by changing the Cargo version only. Review the migration
items below if your code implements models, matches stream events, uses struct literals for shared
types, or snapshots serialized responses.
- Replace transitional Rust text-family trait imports such as
TextModelV3withTextModel.
UseLanguageModelfor normal text-generation models and reserveLanguageModelV4for
AI SDK provider-contract integrations. - Prefer the canonical family traits in application generics:
TextModel,EmbeddingModel,ImageModel,RerankingModel,SpeechModel,
TranscriptionModel, andVideoModel. Only useImageModelV4/VideoModelV4when calling
the explicit AI SDK V4 helper surface or implementing provider-contract adapters. - If you match stream events directly, read semantic stream data through
event.text_delta(),event.reasoning_delta(),event.finish_usage(), or
event.part_ref()instead of matching older text/reasoning/tool delta variants or provider
custom payloads. - If you construct
Usagewith struct literals or read legacy usage fields directly, switch to
Usage::new(...),Usage::builder(),prompt_tokens(),completion_tokens(),
total_tokens(),input_tokens, andoutput_tokens. - Update JSON snapshots for AI SDK-aligned public field names and metadata shapes, especially
ToolChoice,FinishReason,Warning,Usage,ResponseMetadata,providerMetadata, and
stream parts. - If you need raw provider envelopes for audit/debugging, opt into the new request/response body
retention controls instead of parsing formatted debug strings.
Full guide: docs/migration/migration-0.11.0-beta.7.md
Added
- Added AI SDK-style
generate_textprojection controls, including optional request/response body
retention for callers that need raw provider envelopes. - Added AI SDK-style structured output helpers such as
generate_object,generate_array,
generate_enum, schema-less JSON helpers, repair callbacks, and partial JSON parsing utilities. - Added AI SDK-style result views for embedding, rerank, image, video, speech, transcription, and
media helpers while keeping the existing provider-owned runtime APIs available. - Added provider utility helpers for downloads, serial job execution, headers, user-agent suffixes,
URL support checks, JSON parsing/instruction injection, schema validation, provider references,
reasoning options, binary/base64 conversion, and tool-name mapping. - Added more package-level provider settings surfaces, including OpenAI-compatible vendors,
Anthropic, Cohere, DeepSeek, Groq, xAI, TogetherAI, Google Vertex, Anthropic-on-Vertex, and
Vertex MaaS. - Added an Axum text stream response helper in
siumai-extrasfor exposingChatStreamtext as a
text/plain; charset=utf-8HTTP response. - Added broader unified-prelude exports for shared AI SDK-style types, request options, model call
options, usage helpers, prompt/message shapes, tools, middleware, and provider factories.
Changed
RequestOptionsare now honored more consistently across facade helpers: retry defaults,
headers, total timeout, and cancellation are propagated where the underlying runtime supports
them.ToolChoiceandFinishReasonnow serialize with AI SDK-compatible public values while still
accepting older Rust/provider spellings on input where possible.- AI SDK V4-facing provider options, provider metadata, tool results, generated files, warnings,
usage, and stream part overlays are stricter and closer to upstream shapes. - OpenAI, Azure, Bedrock, Google Vertex, Anthropic-on-Vertex, Gemini, xAI, Groq, DeepSeek, Ollama,
and OpenAI-compatible provider paths now preserve more raw usage, finish reason, source,
hosted-tool, and response metadata. - Streaming now uses AI SDK-style
ChatStreamPartas the canonical public stream model for text,
reasoning, tools, usage, sources, and metadata. - Rust model-family trait names are now consistent:
TextModel,EmbeddingModel,ImageModel,
RerankingModel,SpeechModel,TranscriptionModel, andVideoModelare the primary public
extension points. - Google Vertex Gemini image generation now uses the Gemini content-generation path for Gemini
image models, with provider-specific image options scoped to the Vertex provider options lane.
Fixed
- Fixed many cases where provider request or response metadata was dropped from
generate_text,
structured output, completion, streaming, audio, image, embedding, and rerank helpers. - Fixed missing response bodies and response headers on several OpenAI, OpenAI-compatible, Google,
Cohere, Bedrock, TogetherAI, and completion paths. - Fixed streaming metadata loss on synthetic stream endings and improved streamed usage/finish
reason preservation across providers. - Fixed several OpenAI Responses API hosted-tool event mappings, including web/file search,
computer use, code interpreter, MCP, local shell, apply-patch, and image generation stream parts. - Fixed provider-specific JSON response format, structured output, reasoning, thinking, prompt
cache, usage, and citation handling for multiple OpenAI-compatible vendors. - Stabilized the live provider smoke test so it is less sensitive to model sampling and token
budget differences.
Upgrade Notes
- Google Vertex Gemini image requests now reject unsupported mask and multi-image count settings on
the Gemini image path instead of silently routing them through the wrong provider mode. - Live provider smoke tests now default Gemini to
gemini-2.5-flash-liteand retry transient
network/provider errors. SetSIUMAI_ENV_SMOKE_STRICT=1to fail instead of self-skipping known
account, region, or quota denials.
Assets 2
v0.11.0-beta.6
Highlights
- Fearless Refactor V3 introduces family-first Rust APIs (
siumai::{text,embedding,image,rerank,speech,transcription}) while moving legacy method-style entry points into an explicit compatibility module (siumai::compat). - The recommended construction path now clearly favors registry/config-first provider clients; builder-style entry points remain available as migration-friendly compatibility conveniences.
- Advanced bridge/gateway support becomes much more usable, with request normalization plus cross-protocol request/response/stream transcoding for proxy and gateway scenarios.
- Provider parity improved across native and OpenAI-compatible integrations, so facade, registry, and direct provider clients behave more consistently.
- Family calls now support richer per-call overrides, and config-first providers can attach interceptors and model middlewares directly from
*_Config.
Added
- Model-family V3 traits in
siumai-corefor text, embedding, image, rerank, speech, and transcription. - New family API modules in the
siumaifacade:siumai::{text,embedding,image,rerank,speech,transcription}. siumai::tooling, a runtime tool surface that binds tool schemas to executable handlers for orchestrator/tool-loop workflows.siumai::compat, an explicit home for legacy compatibility entry points.- Per-request
HttpConfigoverrides (headers + timeout), including streaming requests. - Convenience methods on
dyn LlmClientfor full chat requests:chat_requestandchat_stream_request. - Experimental bridge APIs for inbound request normalization and outbound response/stream transcoding, with customization hooks for hosted tools and gateway adapters.
- Axum gateway runtime and policy helpers, plus reference examples for OpenAI, Anthropic, Gemini, and cross-protocol proxy flows.
- Broader config-first constructors/helper aliases across native and OpenAI-compatible providers, with more consistent exposure of provider params and metadata on the facade.
- OpenAI Responses WebSocket session helpers, including incremental sessions, remote cancellation, and recovery/fallback controls.
- Public batch embedding helpers for Gemini and Vertex models.
Changed
- Documentation and examples now consistently prefer registry/config-first construction and family APIs for inference (for example,
text::generate). - Focused provider wrapper packages, provider factories, and handle routing were aligned so text/image/rerank/embedding flows behave more consistently across registry, facade, and direct provider construction paths.
- Provider request normalization and default base URL behavior are more consistent across facade, registry, and gateway paths.
Deprecated
Siumai::builder()remains available, but is deprecated as the primary construction style. Preferregistry::global().language_model("provider:model")or*Client::from_config(...)for new code.
Fixed
- Streaming and bridge fidelity across OpenAI Responses/Chat, Anthropic, Gemini, and Vertex now preserves more wire-level details, including finish reasons, citations, reasoning metadata, approval items, provider tool results, and web/file search source identity.
- Structured output mapping and JSON-repair/content-filter handling are more reliable across both provider-native and bridged responses.
- OpenAI defaults no longer leak Responses-only settings into non-chat requests; audio fallback defaults and chat default backfilling were corrected.
- Family-model and registry paths now preserve per-request config, capability forwarding, and parity for embedding/image/rerank flows more reliably.
Migration guide
- Full guide: docs/migration/migration-0.11.0-beta.6.md
Assets 2
v0.11.0-beta.5
Highlights
- The public API is explicitly Vercel-aligned and fixed to the 6 stable model families: Language / Embedding / Image / Rerank / Speech (TTS) / Transcription (STT).
- Provider-specific features (web search, file search stores, thinking replay, etc.) are extensions by design: provider-hosted tools (
hosted_tools::*) +providerOptions+ typedprovider_ext::*. - Gemini now supports a clean Vertex AI setup (regional base URL helper, ADC token provider, and resource-style model id normalization).
- Fearless refactor phase: workspace split into
siumai-core(runtime/types/standards), provider crates (siumai-provider-*), andsiumai-registry(factories/handles);siumairemains the recommended facade crate.
Breaking changes
- Unified web search was removed. Use provider-hosted tools instead:
- OpenAI:
siumai::hosted_tools::openai::web_search()(Responses API viaOpenAiOptions::with_responses_api) - Anthropic:
siumai::hosted_tools::anthropic::web_search_20250305() - Gemini:
siumai::hosted_tools::google::*(e.g.google_search(),file_search())
- OpenAI:
siumai::providers::<provider>::*is now a stable alias forsiumai::provider_ext::<provider>::*(Vercel-aligned).- Use
siumai::prelude::unified::*for the unified surface. - Use
siumai::provider_ext::<provider>::*for provider-specific APIs. - For protocol-layer helpers, use
siumai::experimental::*(advanced) or depend on the relevant provider crate directly (e.g.siumai-provider-openai).
- Use
- The facade surface was tightened to reduce accidental cross-layer coupling.
- Removed stable entry points:
siumai::{types,traits,error,streaming}::* - Prefer:
use siumai::prelude::unified::*; - For non-unified extension capabilities:
use siumai::extensions::*;+use siumai::extensions::types::*;
- Removed stable entry points:
LlmBuilderis no longer re-exported fromsiumai::prelude::unified::*(breaking).- Prefer
Siumai::builder()(unified) orProvider::<provider>()/siumai::provider_ext::<provider>::*(provider-specific).
- Prefer
- Provider-specific capability traits were removed from the core surface (e.g.
traits::{OpenAiCapability, AnthropicCapability, GeminiCapability, ...}).- Use
siumai::prelude::unified::*for the stable surface, andsiumai::prelude::extensions::*/siumai::provider_ext::<provider>for opt-in provider-specific features.
- Use
- "Audio" is no longer a first-class unified family: prefer
SpeechCapability(TTS) andTranscriptionCapability(STT).- For OpenAI SSE audio/transcript streaming, use provider extensions:
siumai::provider_ext::openai::{speech_streaming, transcription_streaming}.
- For OpenAI SSE audio/transcript streaming, use provider extensions:
- OpenAI’s public API does not expose a rerank endpoint.
- If you call rerank with the default OpenAI base URL (
https://api.openai.com/v1), Siumai returnsUnsupportedOperation. - For rerank, use a rerank-capable provider (e.g.
cohere,togetherai,bedrock) or an OpenAI-compatible vendor that exposes/rerank(e.g.siliconflow).
- If you call rerank with the default OpenAI base URL (
- Vertex base URL helper now prefers the regional host (
https://{location}-aiplatform.googleapis.com); if you hardcodedhttps://aiplatform.googleapis.comyou may want to update.
Added
- New unified prelude modules:
siumai::prelude::unified::*(6 model families only; recommended for new code)siumai::prelude::extensions::*(non-family capabilities; opt-in)
- Registry handles for all six model families:
registry.reranking_model(..),registry.speech_model(..),registry.transcription_model(..)
- Local test tier scripts for faster iteration during fearless refactors:
./scripts/test-fast.sh,./scripts/test-smoke.sh,./scripts/test-full.sh
- M1 "core trio" smoke scripts (fixture audit + transcoding + tool-loop gateway):
- Windows:
./scripts/test-m1.bat - Unix:
./scripts/test-m1.sh
- Windows:
- Split-phase architecture docs:
docs/architecture/architecture-refactor-plan.mddocs/architecture/capability-surface.mddocs/architecture/provider-extensions.md
- Vertex (Gemini) example:
siumai/examples/04-provider-specific/google/vertex_chat.rs(--features "google gcp")
- Vercel-aligned provider-hosted tools (provider-executed tools)
- OpenAI Responses API:
hosted_tools::openai::{web_search,web_search_preview} - Anthropic Messages:
hosted_tools::anthropic::web_search_20250305 - Gemini:
hosted_tools::google::{google_search,file_search,code_execution,url_context,enterprise_web_search}
- OpenAI Responses API:
- OpenAI provider extensions (non-unified streaming)
- TTS SSE audio streaming:
siumai::provider_ext::openai::speech_streaming::tts_sse_stream - STT SSE transcript streaming:
siumai::provider_ext::openai::transcription_streaming::stt_sse_stream(seeexamples/04-provider-specific/openai/stt_sse_streaming.rs)
- TTS SSE audio streaming:
- Anthropic provider extension example
- Thinking replay:
examples/04-provider-specific/anthropic/thinking-replay-ext.rs
- Thinking replay:
- Gateway/proxy streaming utilities (Vercel-aligned
parseStreamPart/formatStreamPartconcept):- Stream encoders:
siumai::experimental::streaming::{encode_chat_stream_as_sse, encode_chat_stream_as_jsonl}(serializeChatStreamEventback into provider-native wire formats) - Non-streaming JSON encoders:
siumai::experimental::encoding::{JsonResponseConverter, encode_chat_response_as_json}(serializeChatResponseback into provider-native JSON responses) - Bidirectional SSE support for proxying:
- OpenAI Responses SSE stream serialization (Vercel-aligned
openai:*stream parts) - OpenAI-compatible Chat Completions SSE stream serialization
- Gemini GenerateContent SSE stream serialization
- OpenAI Responses SSE stream serialization (Vercel-aligned
- Cross-provider stream part bridge for gateway output:
siumai_core::streaming::OpenAiResponsesStreamPartsBridge(mapsgemini:*/anthropic:*custom parts intoopenai:*parts)
- Alignment notes:
docs/alignment/streaming-bridge-alignment.md - Fixture drift audit script (against
repo-ref/ai):./scripts/audit_vercel_fixtures.py
- Stream encoders:
- Provider correctness and parity audit docs (official APIs + Vercel reference):
- Global checklist:
docs/alignment/provider-implementation-alignment.md - Official API audits:
docs/alignment/official/*-official-api-alignment.md(OpenAI, Anthropic, Gemini, Google Vertex, Anthropic on Vertex, Azure OpenAI, Groq, xAI, Amazon Bedrock, Cohere, TogetherAI, Ollama)
- Global checklist:
Changed
- OpenAI-compatible builder
provider_specific_configis now applied to chat requests via the compat adapter layer. - Model listing and model retrieval endpoints are now spec-driven (
ProviderSpec::{models_url, model_url}) to support non-OpenAI routes (e.g. Anthropic/v1/models, Ollama/api/tags) without provider-specific URL plumbing. - Advanced orchestrator examples are now maintained under
siumai-extras/examples/*(thesiumaifacade focuses on low-level provider/client APIs). - HTTP execution now supports an injectable transport (
fetch/HttpTransport) across providers, including streaming use-cases (gateway parity with Vercel'sfetch(customTransport)). - OpenAI moderation now defaults to
omni-moderation-latestwhen no model is provided. - Gateway/proxy streaming policies are now explicit:
- V3 parts that cannot be represented in a target wire format follow
V3UnsupportedPartBehavior(drop in strict mode, lossy text downgrade inAsTextmode), includingtool-approval-request,raw, andfileparts.
- V3 parts that cannot be represented in a target wire format follow
- Gateways can also transcode non-streaming results into provider JSON responses:
siumai-extras::server::axum::{to_transcoded_json_response, TargetJsonFormat}
Deprecated
AudioCapability(compat trait): preferSpeechCapability+TranscriptionCapabilityon the unified surface.ModelListingCapability,ModerationCapability,FileManagementCapabilityon the top-level: prefersiumai::prelude::extensions::*.VisionCapabilityremains available for compatibility, but vision is treated as multimodal Chat (Vercel-aligned) rather than a separate family.
- Low-level HTTP helper
execute_json_request_with_headers(for custom provider code): preferHttpExecutionConfig+execute_json_requestand/or aProviderSpecwith a stablebuild_headers()implementation.
Removed
- Legacy unified web search types and helpers:
siumai::types::web_search(WebSearchConfigetc.)siumai-extras::web_search
- Provider-specific capability traits from the core surface:
traits::{OpenAiCapability, AnthropicCapability, GeminiCapability, ...}- Use
siumai::provider_ext::<provider>, provider-hosted tools (siumai::hosted_tools::<provider>), andproviderOptionsinstead.
OpenAiCompatibleSpec(legacy fallback): useOpenAiCompatibleSpecWithAdapter(adapter-injected spec only).
Fixed
- Gemini base URL defaults are now consistent across protocol and provider metadata (
https://generativelanguage.googleapis.com/v1beta). - Gemini Vertex AI URLs now accept resource-style model names (e.g.
models/gemini-2.0-flash) and normalize them to prevent duplicate/models/...segments. - Gemini tool result encoding is now Vercel-aligned (tool role maps to
function_call_output/functionResponse; assistant URL-basedfileDatais rejected). - Vertex
base_url_for_vertex(...)now prefers the regional host (https://{location}-aiplatform.googleapis.com) to match official docs (locationglobalstill useshttps://aiplatform.googleapis.com). - Vertex enterprise auth now auto-enables ADC bearer token wiring (and does not overwrite user-provided
Authorizationheaders), matching Vercel behavior. - Vertex Imagen requests in API-key mode now append
?key=...to the endpoint URL (Vercel parity). - Anthropic on Vertex now matches Vercel request shaping:
- Uses
:rawPredict/:streamRawPredict(instead of?alt=sse) - Injects
anthropic_version: "vertex-2023年10月16日"and omits themodelfield from the request body
- Uses
- Anthropic orchestrator steps now forward
providerMetadata.anthropic.container.idinto `provider...
Assets 2
v0.11.0-beta.3
Added
- Unified model-level middleware on
Siumai::builder()- New APIs:
add_model_middleware(...),with_model_middlewares(...) - Auto middlewares now also apply to the unified builder path
- New APIs:
- OpenTelemetry 0.31 compatibility
- Switch to
SdkTracerProvider, useResource::builder_*, updatePeriodicReader::builder(...) - Updated example under
siumai-extras/examples/opentelemetry_tracing.rs
- Switch to
Changed
- MiniMaxi moved to factory flow for consistency
- Middlewares and interceptors are installed uniformly across all providers
- Consolidated builder helpers and advanced HTTP options
- Shared utilities for API key/base URL/model normalization
- Parity of advanced HTTP options between
Siumai::builder()andLlmBuilder
Fixed
- Applied gzip/brotli/cookie_store flags when building HTTP client
- Correct model propagation for OpenAI‐compatible in unified builder
- Env var loading for OpenAI‐compatible (
{PROVIDER_ID}_API_KEY) - Default/alias model handling across providers
Assets 2
v0.11.0-beta.2
- MiniMaxi provider support with multi-modal capabilities (text, speech, image generation).
- Gemini File Search (RAG) support - Provider-specific implementation for Gemini's File Search API
- File Search Store management (create, list, get, delete)
- Example:
siumai/examples/04-provider-specific/google/file_search.rs
Assets 2
v0.11.0-beta.1
This beta delivers a major refactor of module layout, execution/streaming, and provider integration. Design inspired by Cherry Studio’s transformer design and the Vercel AI SDK’s adapter architecture.
Added
- Provider Registry and model handles (
siumai/src/registry/*)- Unified string-based
provider:modelresolution with LRU caching and optional TTL - Customizable registry options (middlewares, interceptors, retry)
- Unified string-based
- HTTP Interceptors (
execution::http::interceptor)- Request/response hooks and SSE event observation
- Built-in
LoggingInterceptor
- Execution layer and middleware system (
execution::{executors,transformers,middleware})- Auto middlewares based on provider/model (defaults/clamping/reasoning extraction)
- Orchestrator rework (
siumai/src/orchestrator/*)- Multi-step tool calling, agent pattern, tool approval, streaming tool execution
- See examples under
siumai/examples/03-advanced-features/orchestrator/
- High-level object APIs (
siumai::highlevel::object)generate_object/stream_objectfor provider-agnostic typed JSON outputs- Optional JSON repair and schema validation; partial object streaming
siumai-extrascrate- Optional features:
schema,telemetry,opentelemetry,server,mcp
- Optional features:
- Example rework (
siumai/examples/)
Changed
- Workspace split into
siumaiandsiumai-extras. - Unified streaming events (start/delta/usage/end); improved UTF‐8-safe chunking and tag extraction.
- Unified retry facade (
retry_api) with idempotency and 401 token refresh retry. - OpenAI‐compatible providers consolidated via adapter; consistent transformers/executors paths.
- Clippy cleanups; boxed large enum variants internally (minor internal breaking).
Removed
- Top-level
examples/moved tosiumai/examples/. - Removed obsolete
docs/openapi.documented.yml.
Fixed
- Ensure
before_send_hookis correctly applied across providers. - UTF‐8 safety: tag extraction, string slicing, streaming chunk boundaries, and token masking.
- Reliability fixes in streaming, headers, and parameter mapping; expanded fixture-based tests.
Known Issues
- OpenAI Responses API
web_searchis not implemented; calling returnsUnsupportedOperation.
Stability
- This is a beta pre-release; minor API adjustments may follow.
API Keys and Environment Variables
- OpenAI:
.api_key(..)orOPENAI_API_KEY(env fallback) - Anthropic:
.api_key(..)orANTHROPIC_API_KEY(env fallback) - Groq:
.api_key(..)orGROQ_API_KEY(env fallback) - Gemini:
.api_key(..)orGEMINI_API_KEY(env fallback) - xAI:
.api_key(..)orXAI_API_KEY(env fallback) - Ollama: no API key (local service, default
http://localhost:11434) - OpenAI‐compatible via Builder:
.api_key(..)or{PROVIDER_ID}_API_KEY - OpenAI‐compatible via Registry: reads
{PROVIDER_ID}_API_KEY(e.g.,DEEPSEEK_API_KEY,OPENROUTER_API_KEY)
Migration Guide
Tracing Subscriber Initialization
Before (v0.10.3 and earlier):
use siumai::tracing::{init_default_tracing, init_debug_tracing, TracingConfig, OutputFormat}; // Initialize with default configuration init_default_tracing()?; // Or with custom configuration let config = TracingConfig::builder() .log_level_str("debug")? .output_format(OutputFormat::Json) .build(); init_tracing(config)?;
After (v0.11.0):
Option 1: Use siumai-extras::telemetry for advanced configuration:
use siumai_extras::telemetry; // Add to Cargo.toml: // For the beta release: // siumai-extras = { version = "0.11.0-beta.1", features = ["telemetry"] } // Initialize with default configuration telemetry::init_default()?; // Or with custom configuration let config = telemetry::SubscriberConfig::builder() .log_level_str("debug")? .output_format(telemetry::OutputFormat::Json) .build(); telemetry::init_subscriber(config)?;
Option 2: Use tracing-subscriber directly for simple cases:
// Add to Cargo.toml: // tracing-subscriber = "0.3" // Simple console logging tracing_subscriber::fmt::init();
JSON Schema Validation
Before:
// Schema validation was not available in core siumaiAfter:
use siumai_extras::schema; // Add to Cargo.toml: // For the beta release: // siumai-extras = { version = "0.11.0-beta.1", features = ["schema"] } // Validate JSON against schema schema::validate_json(&instance, &schema)?; // Or use the validator for multiple validations let validator = schema::SchemaValidator::new(&schema)?; validator.validate(&instance)?;
MCP Integration (NEW)
MCP integration is now available as an optional feature in siumai-extras:
[dependencies] siumai = { version = "0.11", features = ["openai"] } siumai-extras = { version = "0.11", features = ["mcp"] }
Quick Start:
use siumai::prelude::*; use siumai_extras::mcp::mcp_tools_from_stdio; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { // 1. Connect to MCP server let (tools, resolver) = mcp_tools_from_stdio("node mcp-server.js").await?; // 2. Create model let model = Siumai::builder().openai().build().await?; // 3. Use with orchestrator let (response, _) = siumai::orchestrator::generate( &model, messages, Some(tools), Some(&resolver), vec![siumai::orchestrator::step_count_is(10)], Default::default(), ).await?; Ok(()) }
Supported Transports:
- Stdio:
mcp_tools_from_stdio("node server.js")- Local development - SSE:
mcp_tools_from_sse("http://localhost:8080/sse")- Remote servers - HTTP:
mcp_tools_from_http("http://localhost:3000/mcp")- Stateless
Assets 2
v0.10.3
Added
- Unified retry API
retry_api(retry,retry_for_provider,retry_with). - Builder-level retry options:
with_retry(...)forSiumaiand provider builders (OpenAI, Gemini, Anthropic, Groq, xAI, Ollama, OpenAI-compatible). - Convenience methods:
chat_with_retry,ask_with_retryonChatExtensions. - Stream processor: overflow handler now accepts closures.
Deprecated
retry_strategy(planned removal in 0.11).
Changed
- SiliconFlow and OpenRouter now use the OpenAI-compatible adapter path.
- Simplified tracing guard type and provider identification; removed an unused
Siumaifield.
Fixed
- Responses API
web_searchnow returnsUnsupportedOperationwhen not implemented.
Migration
- Replace
retry_strategyusage with the unifiedretry_apifacade:- Use
retry,retry_for_provider, orretry_with(RetryOptions::...). - Prefer builder-level
with_retry(...)for chat operations (applies to Siumai and provider builders).
- Use
retry_strategyis deprecated and will be removed in0.11.
Assets 2
v0.10.2
- Unified HTTP client across providers, exposed fine-grained HTTP options on SiumaiBuilder, added with_http_client for Gemini/Custom, and updated docs/examples.