Skip to content

chore: release v0.41.0 - #1

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
release-plz-2026-06-18T08-59-23Z
Open

chore: release v0.41.0#1
github-actions[bot] wants to merge 1 commit into
mainfrom
release-plz-2026-06-18T08-59-23Z

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown

🤖 New release

  • rig-derive: 0.40.0 -> 0.41.0
  • rig-core: 0.40.0 -> 0.41.0 (⚠ API breaking changes)
  • rig-agent: 0.0.0 -> 0.41.0
  • rig-bedrock: 0.40.0 -> 0.41.0 (✓ API compatible changes)
  • rig-candle: 0.1.0 -> 0.41.0
  • rig-fastembed: 0.40.0 -> 0.41.0
  • rig-gemini-grpc: 0.40.0 -> 0.41.0 (✓ API compatible changes)
  • rig-helixdb: 0.40.0 -> 0.41.0
  • rig-lancedb: 0.40.0 -> 0.41.0 (✓ API compatible changes)
  • rig-memory: 0.40.0 -> 0.41.0 (✓ API compatible changes)
  • rig-milvus: 0.40.0 -> 0.41.0
  • rig-mongodb: 0.40.0 -> 0.41.0
  • rig-neo4j: 0.40.0 -> 0.41.0
  • rig-postgres: 0.40.0 -> 0.41.0
  • rig-qdrant: 0.40.0 -> 0.41.0
  • rig-s3vectors: 0.40.0 -> 0.41.0 (✓ API compatible changes)
  • rig-scylladb: 0.40.0 -> 0.41.0
  • rig-sqlite: 0.40.0 -> 0.41.0
  • rig-surrealdb: 0.40.0 -> 0.41.0 (✓ API compatible changes)
  • rig-vectorize: 0.40.0 -> 0.41.0
  • rig-vertexai: 0.40.0 -> 0.41.0 (✓ API compatible changes)
  • rig: 0.40.0 -> 0.41.0 (✓ API compatible changes)

rig-core breaking changes

--- failure constructible_struct_adds_field: externally-constructible struct adds field ---

Description:
A pub struct constructible with a struct literal has a new pub field. Existing struct literals must be updated to include the new field.
        ref: https://doc.rust-lang.org/reference/expressions/struct-expr.html
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/constructible_struct_adds_field.ron

Failed in:
  field FunctionResponse.id in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/providers/gemini/completion.rs:1277
  field CompletionResponse.reasoning_metadata in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/providers/openai/responses_api/mod.rs:1480
  field CompletionResponse.reasoning_context in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/providers/openai/responses_api/mod.rs:1486
  field StreamingCompletionResponse.reasoning_metadata in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/providers/openai/responses_api/streaming.rs:44
  field StreamingCompletionResponse.reasoning_context in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/providers/openai/responses_api/streaming.rs:47
  field Reasoning.mode in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/providers/openai/responses_api/mod.rs:1786
  field Reasoning.context in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/providers/openai/responses_api/mod.rs:1790
  field ApiErrorResponse.error in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/providers/gemini/client.rs:230
  field FunctionCall.id in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/providers/gemini/completion.rs:1254
  field CompletionRequest.record_telemetry_content in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/completion/request.rs:436
  field CompletionRequest.record_telemetry_content in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/completion/request.rs:436

--- failure copy_impl_added: type now implements Copy ---

Description:
A public type now implements Copy, causing non-move closures to capture it by reference instead of moving it.
        ref: https://github.com/rust-lang/rust/issues/100905
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/copy_impl_added.ron

Failed in:
  rig_core::providers::copilot::EncodingFormat in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/providers/openai/embedding.rs:88
  rig_core::providers::openai::embedding::EncodingFormat in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/providers/openai/embedding.rs:88
  rig_core::providers::openai::EncodingFormat in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/providers/openai/embedding.rs:88

--- failure enum_marked_non_exhaustive: enum marked #[non_exhaustive] ---

Description:
A public enum has been marked #[non_exhaustive]. Pattern-matching on it outside of its crate must now include a wildcard pattern like `_`, or it will fail to compile.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#attr-adding-non-exhaustive
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/enum_marked_non_exhaustive.ron

Failed in:
  enum VectorStoreError in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/vector_store/mod.rs:34

--- failure enum_missing: pub enum removed or renamed ---

Description:
A publicly-visible enum cannot be imported by its prior path. A `pub use` may have been removed, or the enum itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/enum_missing.ron

Failed in:
  enum rig_core::completion::request::PromptError, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/request.rs:148
  enum rig_core::completion::PromptError, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/request.rs:148
  enum rig_core::prelude::PromptError, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/request.rs:148
  enum rig_core::tool::ToolFailureKind, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/result.rs:30
  enum rig_core::integrations::discord_bot::DiscordBotError, previously in file /tmp/.tmpMnZMhA/rig-core/src/integrations/discord_bot.rs:17
  enum rig_core::agent::hook::InvalidToolCallHookAction, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:406
  enum rig_core::agent::InvalidToolCallHookAction, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:406
  enum rig_core::extractor::ExtractionError, previously in file /tmp/.tmpMnZMhA/rig-core/src/extractor.rs:59
  enum rig_core::agent::StreamingError, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/prompt_request/streaming.rs:255
  enum rig_core::providers::together::client::together_ai_api_types::ApiResponse, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/together/client.rs:114
  enum rig_core::providers::openrouter::EncodingFormat, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/openrouter/embedding.rs:20
  enum rig_core::providers::openrouter::embedding::EncodingFormat, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/openrouter/embedding.rs:20
  enum rig_core::agent::run::streamed::StreamedResolution, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/streamed.rs:231
  enum rig_core::agent::run::StreamedResolution, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/streamed.rs:231
  enum rig_core::agent::hook::StepEvent, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:458
  enum rig_core::agent::StepEvent, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:458
  enum rig_core::tool::ToolReturnOutcome, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/result.rs:356
  enum rig_core::tool::ToolSetError, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/mod.rs:535
  enum rig_core::agent::run::streamed::StreamedTurnEvent, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/streamed.rs:255
  enum rig_core::agent::run::StreamedTurnEvent, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/streamed.rs:255
  enum rig_core::agent::run::ModelTurnOutcome, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/mod.rs:194
  enum rig_core::agent::ModelTurnOutcome, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/mod.rs:194
  enum rig_core::tool::ToolOutcome, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/result.rs:255
  enum rig_core::agent::run::output_mode::OutputMode, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/output_mode.rs:29
  enum rig_core::agent::run::OutputMode, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/output_mode.rs:29
  enum rig_core::agent::OutputMode, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/output_mode.rs:29
  enum rig_core::tool::server::ToolServerError, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/server.rs:370
  enum rig_core::agent::hook::Flow, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:905
  enum rig_core::agent::Flow, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:905
  enum rig_core::agent::hook::StepEventKind, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:624
  enum rig_core::agent::StepEventKind, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:624
  enum rig_core::tool::rmcp::McpClientError, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/rmcp.rs:407
  enum rig_core::agent::MultiTurnStreamItem, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/prompt_request/streaming.rs:47
  enum rig_core::prelude::MultiTurnStreamItem, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/prompt_request/streaming.rs:47
  enum rig_core::tool::ToolError, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/mod.rs:47
  enum rig_core::agent::run::AgentRunStep, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/mod.rs:112
  enum rig_core::agent::AgentRunStep, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/mod.rs:112
  enum rig_core::completion::request::StructuredOutputError, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/request.rs:249
  enum rig_core::completion::StructuredOutputError, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/request.rs:249
  enum rig_core::prelude::StructuredOutputError, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/request.rs:249

--- failure enum_no_repr_variant_discriminant_changed: enum variant had its discriminant change value ---

Description:
The enum's variant had its discriminant value change. This breaks downstream code that used its value via a numeric cast like `as isize`.
        ref: https://doc.rust-lang.org/reference/items/enumerations.html#assigning-discriminant-values
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/enum_no_repr_variant_discriminant_changed.ron

Failed in:
  variant Content::ToolResult 5 -> 6 in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/providers/anthropic/completion.rs:321
  variant Content::Document 6 -> 7 in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/providers/anthropic/completion.rs:330
  variant Content::Thinking 7 -> 8 in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/providers/anthropic/completion.rs:348
  variant Content::RedactedThinking 8 -> 9 in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/providers/anthropic/completion.rs:353

--- failure enum_variant_added: enum variant added on exhaustive enum ---

Description:
A publicly-visible enum without #[non_exhaustive] has a new variant.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#enum-variant-new
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/enum_variant_added.ron

Failed in:
  variant ToolResultContent:Json in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/completion/message.rs:230
  variant ToolResultContent:Json in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/completion/message.rs:230
  variant Content:CodeExecutionToolResult in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/providers/anthropic/completion.rs:317
  variant MockStreamEvent:Unknown in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/test_utils/streaming.rs:81
  variant ReasoningEffort:Max in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/providers/openai/responses_api/mod.rs:1891

--- failure feature_missing: package feature removed or renamed ---

Description:
A feature has been removed from this package's Cargo.toml. This will break downstream crates which enable that feature.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#cargo-feature-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/feature_missing.ron

Failed in:
  feature rmcp in the package's Cargo.toml
  feature discord-bot in the package's Cargo.toml

--- failure function_missing: pub fn removed or renamed ---

Description:
A publicly-visible function cannot be imported by its prior path. A `pub use` may have been removed, or the function itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/function_missing.ron

Failed in:
  function rig_core::agent::stream_to_stdout, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/prompt_request/streaming.rs:1464
  function rig_core::test_utils::mock_math_toolset, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:177
  function rig_core::tool::tool_definition, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/mod.rs:383

--- failure inherent_method_missing: pub method removed or renamed ---

Description:
A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/inherent_method_missing.ron

Failed in:
  ToolSchema::from_tool, previously in file /tmp/.tmpMnZMhA/rig-core/src/embeddings/tool.rs:95
  ToolSchema::from_tool, previously in file /tmp/.tmpMnZMhA/rig-core/src/embeddings/tool.rs:95
  Client::extractor, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/openai/client.rs:152
  Client::extractor, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/openai/client.rs:237
  GenericCompletionModel::into_agent_builder, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/openai/completion/mod.rs:1882
  GenericCompletionModel::into_agent_builder, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/openai/completion/mod.rs:1882
  ToolResultContent::from_tool_output, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/message.rs:929
  ToolResultContent::from_tool_output, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/message.rs:929

--- failure method_receiver_ref_became_mut: method receiver changed from immutable to mutable reference ---

Description:
A method's receiver changed from an immutable reference to a mutable one.
        ref: https://doc.rust-lang.org/reference/items/associated-items.html#methods
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/method_receiver_ref_became_mut.ron

Failed in:
  rig_core::streaming::StreamingCompletionResponse::cancel now takes &mut Self, not &Self, in /tmp/.tmpR2wMmC/rig/crates/rig-core/src/streaming.rs:280

--- failure module_missing: pub module removed or renamed ---

Description:
A publicly-visible module cannot be imported by its prior path. A `pub use` may have been removed, or the module may have been renamed, removed, or made non-public.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/module_missing.ron

Failed in:
  mod rig_core::extractor, previously in file /tmp/.tmpMnZMhA/rig-core/src/extractor.rs:1
  mod rig_core::integrations, previously in file /tmp/.tmpMnZMhA/rig-core/src/integrations/mod.rs:1
  mod rig_core::agent::runner, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/runner.rs:1
  mod rig_core::agent::run, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/mod.rs:1
  mod rig_core::integrations::discord_bot, previously in file /tmp/.tmpMnZMhA/rig-core/src/integrations/discord_bot.rs:1
  mod rig_core::agent::hook, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:1
  mod rig_core::tool::server, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/server.rs:1
  mod rig_core::agent, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/mod.rs:1
  mod rig_core::providers::together::client::together_ai_api_types, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/together/client.rs:97
  mod rig_core::integrations::cli_chatbot, previously in file /tmp/.tmpMnZMhA/rig-core/src/integrations/cli_chatbot.rs:1
  mod rig_core::tool::rmcp, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/rmcp.rs:1
  mod rig_core::agent::run::streamed, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/streamed.rs:1
  mod rig_core::agent::run::output_mode, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/output_mode.rs:1

--- failure pub_module_level_const_missing: pub module-level const is missing ---

Description:
A public const is missing or renamed
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/pub_module_level_const_missing.ron

Failed in:
  DEFAULT_MCP_TOOL_TIMEOUT in file /tmp/.tmpMnZMhA/rig-core/src/tool/rmcp.rs:77

--- failure struct_missing: pub struct removed or renamed ---

Description:
A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/struct_missing.ron

Failed in:
  struct rig_core::tool::rmcp::McpTool, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/rmcp.rs:84
  struct rig_core::agent::run::ModelTurn, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/mod.rs:155
  struct rig_core::agent::ModelTurn, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/mod.rs:155
  struct rig_core::test_utils::MockImageGeneratorTool, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:243
  struct rig_core::providers::mistral::embedding::EmbeddingData, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/mistral/embedding.rs:136
  struct rig_core::providers::mistral::EmbeddingData, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/mistral/embedding.rs:136
  struct rig_core::agent::PromptResponse, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/prompt_request/mod.rs:265
  struct rig_core::extractor::ExtractorBuilder, previously in file /tmp/.tmpMnZMhA/rig-core/src/extractor.rs:302
  struct rig_core::agent::PromptRequest, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/prompt_request/mod.rs:106
  struct rig_core::tool::server::ToolServerHandle, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/server.rs:150
  struct rig_core::test_utils::MockControlledTool, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:364
  struct rig_core::providers::together::client::together_ai_api_types::ApiErrorResponse, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/together/client.rs:107
  struct rig_core::providers::openrouter::EmbeddingModel, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/openrouter/embedding.rs:33
  struct rig_core::providers::openrouter::embedding::EmbeddingModel, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/openrouter/embedding.rs:33
  struct rig_core::providers::openrouter::EmbeddingData, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/openrouter/embedding.rs:26
  struct rig_core::providers::openrouter::embedding::EmbeddingData, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/openrouter/embedding.rs:26
  struct rig_core::test_utils::MockObjectOutputTool, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:275
  struct rig_core::integrations::cli_chatbot::ChatImpl, previously in file /tmp/.tmpMnZMhA/rig-core/src/integrations/cli_chatbot.rs:12
  struct rig_core::agent::run::streamed::StreamedTurn, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/streamed.rs:208
  struct rig_core::agent::run::StreamedTurn, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/streamed.rs:208
  struct rig_core::providers::mistral::embedding::EmbeddingModel, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/mistral/embedding.rs:19
  struct rig_core::providers::mistral::EmbeddingModel, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/mistral/embedding.rs:19
  struct rig_core::test_utils::MockStringOutputTool, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:186
  struct rig_core::tool::ToolExecutionResult, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/result.rs:421
  struct rig_core::agent::hook::RunId, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:163
  struct rig_core::agent::RunId, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:163
  struct rig_core::test_utils::MockFailingTool, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:484
  struct rig_core::agent::Text, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/message.rs:306
  struct rig_core::agent::Agent, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/completion.rs:643
  struct rig_core::prelude::Agent, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/completion.rs:643
  struct rig_core::test_utils::MockRequestId, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:603
  struct rig_core::agent::AgentBuilder, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/builder.rs:96
  struct rig_core::agent::run::streamed::PartialStreamedTurn, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/streamed.rs:127
  struct rig_core::agent::run::PartialStreamedTurn, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/streamed.rs:127
  struct rig_core::tool::server::ToolServer, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/server.rs:38
  struct rig_core::test_utils::MockSubtractTool, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:142
  struct rig_core::integrations::cli_chatbot::ChatBotBuilder, previously in file /tmp/.tmpMnZMhA/rig-core/src/integrations/cli_chatbot.rs:26
  struct rig_core::extractor::ExtractionResponse, previously in file /tmp/.tmpMnZMhA/rig-core/src/extractor.rs:51
  struct rig_core::ExtractionResponse, previously in file /tmp/.tmpMnZMhA/rig-core/src/extractor.rs:51
  struct rig_core::providers::together::embedding::EmbeddingData, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/together/embedding.rs:37
  struct rig_core::providers::together::EmbeddingData, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/together/embedding.rs:37
  struct rig_core::tool::ToolResultExtensions, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/extensions.rs:338
  struct rig_core::providers::mistral::embedding::EmbeddingResponse, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/mistral/embedding.rs:127
  struct rig_core::providers::mistral::EmbeddingResponse, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/mistral/embedding.rs:127
  struct rig_core::providers::together::embedding::Usage, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/together/embedding.rs:44
  struct rig_core::providers::together::Usage, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/together/embedding.rs:44
  struct rig_core::tool::ToolReturn, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/result.rs:548
  struct rig_core::agent::run::streamed::StreamedInvalidToolCall, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/streamed.rs:108
  struct rig_core::agent::run::StreamedInvalidToolCall, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/streamed.rs:108
  struct rig_core::tool::rmcp::McpClientHandler, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/rmcp.rs:444
  struct rig_core::test_utils::MockExtensionsProbeTool, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:76
  struct rig_core::agent::run::AgentRun, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/mod.rs:273
  struct rig_core::agent::AgentRun, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/mod.rs:273
  struct rig_core::agent::TypedPromptResponse, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/prompt_request/mod.rs:408
  struct rig_core::tool::rmcp::McpToolError, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/rmcp.rs:163
  struct rig_core::agent::WithToolServerHandle, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/builder.rs:56
  struct rig_core::extractor::Extractor, previously in file /tmp/.tmpMnZMhA/rig-core/src/extractor.rs:71
  struct rig_core::agent::run::PendingToolCall, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/mod.rs:137
  struct rig_core::agent::PendingToolCall, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/mod.rs:137
  struct rig_core::test_utils::MockExampleTool, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:303
  struct rig_core::test_utils::SessionId, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:65
  struct rig_core::providers::mistral::client::ApiErrorResponse, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/mistral/client.rs:221
  struct rig_core::providers::mistral::ApiErrorResponse, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/mistral/client.rs:221
  struct rig_core::test_utils::MockHandledFailureTool, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:530
  struct rig_core::test_utils::MockImageOutputTool, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:212
  struct rig_core::tool::MissingExtension, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/extensions.rs:408
  struct rig_core::test_utils::MockToolError, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:17
  struct rig_core::test_utils::MockFailure, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:477
  struct rig_core::agent::WithBuilderTools, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/builder.rs:65
  struct rig_core::tool::ToolCallExtensions, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/extensions.rs:229
  struct rig_core::providers::together::embedding::EmbeddingModel, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/together/embedding.rs:50
  struct rig_core::providers::together::EmbeddingModel, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/together/embedding.rs:50
  struct rig_core::test_utils::MockToolIndex, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:403
  struct rig_core::integrations::cli_chatbot::AgentImpl, previously in file /tmp/.tmpMnZMhA/rig-core/src/integrations/cli_chatbot.rs:16
  struct rig_core::agent::run::streamed::StreamedTurnAssembler, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/streamed.rs:309
  struct rig_core::agent::run::StreamedTurnAssembler, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/run/streamed.rs:309
  struct rig_core::test_utils::MockDeniedTool, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:569
  struct rig_core::agent::runner::AgentRunner, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/runner.rs:265
  struct rig_core::agent::AgentRunner, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/runner.rs:265
  struct rig_core::agent::TypedPromptRequest, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/prompt_request/mod.rs:592
  struct rig_core::agent::hook::InvalidToolCallContext, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:380
  struct rig_core::agent::InvalidToolCallContext, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:380
  struct rig_core::test_utils::MockAddTool, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:28
  struct rig_core::agent::hook::HookContext, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:310
  struct rig_core::agent::HookContext, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:310
  struct rig_core::test_utils::MockBarrierTool, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:330
  struct rig_core::providers::together::embedding::EmbeddingResponse, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/together/embedding.rs:30
  struct rig_core::providers::together::EmbeddingResponse, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/together/embedding.rs:30
  struct rig_core::agent::hook::RequestPatch, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:704
  struct rig_core::agent::RequestPatch, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:704
  struct rig_core::agent::NoToolConfig, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/builder.rs:50
  struct rig_core::tool::ToolSetBuilder, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/mod.rs:753
  struct rig_core::providers::openrouter::EmbeddingResponse, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/openrouter/embedding.rs:10
  struct rig_core::providers::openrouter::embedding::EmbeddingResponse, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/openrouter/embedding.rs:10
  struct rig_core::test_utils::MockMetadataTool, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:608
  struct rig_core::agent::hook::Scratchpad, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:222
  struct rig_core::agent::Scratchpad, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:222
  struct rig_core::tool::ToolFailure, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/result.rs:113
  struct rig_core::agent::CompletionCall, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/prompt_request/mod.rs:215
  struct rig_core::integrations::cli_chatbot::ChatBot, previously in file /tmp/.tmpMnZMhA/rig-core/src/integrations/cli_chatbot.rs:28
  struct rig_core::test_utils::BarrierMockToolIndex, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:440
  struct rig_core::test_utils::MockOperationArgs, previously in file /tmp/.tmpMnZMhA/rig-core/src/test_utils/tools.rs:21
  struct rig_core::agent::hook::HookStack, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:1331
  struct rig_core::agent::HookStack, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:1331
  struct rig_core::agent::StreamingPromptRequest, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/prompt_request/streaming.rs:280
  struct rig_core::prelude::ToolSet, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/mod.rs:560
  struct rig_core::tool::ToolSet, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/mod.rs:560

--- failure struct_pub_field_missing: pub struct's pub field removed or renamed ---

Description:
A publicly-visible struct has at least one public field that is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/struct_pub_field_missing.ron

Failed in:
  field message of struct ApiErrorResponse, previously in file /tmp/.tmpMnZMhA/rig-core/src/providers/gemini/client.rs:229

--- failure trait_method_missing: pub trait method removed or renamed ---

Description:
A trait method is no longer callable, and may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#trait-item-signature
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/trait_method_missing.ron

Failed in:
  method agent of trait CompletionClient, previously in file /tmp/.tmpMnZMhA/rig-core/src/client/completion.rs:50
  method extractor of trait CompletionClient, previously in file /tmp/.tmpMnZMhA/rig-core/src/client/completion.rs:55
  method agent of trait CompletionClient, previously in file /tmp/.tmpMnZMhA/rig-core/src/client/completion.rs:50
  method extractor of trait CompletionClient, previously in file /tmp/.tmpMnZMhA/rig-core/src/client/completion.rs:55
  method agent of trait CompletionClient, previously in file /tmp/.tmpMnZMhA/rig-core/src/client/completion.rs:50
  method extractor of trait CompletionClient, previously in file /tmp/.tmpMnZMhA/rig-core/src/client/completion.rs:55

--- failure trait_missing: pub trait removed or renamed ---

Description:
A publicly-visible trait cannot be imported by its prior path. A `pub use` may have been removed, or the trait itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/trait_missing.ron

Failed in:
  trait rig_core::streaming::StreamingCompletion, previously in file /tmp/.tmpMnZMhA/rig-core/src/streaming.rs:625
  trait rig_core::agent::hook::AgentHook, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:1151
  trait rig_core::agent::AgentHook, previously in file /tmp/.tmpMnZMhA/rig-core/src/agent/hook.rs:1151
  trait rig_core::prelude::StreamingPrompt, previously in file /tmp/.tmpMnZMhA/rig-core/src/streaming.rs:563
  trait rig_core::streaming::StreamingPrompt, previously in file /tmp/.tmpMnZMhA/rig-core/src/streaming.rs:563
  trait rig_core::completion::request::Completion, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/request.rs:462
  trait rig_core::completion::Completion, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/request.rs:462
  trait rig_core::prelude::Completion, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/request.rs:462
  trait rig_core::completion::request::Prompt, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/request.rs:371
  trait rig_core::completion::Prompt, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/request.rs:371
  trait rig_core::prelude::Prompt, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/request.rs:371
  trait rig_core::prelude::StreamingChat, previously in file /tmp/.tmpMnZMhA/rig-core/src/streaming.rs:584
  trait rig_core::streaming::StreamingChat, previously in file /tmp/.tmpMnZMhA/rig-core/src/streaming.rs:584
  trait rig_core::tool::ToolDyn, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/mod.rs:281
  trait rig_core::prelude::Tool, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/mod.rs:133
  trait rig_core::tool::Tool, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/mod.rs:133
  trait rig_core::tool::ToolEmbedding, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/mod.rs:250
  trait rig_core::completion::request::Chat, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/request.rs:387
  trait rig_core::completion::Chat, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/request.rs:387
  trait rig_core::prelude::Chat, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/request.rs:387
  trait rig_core::integrations::discord_bot::DiscordExt, previously in file /tmp/.tmpMnZMhA/rig-core/src/integrations/discord_bot.rs:214
  trait rig_core::tool::ToolEmbeddingDyn, previously in file /tmp/.tmpMnZMhA/rig-core/src/tool/mod.rs:468
  trait rig_core::completion::request::TypedPrompt, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/request.rs:431
  trait rig_core::completion::TypedPrompt, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/request.rs:431
  trait rig_core::prelude::TypedPrompt, previously in file /tmp/.tmpMnZMhA/rig-core/src/completion/request.rs:431
Changelog

rig-derive

0.41.0 - 2026-07-24

Added

Other

Contributors

Changed

  • (rig-derive) [breaking] generated #[rig_tool] implementations preserve the function's Result<T, E> error as Tool::Error until erased dispatch normalizes it. Context-free functions implement the portable Tool::call API; functions with one &mut ToolContext parameter implement the contextual classic API. The context parameter may appear in any position; fully qualified rig::agent::tool::ToolContext / rig_agent::tool::ToolContext paths are recognized directly, while imported names and aliases use #[rig(context)]. The macro forwards runtime context and excludes that parameter from the generated arguments and JSON Schema without confusing unrelated application types also named ToolContext.

rig-core

0.41.0 - 2026-07-24

Added

Fixed

Other

Contributors

Changed

  • (agent) [breaking] Remove the completion-model parameter from
    AgentHook, HookStack, and the erased hook interface. Managed response
    hooks now receive canonical Rig lifecycle fields (prompt, content,
    usage, and message_id) through non-generic CompletionResponse and
    StreamResponseFinish events. This lets one concrete hook attach to agents
    backed by different providers. Typed raw provider responses remain available
    from direct CompletionModel completion and streaming APIs.

    // Before
    impl<M: CompletionModel> AgentHook<M> for TelemetryHook { /* ... */ }
    
    // After
    impl AgentHook for TelemetryHook { /* ... */ }
  • (agent) [breaking] Remove AgentBuilder::dynamic_context,
    ExtractorBuilder::dynamic_context, and the internal DynamicContextStore
    passive-retrieval pipeline. Static builder context remains available. Rig no
    longer imposes passive-retrieval query selection, retrieval, filtering,
    reranking, formatting, caching, failure handling, or per-turn policy; those
    decisions belong in an application-defined AgentHook.

    Migration example:

    // Application code: Rig does not provide AppRetrievalHook.
    struct AppRetrievalHook<I> {
        index: I,
        samples: u64,
    }
    
    impl<I> AgentHook for AppRetrievalHook<I>
    where
        I: VectorStoreIndexDyn,
    {
        async fn on_completion_call(
            &self,
            _ctx: &HookContext,
            event: CompletionCallEvent<'_>,
        ) -> CompletionCallAction {
            let message_text = |message: &Message| match message {
                Message::User { content } => content.iter().find_map(|part| match part {
                    UserContent::Text(text) => Some(text.text.clone()),
                    _ => None,
                }),
                _ => None,
            };
            let Some(query) = message_text(event.prompt)
                .or_else(|| event.history.iter().rev().find_map(message_text))
            else {
                return CompletionCallAction::continue_run();
            };
    
            let request = VectorSearchRequest::builder()
                .query(query)
                .samples(self.samples)
                .build();
            match self.index.top_n(request).await {
                Ok(results) => {
                    let documents = results.into_iter().map(|(_, id, value)| Document {
                        id,
                        text: serde_json::to_string_pretty(&value)
                            .unwrap_or_else(|_| value.to_string()),
                        additional_props: Default::default(),
                    });
                    CompletionCallAction::patch(
                        RequestPatch::new().extra_context(documents),
                    )
                }
                Err(error) => CompletionCallAction::stop(
                    format!("application retrieval failed: {error}"),
                ),
            }
        }
    }
    
    // Before
    let agent = client.agent(model).dynamic_context(3, index).build();
    
    // After
    let agent = client
        .agent(model)
        .add_hook(AppRetrievalHook { index, samples: 3 })
        .build();

    CompletionCallAction::patch(RequestPatch::new().extra_context(documents))
    appends application-retrieved documents after static context. Returning
    CompletionCallAction::stop(...) on retrieval failure prevents provider I/O
    for that turn. The same hook-aware AgentRunner lifecycle powers blocking,
    streaming, and extractor execution; register the local hook with
    ExtractorBuilder::add_hook for extraction. Multiple hook context patches
    append in registration order. For active RAG, expose an index through its
    blanket Tool implementation or provide a custom retriever tool so the model
    decides whether and when to retrieve.

  • (agent) [breaking] Make AgentRunner the only execution path for configured agents: remove the raw Completion and StreamingCompletion traits and their Agent implementations, make agent execution state private, add runner-backed per-request overrides, and route Extractor through the full hook lifecycle. Raw hook-free requests remain available explicitly through CompletionModel.

    Migration examples:

    // Before: built a one-shot request from configured Agent state, but bypassed
    // the AgentRunner lifecycle.
    agent.completion(prompt, history).await?.send().await?;
    
    // After, for managed Agent execution: hooks, tools, retrieval, memory, and
    // turn accounting all run. Budget enough calls for tool follow-ups.
    agent
        .runner(prompt)
        .history(history)
        .max_turns(3)
        .run()
        .await?;

    Streaming follows the same boundary:

    // Before
    agent.stream_completion(prompt, history).await?.stream().await?;
    
    // After
    let stream = agent
        .runner(prompt)
        .history(history)
        .max_turns(3)
        .stream()
        .await;

    The runner consumes tool calls instead of returning the first raw model
    response. If the old caller handled that response itself, or for any other
    intentionally hook-free provider transport, start from the model rather than
    an Agent:

    model
        .completion_request(prompt)
        .messages(history)
        .send()
        .await?;
    
    let stream = model
        .completion_request(prompt)
        .messages(history)
        .stream()
        .await?;

    AgentRun::new(prompt).with_history(history) remains the public sans-I/O
    state machine for custom drivers. It contains no model, tools, memory, or hook
    stack: callers must handle every AgentRunStep, perform provider/tool IO, and
    feed results back explicitly. It is not a way to execute a configured
    Agent; use AgentRunner for that.

    An Agent also keeps its configured model private and fixed. Applications
    that previously called .model(...) or .model_opt(...) on the returned raw
    request builder should retain the provider CompletionModel and use its raw
    request API, or construct a separate Agent for that model selection.

  • (providers) [breaking] Move Together, OpenRouter, and Mistral embeddings onto the shared GenericEmbeddingModel, with provider-specific endpoint and typed request-shaping hooks. Together now forwards configured embedding dimensions, Mistral maps Codestral Embed dimensions to output_dimension while rejecting dimensions for fixed-size models, compatible providers may omit usage without weakening OpenAI's public response type, and Base64 response encoding is rejected before sending because the shared parser accepts numeric vectors. Remove the superseded provider-specific embedding response/data types, Together's API envelope module, and OpenRouter's duplicate EncodingFormat.

  • (tool) [breaking] Replace the parallel tool-execution APIs with one structured path. Typed tools now implement only Tool::call(&mut ToolContext, Args) -> Result<Output, Error>; author-facing errors remain typed until private runtime erasure normalizes them into ToolExecutionError, ToolContext carries inbound values and host-only result metadata, ToolResult is the single runtime observation, and ToolSet::execute / ToolServerHandle::execute are the dispatch surfaces. Event-specific hook action types make invalid event/action combinations unrepresentable.

    • Tool implementations: retain one typed type Error for ordinary ? propagation and direct-call tests; remove classify_error, call_with_extensions, and call_structured. The optional map_error method classifies domain failures at the erased boundary, while its default preserves the source as Other. Return refusals through map_error with ToolExecutionError::refused, and attach host-only result metadata with ToolContext::insert_result.
    • Context: replace ToolCallExtensions and ToolResultExtensions with ToolContext; replace request/runner .tool_extensions(...) with .tool_context(...). Each dispatch snapshots inbound context exactly once, isolates tool-local mutations, and publishes only result metadata back to the caller and hooks.
    • Dynamic tools: ToolDyn is removed from the public API; use DynamicTool for runtime-defined tools. Rig's erased dispatch trait is private. Typed tools use Tool::NAME as their sole identity; runtime-named agents convert explicitly with Agent::into_tool().
    • Registration vocabulary: AgentBuilder::tools(Vec<Box<dyn ToolDyn>>) is removed; use repeated .tool(...) calls for typed tools or dynamic_tools(Vec<DynamicTool>) for runtime-defined callbacks. Retrieval-backed dynamic_tools(sample, index, toolset) becomes retrieved_tools. On ToolSetBuilder, static_tool remains the typed-tool path, the former embedding-backed dynamic_tool(ToolEmbedding) becomes retrieved_tool, and runtime-defined callbacks use dynamic_tool(DynamicTool).
    • Results and errors: replace ToolError, ToolFailure, ToolFailureKind, ToolReturn, ToolReturnOutcome, ToolExecutionResult, and ToolOutcome with ToolExecutionError, ToolErrorKind, and the read-only ToolResult observed by hooks.
    • Model presentation: serializable outputs convert once into canonical ToolOutput content blocks; strings remain literal text, explicit serde_json::Value values remain JSON, and multimodal tools use ToolOutput::content / ToolOutput::one or return typed ToolResultContent directly. Result hooks now rewrite ToolOutput, provider adapters preserve native JSON where supported or render it only at their terminal wire boundary, mixed user/tool-result blocks retain order, and Rig never reparses strings to infer rich content. Consumers can inspect ToolResultContent with as_text / as_json and explicitly decode either structured JSON or legacy JSON-bearing text with deserialize_json.
    • Error presentation: explicit ToolExecutionError constructors keep actionable diagnostics model-visible, while the generic ToolExecutionError::from_error path preserves operator diagnostics and the concrete source but defaults to safe kind-level model feedback. Use with_model_feedback for deliberate replacement text or with_model_output for JSON/multimodal feedback. MCP responses preserve ordered supported text/image content, retain unsupported and future blocks as typed JSON, and attach raw CallToolResult, structuredContent, and response metadata to ToolContext. MCP list installation and refresh are atomic and ownership-aware, so stale handlers cannot replace or remove newer registrations, while disconnected owners are retired during refresh, provider exposure, or direct dispatch.
    • Dispatch: replace ToolSet::{call, call_with_extensions, call_structured} with ToolSet::execute; replace ToolServerHandle::{call_tool, call_tool_with_extensions, call_tool_structured} with ToolServerHandle::execute.
    • Registration and definitions: ToolSet is the single ordered registry and records whether each tool is always advertised or retrieval-only. ToolSet::{get_tool_definitions, documents} are now synchronous and infallible, ToolServerHandle registration/removal methods no longer return an artificial Result, and the obsolete ToolSetError is removed.
    • Hooks: replace AgentHook::on_event, StepEvent, and Flow with the event-specific AgentHook methods and their corresponding action types (CompletionCallAction, ToolCallAction, ToolResultAction, InvalidToolCallAction, and ObservationAction). Result rewrites replace the effective model and result-content telemetry presentation while preserving the raw ToolResult and ToolContext for policy; result stops omit result-content telemetry. Invalid-tool hooks return None to defer; every explicit action, including Fail, is terminal for that hook stack.
    • Streaming execution observation: the atomically surfaced post-batch event is named ToolExecutionCommitted, reflecting that it is not a real-time start notification. Applications that need live host lifecycle events should observe on_tool_call / on_tool_result; typed result metadata remains available through ToolResultEvent::tool_context without entering model-facing messages.
  • (core) [breaking] Mark PromptError, StructuredOutputError, and VectorStoreError as non-exhaustive, requiring downstream match expressions to include a wildcard arm. Conversation memory load failures now surface as the typed PromptError::MemoryError variant instead of CompletionError::RequestError.

rig-agent

0.41.0 - 2026-07-24

Added

Other

Contributors

rig-bedrock

0.41.0 - 2026-07-24

Added

Fixed

Other

Contributors

rig-candle

0.41.0 - 2026-07-24

Added

Other

Contributors

rig-fastembed

0.38.1 - 2026-06-02

Other

Contributors

rig-gemini-grpc

0.40.0 - 2026-07-10

Added

Contributors

rig-helixdb

0.38.1 - 2026-06-02

Other

Contributors

rig-lancedb

0.41.0 - 2026-07-24

Added

Other

Contributors

rig-memory

0.41.0 - 2026-07-24

Added

Other

Contributors

rig-milvus

0.38.1 - 2026-06-02

Other

Contributors

rig-mongodb

0.38.1 - 2026-06-02

Other

Contributors

rig-neo4j

0.40.0 - 2026-07-10

Added

Contributors

Added

  • (neo4j) implement InsertDocuments for Neo4jVectorIndex — bulk-insert documents with precomputed embeddings via a single UNWIND Cypher write (one node per embedding, document fields flattened onto the node alongside embedded_text and the configured embedding property). Nodes are written under the index's label, which get_index now resolves from the index's labelsOrTypes (default Document); IndexConfig gains a node_label field + builder. (closes #1636)

rig-postgres

0.40.0 - 2026-07-10

Fixed

Contributors

rig-qdrant

0.38.1 - 2026-06-02

Other

Contributors

rig-s3vectors

0.41.0 - 2026-07-24

Fixed

Contributors

rig-scylladb

0.38.1 - 2026-06-02

Other

Contributors

rig-sqlite

0.40.0 - 2026-07-10

Other

Contributors

rig-surrealdb

0.41.0 - 2026-07-24

Other

Contributors

rig-vectorize

0.38.1 - 2026-06-02

Other

Contributors

rig-vertexai

0.41.0 - 2026-07-24

Added

Other

Contributors

rig

0.41.0 - 2026-07-24

Added

Fixed

redroy44 pushed a commit that referenced this pull request Jul 24, 2026
…ds#1987)

* fix(vector-store): honor filter + threshold in in-memory index; fix Filter::satisfies field matching

InMemoryVectorIndex::top_n/top_n_ids ignored req.filter() and req.threshold(),
so the default store returned unfiltered/un-thresholded results that diverged
from every real backend. Apply both during the scan (before top-n selection).

Filter::satisfies compared a single-key {k:v} object against the whole document
(only matching single-field docs) and passed an object to compare_pair for
Gt/Lt (always None -> always false). Rewrite leaf filters to look the key up in
the document and compare the field, which also fixes rig-helixdb's use of it.

Add unit tests for satisfies and a top_n filter/threshold conformance test.

* fix(embeddings): de-duplicate VectorDistance impls; fix chebyshev rayon drift

distance.rs carried two full copies of the VectorDistance impl (sequential and
rayon). They had drifted: under the rayon feature, chebyshev_distance used
sequential .iter() while every sibling used par_iter(), so one metric was
silently unparallelized. Factor both impls through one macro parameterized by
the iterator constructor and the max-reduction (Iterator::fold vs
ParallelIterator::reduce), which is why the copy could not simply swap iter for
par_iter. Verified identical results under both feature configs.

* fix(streaming): derive usage from final response in From impl; add usage() accessor

From<StreamingCompletionResponse<R>> for CompletionResponse hardcoded
Usage::new(), so any caller using .into() on a completed stream silently got
zero usage even though R: GetTokenUsage and value.response holds the final
usage. Derive it via Option<R>: GetTokenUsage (zero sentinel when no final
response). Add StreamingCompletionResponse::usage() and cover both paths.

* refactor(core): delete unwired abstractions; dedupe UNKNOWN_AGENT_NAME

Remove speculative/dead code with no consumers anywhere in the workspace:
- Transport::NdJson (never constructed; all matches use wildcards)
- ConvertMessage trait (no impls, no consumer, not re-exported)
- telemetry ProviderRequestExt trait + its lone openai impl (no consumer)
- SpanCombinator::record_model_input (zero call sites)
- http SSE with_retry_policy + RetryPolicy::{Constant,Never} (never used; the
  RetryPolicy trait, ExponentialBackoff, and DEFAULT_RETRY stay)

Dedupe the duplicated UNKNOWN_AGENT_NAME const (agent/runner.rs and
agent/completion.rs) into one pub(crate) const in agent/mod.rs.

* fix(vector-store): address code-review findings on filter/threshold

- Filter::satisfies: make Eq numeric-aware (5 matches 5.0) so equality is
  consistent with Gt/Lt, and compare integers exactly (i64/u64 before f64) so
  values beyond 2^53 no longer collapse to the same lossy f64.
- In-memory scan: exclude non-finite (NaN) similarities from a zero-magnitude
  embedding, which sorted as the OrderedFloat maximum and slipped past the
  threshold check, wrongly ranking #1.
- De-duplicate the per-document scoring block (filter + best similarity +
  finite + threshold) into a shared score_candidate helper used by both the
  brute-force and LSH scans.
- Add regression tests for int/float equality, large-integer ordering, and
  NaN exclusion.

* fix(vector-store): rank documents by best finite embedding

The prior NaN guard ran after max_by, but NaN sorts as the OrderedFloat
maximum, so for a document with multiple embeddings max_by selected the
degenerate (zero-magnitude) chunk and the guard then dropped the whole
document — even when it had a strong finite-similarity chunk. Filter
non-finite similarities before max_by so a document ranks by its best finite
embedding and is skipped only when it has none. Add a multi-embedding
regression test.
@github-actions github-actions Bot changed the title chore: release v0.39.0 chore: release v0.41.0 Jul 24, 2026
@github-actions
github-actions Bot force-pushed the release-plz-2026-06-18T08-59-23Z branch from 5c75fba to 8d92a8a Compare July 24, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants