Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Releases: YumchaLabs/siumai

v0.11.0-beta.9

27 May 06:50
@Latias94 Latias94
28cf639
This commit was created on GitHub.com and signed with GitHub’s verified signature.
GPG key ID: B5690EEEBB952194
Verified
Learn about vigilant mode.

Choose a tag to compare

v0.11.0-beta.9 Pre-release
Pre-release

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-utils as the shared home for AI SDK-style provider/protocol helpers.
  • Added explicit content namespaces: siumai::content::prompt, siumai::content::output, and siumai::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 LlmClient paths 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 ContentPart remains 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 SiumaiBuilder capability flag methods: with_capability(), with_audio(), with_embedding(), and with_image_generation().

Migration Notes

  • New provider/protocol code should import shared helpers from siumai-provider-utils instead of older siumai-core::utils::* paths.
  • Import legacy ContentPart from explicit compatibility paths such as siumai::compat::content::ContentPart or siumai::content::compat::ContentPart.
  • Prefer registry family handles and provider-specific builders for stable model execution; keep generic LlmClient construction for compatibility or extension-only integration paths.
  • Replace removed SiumaiBuilder::with_* capability flags with explicit provider builders, registry family handles, or extension modules.
Loading

v0.11.0-beta.8

18 May 16:39
@Latias94 Latias94
412a79f
This commit was created on GitHub.com and signed with GitHub’s verified signature.
GPG key ID: B5690EEEBB952194
Verified
Learn about vigilant mode.

Choose a tag to compare

v0.11.0-beta.8 Pre-release
Pre-release

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-2 image models and Responses allowed-tools options.

Changed

  • Updated siumai-extras MCP 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, or provider_ext::*.
  • If you used execute_json_request_with_headers(...), use execute_json_request(...) with
    HttpExecutionConfig and ProviderSpec.
  • 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.

Contributors

longzou
Loading

v0.11.0-beta.7

05 May 23:31
@Latias94 Latias94

Choose a tag to compare

v0.11.0-beta.7 Pre-release
Pre-release

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 *Model traits 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 TextModelV3 with TextModel.
    Use LanguageModel for normal text-generation models and reserve LanguageModelV4 for
    AI SDK provider-contract integrations.
  • Prefer the canonical family traits in application generics:
    TextModel, EmbeddingModel, ImageModel, RerankingModel, SpeechModel,
    TranscriptionModel, and VideoModel. Only use ImageModelV4 / VideoModelV4 when 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 Usage with struct literals or read legacy usage fields directly, switch to
    Usage::new(...), Usage::builder(), prompt_tokens(), completion_tokens(),
    total_tokens(), input_tokens, and output_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_text projection 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-extras for exposing ChatStream text as a
    text/plain; charset=utf-8 HTTP 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

  • RequestOptions are now honored more consistently across facade helpers: retry defaults,
    headers, total timeout, and cancellation are propagated where the underlying runtime supports
    them.
  • ToolChoice and FinishReason now 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 ChatStreamPart as 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, and VideoModel are 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-lite and retry transient
    network/provider errors. Set SIUMAI_ENV_SMOKE_STRICT=1 to fail instead of self-skipping known
    account, region, or quota denials.
Loading

v0.11.0-beta.6

25 Mar 07:06
@Latias94 Latias94

Choose a tag to compare

v0.11.0-beta.6 Pre-release
Pre-release

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-core for text, embedding, image, rerank, speech, and transcription.
  • New family API modules in the siumai facade: 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 HttpConfig overrides (headers + timeout), including streaming requests.
  • Convenience methods on dyn LlmClient for full chat requests: chat_request and chat_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. Prefer registry::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

Loading

v0.11.0-beta.5

14 Jan 16:54
@Latias94 Latias94

Choose a tag to compare

v0.11.0-beta.5 Pre-release
Pre-release

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 + typed provider_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-*), and siumai-registry (factories/handles); siumai remains 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 via OpenAiOptions::with_responses_api)
    • Anthropic: siumai::hosted_tools::anthropic::web_search_20250305()
    • Gemini: siumai::hosted_tools::google::* (e.g. google_search(), file_search())
  • siumai::providers::<provider>::* is now a stable alias for siumai::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).
  • 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::*;
  • LlmBuilder is no longer re-exported from siumai::prelude::unified::* (breaking).
    • Prefer Siumai::builder() (unified) or Provider::<provider>() / siumai::provider_ext::<provider>::* (provider-specific).
  • Provider-specific capability traits were removed from the core surface (e.g. traits::{OpenAiCapability, AnthropicCapability, GeminiCapability, ...}).
    • Use siumai::prelude::unified::* for the stable surface, and siumai::prelude::extensions::* / siumai::provider_ext::<provider> for opt-in provider-specific features.
  • "Audio" is no longer a first-class unified family: prefer SpeechCapability (TTS) and TranscriptionCapability (STT).
    • For OpenAI SSE audio/transcript streaming, use provider extensions: siumai::provider_ext::openai::{speech_streaming, transcription_streaming}.
  • 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 returns UnsupportedOperation.
    • For rerank, use a rerank-capable provider (e.g. cohere, togetherai, bedrock) or an OpenAI-compatible vendor that exposes /rerank (e.g. siliconflow).
  • Vertex base URL helper now prefers the regional host (https://{location}-aiplatform.googleapis.com); if you hardcoded https://aiplatform.googleapis.com you 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
  • Split-phase architecture docs:
    • docs/architecture/architecture-refactor-plan.md
    • docs/architecture/capability-surface.md
    • docs/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 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 (see examples/04-provider-specific/openai/stt_sse_streaming.rs)
  • Anthropic provider extension example
    • Thinking replay: examples/04-provider-specific/anthropic/thinking-replay-ext.rs
  • Gateway/proxy streaming utilities (Vercel-aligned parseStreamPart / formatStreamPart concept):
    • Stream encoders: siumai::experimental::streaming::{encode_chat_stream_as_sse, encode_chat_stream_as_jsonl} (serialize ChatStreamEvent back into provider-native wire formats)
    • Non-streaming JSON encoders: siumai::experimental::encoding::{JsonResponseConverter, encode_chat_response_as_json} (serialize ChatResponse back 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
    • Cross-provider stream part bridge for gateway output:
      • siumai_core::streaming::OpenAiResponsesStreamPartsBridge (maps gemini:* / anthropic:* custom parts into openai:* parts)
    • Alignment notes: docs/alignment/streaming-bridge-alignment.md
    • Fixture drift audit script (against repo-ref/ai): ./scripts/audit_vercel_fixtures.py
  • 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)

Changed

  • OpenAI-compatible builder provider_specific_config is 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/* (the siumai facade 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's fetch(customTransport)).
  • OpenAI moderation now defaults to omni-moderation-latest when 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 in AsText mode), including tool-approval-request, raw, and file parts.
  • Gateways can also transcode non-streaming results into provider JSON responses:
    • siumai-extras::server::axum::{to_transcoded_json_response, TargetJsonFormat}

Deprecated

  • AudioCapability (compat trait): prefer SpeechCapability + TranscriptionCapability on the unified surface.
  • ModelListingCapability, ModerationCapability, FileManagementCapability on the top-level: prefer siumai::prelude::extensions::*.
    • VisionCapability remains 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): prefer HttpExecutionConfig + execute_json_request and/or a ProviderSpec with a stable build_headers() implementation.

Removed

  • Legacy unified web search types and helpers:
    • siumai::types::web_search (WebSearchConfig etc.)
    • 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>), and providerOptions instead.
  • OpenAiCompatibleSpec (legacy fallback): use OpenAiCompatibleSpecWithAdapter (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-based fileData is rejected).
  • Vertex base_url_for_vertex(...) now prefers the regional host (https://{location}-aiplatform.googleapis.com) to match official docs (location global still uses https://aiplatform.googleapis.com).
  • Vertex enterprise auth now auto-enables ADC bearer token wiring (and does not overwrite user-provided Authorization headers), 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 the model field from the request body
  • Anthropic orchestrator steps now forward providerMetadata.anthropic.container.id into `provider...
Read more
Loading

v0.11.0-beta.3

09 Nov 14:19
@Latias94 Latias94

Choose a tag to compare

v0.11.0-beta.3 Pre-release
Pre-release

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
  • OpenTelemetry 0.31 compatibility
    • Switch to SdkTracerProvider, use Resource::builder_*, update PeriodicReader::builder(...)
    • Updated example under siumai-extras/examples/opentelemetry_tracing.rs

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() and LlmBuilder

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
Loading

v0.11.0-beta.2

08 Nov 08:45
@Latias94 Latias94

Choose a tag to compare

v0.11.0-beta.2 Pre-release
Pre-release
  • 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
Loading

v0.11.0-beta.1

28 Oct 06:28
@Latias94 Latias94

Choose a tag to compare

v0.11.0-beta.1 Pre-release
Pre-release

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:model resolution with LRU caching and optional TTL
    • Customizable registry options (middlewares, interceptors, retry)
  • 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_object for provider-agnostic typed JSON outputs
    • Optional JSON repair and schema validation; partial object streaming
  • siumai-extras crate
    • Optional features: schema, telemetry, opentelemetry, server, mcp
  • Example rework (siumai/examples/)

Changed

  • Workspace split into siumai and siumai-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 to siumai/examples/.
  • Removed obsolete docs/openapi.documented.yml.

Fixed

  • Ensure before_send_hook is 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_search is not implemented; calling returns UnsupportedOperation.

Stability

  • This is a beta pre-release; minor API adjustments may follow.

API Keys and Environment Variables

  • OpenAI: .api_key(..) or OPENAI_API_KEY (env fallback)
  • Anthropic: .api_key(..) or ANTHROPIC_API_KEY (env fallback)
  • Groq: .api_key(..) or GROQ_API_KEY (env fallback)
  • Gemini: .api_key(..) or GEMINI_API_KEY (env fallback)
  • xAI: .api_key(..) or XAI_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 siumai

After:

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
Loading

v0.10.3

12 Oct 17:02
@github-actions github-actions

Choose a tag to compare

Added

  • Unified retry API retry_api (retry, retry_for_provider, retry_with).
  • Builder-level retry options: with_retry(...) for Siumai and provider builders (OpenAI, Gemini, Anthropic, Groq, xAI, Ollama, OpenAI-compatible).
  • Convenience methods: chat_with_retry, ask_with_retry on ChatExtensions.
  • 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 Siumai field.

Fixed

  • Responses API web_search now returns UnsupportedOperation when not implemented.

Migration

  • Replace retry_strategy usage with the unified retry_api facade:
    • Use retry, retry_for_provider, or retry_with(RetryOptions::...).
    • Prefer builder-level with_retry(...) for chat operations (applies to Siumai and provider builders).
  • retry_strategy is deprecated and will be removed in 0.11.
Assets 2
Loading

v0.10.2

04 Oct 11:22
@github-actions github-actions

Choose a tag to compare

  • Unified HTTP client across providers, exposed fine-grained HTTP options on SiumaiBuilder, added with_http_client for Gemini/Custom, and updated docs/examples.
Loading
Previous 1 3
Previous

AltStyle によって変換されたページ (->オリジナル) /