Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,14 @@ jobs:
- name: Check test modules are sibling files
run: cargo xtask check-test-layout

# Lists that grow with every provider, companion crate or dependency
# (marked `sorted: start` / `sorted: end` in Cargo.toml, rig-core's
# providers module list and the README integration table) stay in
# order, so two PRs that each add one entry touch different lines
# instead of the same hunk.
- name: Check marked lists are sorted
run: cargo xtask check-sorted-blocks

clippy:
name: stable / clippy
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ surfaces (`AgentRunner::stream` and `AgentRunner::run` share `drive_agent`).
or `tests.rs` beside `mod.rs`/`lib.rs`. `cargo xtask check-test-layout`
enforces this in CI.
- Avoid unrelated refactors.
- Lists between `sorted: start` / `sorted: end` markers (Cargo.toml dependency and feature blocks, rig-core's providers module list, the README integration table) stay in case-insensitive byte order; `cargo xtask check-sorted-blocks` enforces it. Insert new entries in place, never at the end.
- Cassette wrappers are discovered by convention (a function named `with_*cassette*` whose first argument is the scenario, called only from its own `tests/providers/<provider>/` directory); there is no registry to update.

## Cassette Regression Tests

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Additionally, please ensure that if you are submitting a bug ticket (ie, somethi

Contributions are always encouraged and welcome. Before creating a pull request, create a new issue that tracks that pull request describing the problem in more detail. Pull request descriptions should include information about its implementation, especially if it makes changes to existing abstractions.

PRs should be small and focused and should avoid interacting with multiple facets of the library. This may result in a larger PR being split into two or more smaller PRs. Commit messages should follow the [Conventional Commit](https://conventionalcommits.org/en/v1.0.0) format (prefixing with `feat`, `fix`, etc.) as this integrates into our auto-releases via a [release-plz](https://github.com/MarcoIeni/release-plz) Github action.
PRs should be small and focused and should avoid interacting with multiple facets of the library. Lists marked `sorted: start` / `sorted: end` (in `Cargo.toml`, the providers module list and the README integration table) are kept sorted so concurrent PRs do not collide on the same hunk; `cargo xtask check-sorted-blocks` runs in CI. This may result in a larger PR being split into two or more smaller PRs. Commit messages should follow the [Conventional Commit](https://conventionalcommits.org/en/v1.0.0) format (prefixing with `feat`, `fix`, etc.) as this integrates into our auto-releases via a [release-plz](https://github.com/MarcoIeni/release-plz) Github action.

Do not edit `CHANGELOG.md`, `crates/*/CHANGELOG.md` or `MIGRATING.md` in a pull request; CI fails the PR if you do. Put changelog bullets and migration notes in the PR description under `## Changelog` and `## Migration` (the PR template has both). The repository squash-merges, so those sections become the merge commit body, and the release PR regenerates both files from them via `scripts/release-notes.sh`.

Expand Down
107 changes: 61 additions & 46 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -110,24 +110,30 @@ edition = "2024"
#
# The `rig` facade is the workspace-root package; examples depend on it via
# `rig.workspace = true` (add per-example features at the use site).
# sorted: start
rig = { path = ".", version = "0.42.0" }
rig-agent = { path = "crates/rig-agent", version = "0.42.0" }
rig-core = { path = "crates/rig-core", version = "0.42.0" }
rig-reqwest = { path = "crates/rig-reqwest", version = "0.42.0" }
rig-rmcp = { path = "crates/rig-rmcp", version = "0.42.0" }
rig-core = { path = "crates/rig-core", version = "0.42.0" }
# sorted: end

# sorted: start
anyhow = "1"
arrow-array = "58"
as-any = "0.3"
assert_fs = "1"
async-stream = "0.3"
axum = "0.8"
aws-config = { version = "1", default-features = false }
# 1.124: `OutputConfig`/`ServiceTier`/citations types rig-bedrock maps.
aws-sdk-bedrockruntime = { version = "1.124", default-features = false }
aws-smithy-eventstream = "0.60"
aws-smithy-runtime-api = "1"
aws-smithy-types = "1"
axum = "0.8"
base64 = "0.22"
# Runtime-agnostic executor used by the `agent_no_tokio` example.
bevy_tasks = { version = "0.19", features = ["multi_threaded"] }
bytes = "1"
candle-core = "0.11"
candle-nn = "0.11"
Expand All @@ -143,15 +149,13 @@ eventsource-stream = "0.2.3"
fastembed = { version = "4.5", default-features = false }
fastrand = "2"
futures = "0.3"
# Runtime-agnostic executor used by the `agent_no_tokio` example.
bevy_tasks = { version = "0.19", features = ["multi_threaded"] }
futures-timer = "3"
glob = "0.3"
google-cloud-auth = "1"
# 1.7: `ThinkingLevel`, `ImageConfig`, `FunctionResponse{Blob,FileData}`.
google-cloud-aiplatform-v1 = { version = "1.7", default-features = false, features = [
"prediction-service",
] }
google-cloud-auth = "1"
http = "1"
# 0.8.2: `Recording::export_async` (cassette harness).
httpmock = "0.8.2"
Expand All @@ -175,6 +179,7 @@ ordered-float = "5"
pgvector = "0.4.2"
pin-project-lite = "0.2"
proc-macro2 = "1"
prost = "0.14"
# 1.10: the `Qdrant` client, `Payload`, and the query/upsert builders.
qdrant-client = { version = "1.10", default-features = false, features = [
"serde",
Expand All @@ -187,17 +192,16 @@ reqwest = { version = "0.13", default-features = false }
reqwest-middleware = { version = "0.5", default-features = false }
reqwest-retry = "0.9"
rmcp = "2"
url = "2"
rusqlite = "0.32"
scylla = "1"
safetensors = "0.8"
schemars = "1"
scylla = "1"
serde = "1"
serde_yaml = "0.9"
# 1.0.54: the `float_roundtrip` feature.
serde_json = "1.0.54"
safetensors = "0.8"
sha2 = "0.10"
serde_path_to_error = "0.1"
serde_yaml = "0.9"
sha2 = "0.10"
sqlite-vec = "0.1"
sqlx = "0.9"
# 3.2: 3.0/3.1 no longer build against `surrealdb-core ^3` as published.
Expand All @@ -207,27 +211,28 @@ term_size = "0.3"
testcontainers = "0.27"
textwrap = "0.16"
thiserror = "2"
tokenizers = { version = "0.22", default-features = false }
tokio = "1"
tokio-rusqlite = { version = "0.6", default-features = false }
tokio-test = "0.4"
tokio-stream = "0.1"
tokio-test = "0.4"
tokio-tungstenite = { version = "0.29", default-features = false }
tokenizers = { version = "0.22", default-features = false }
tonic = "0.14"
tonic-build = "0.14"
tonic-prost = "0.14"
tonic-prost-build = "0.14"
prost = "0.14"
tracing = "0.1"
# 0.2.5: `Instrumented<S>: Stream` under `futures-03` for futures 0.3 stable.
tracing-futures = "0.2.5"
tracing-opentelemetry = "0.33"
tracing-subscriber = "0.3"
url = "2"
uuid = "1"
wasm-bindgen-futures = "0.4"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-time = "1"
zerocopy = "0.8"
# sorted: end

[workspace.metadata.cargo-autoinherit]
# Skip cargo-autoinherit for these packages
Expand All @@ -241,15 +246,16 @@ rig-core = { path = "crates/rig-core", version = "0.42.0", default-features = fa
rig-reqwest = { path = "crates/rig-reqwest", version = "0.42.0", optional = true, default-features = false }
rig-agent = { path = "crates/rig-agent", version = "0.42.0", optional = true, default-features = false }
rig-rmcp = { path = "crates/rig-rmcp", version = "0.42.0", optional = true }
rig-derive = { path = "crates/rig-derive", version = "0.42.0", optional = true }
# Companion crates, one optional dependency per `crates/rig-*` integration.
# sorted: start
rig-bedrock = { path = "crates/rig-bedrock", version = "0.42.0", optional = true, default-features = false }
rig-candle = { path = "crates/rig-candle", version = "0.42.0", optional = true, default-features = false }
rig-fastembed = { path = "crates/rig-fastembed", version = "0.42.0", optional = true, default-features = false }
rig-gemini-grpc = { path = "crates/rig-gemini-grpc", version = "0.42.0", optional = true, default-features = false }
rig-helixdb = { path = "crates/rig-helixdb", version = "0.42.0", optional = true, default-features = false }
rig-lancedb = { path = "crates/rig-lancedb", version = "0.42.0", optional = true, default-features = false }
lancedb = { workspace = true, optional = true }
rig-memory = { path = "crates/rig-memory", version = "0.42.0", optional = true, default-features = false }
rig-derive = { path = "crates/rig-derive", version = "0.42.0", optional = true }
rig-milvus = { path = "crates/rig-milvus", version = "0.42.0", optional = true, default-features = false }
rig-mongodb = { path = "crates/rig-mongodb", version = "0.42.0", optional = true, default-features = false }
rig-neo4j = { path = "crates/rig-neo4j", version = "0.42.0", optional = true, default-features = false }
Expand All @@ -261,6 +267,10 @@ rig-sqlite = { path = "crates/rig-sqlite", version = "0.42.0", optional = true,
rig-surrealdb = { path = "crates/rig-surrealdb", version = "0.42.0", optional = true, default-features = false }
rig-vectorize = { path = "crates/rig-vectorize", version = "0.42.0", optional = true, default-features = false }
rig-vertexai = { path = "crates/rig-vertexai", version = "0.42.0", optional = true, default-features = false }
# sorted: end
# Re-exported beside `rig-lancedb` for the `lancedb` feature; not a companion
# crate itself, so it sits outside the sorted block.
lancedb = { workspace = true, optional = true }

# The bundled websocket backend is native-only (tungstenite needs a tokio
# reactor and raises a `compile_error!` on wasm), so it is scoped to non-wasm
Expand All @@ -280,6 +290,7 @@ rig-vertexai = { path = "crates/rig-vertexai", version = "0.42.0", optional = tr
rig-tungstenite = { path = "crates/rig-tungstenite", version = "0.42.0", optional = true }

[dev-dependencies]
# sorted: start
anyhow = { workspace = true }
arrow-array = { workspace = true }
assert_fs = { workspace = true }
Expand All @@ -289,25 +300,19 @@ aws-sdk-bedrockruntime = { workspace = true }
aws-smithy-eventstream = { workspace = true }
aws-smithy-runtime-api = { workspace = true }
aws-smithy-types = { workspace = true }
rig-core = { path = "crates/rig-core", version = "0.42.0", default-features = false, features = [
"test-utils",
] }
rig-agent = { path = "crates/rig-agent", version = "0.42.0", default-features = false, features = [
"test-utils",
] }
tokio = { workspace = true, features = ["full"] }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
tokio-test = { workspace = true }
redis = { workspace = true, features = ["tokio-comp", "aio", "vector-sets"] }
serde_path_to_error = { workspace = true }
axum = { workspace = true }
base64 = { workspace = true }
bytes = { workspace = true }
futures = { workspace = true }
httpmock = { workspace = true, features = ["record", "proxy"] }
hyper-util = { workspace = true, features = ["service", "server"] }
mongodb = { workspace = true }
neo4rs = { workspace = true }
opentelemetry = { workspace = true }
opentelemetry-otlp = { workspace = true }
opentelemetry_sdk = { workspace = true, features = ["rt-tokio"] }
qdrant-client = { workspace = true }
reqwest-retry = { workspace = true }
redis = { workspace = true, features = ["tokio-comp", "aio", "vector-sets"] }
reqwest = { workspace = true, features = ["json", "stream"] }
reqwest-middleware = { workspace = true, features = [
"json",
Expand All @@ -316,39 +321,46 @@ reqwest-middleware = { workspace = true, features = [
"http2",
"rustls",
] }
reqwest-retry = { workspace = true }
rig-agent = { path = "crates/rig-agent", version = "0.42.0", default-features = false, features = [
"test-utils",
] }
rig-core = { path = "crates/rig-core", version = "0.42.0", default-features = false, features = [
"test-utils",
] }
rmcp = { workspace = true, features = [
"client",
"macros",
"reqwest",
"transport-streamable-http-client",
"transport-streamable-http-client-reqwest",
"transport-streamable-http-server-session",
"transport-streamable-http-server",
"transport-worker",
] }
rusqlite = { workspace = true, features = ["bundled"] }
schemars = { workspace = true }
serde = { workspace = true, features = ["derive"] }
sha2 = { workspace = true }
# float_roundtrip keeps cassette scrubbing idempotent on float-heavy bodies
# (e.g. embedding vectors): without it, parse→print can oscillate between two
# representations of the same decimal and the recorded YAML never stabilizes.
serde_json = { workspace = true, features = ["float_roundtrip"] }
serde_path_to_error = { workspace = true }
serde_yaml = { workspace = true }
syn = { workspace = true, features = ["full", "visit"] }
rusqlite = { workspace = true, features = ["bundled"] }
sha2 = { workspace = true }
sqlite-vec = { workspace = true }
sqlx = { workspace = true, features = ["runtime-tokio", "postgres", "uuid", "json"] }
syn = { workspace = true, features = ["full", "visit"] }
testcontainers = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["full"] }
tokio-rusqlite = { workspace = true, features = ["bundled"] }
hyper-util = { workspace = true, features = ["service", "server"] }
rmcp = { workspace = true, features = [
"client",
"macros",
"reqwest",
"transport-streamable-http-client",
"transport-streamable-http-client-reqwest",
"transport-streamable-http-server-session",
"transport-streamable-http-server",
"transport-worker",
] }
axum = { workspace = true }
opentelemetry = { workspace = true }
opentelemetry_sdk = { workspace = true, features = ["rt-tokio"] }
opentelemetry-otlp = { workspace = true }
tokio-test = { workspace = true }
tracing = { workspace = true }
tracing-opentelemetry = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
url = { workspace = true }
# sorted: end

[features]
default = ["rig-core/default", "reqwest", "agent", "derive", "rustls"]
Expand All @@ -358,6 +370,8 @@ test-utils = ["rig-core/test-utils", "rig-agent?/test-utils"]
# (`tests/tool_facade_features.rs`). Not in `default`; `--all-features` (CI's
# lane) enables it so the guard still runs, while ad-hoc `cargo test` skips it.
facade-build-tests = []
# Companion-crate features, one per optional dependency above.
# sorted: start
bedrock = ["dep:rig-bedrock"]
candle = ["dep:rig-candle"]
fastembed = [
Expand All @@ -382,6 +396,7 @@ sqlite = ["dep:rig-sqlite"]
surrealdb = ["dep:rig-surrealdb"]
vectorize = ["dep:rig-vectorize"]
vertexai = ["dep:rig-vertexai"]
# sorted: end
audio = ["rig-core/audio", "rig-agent?/audio", "rig-reqwest?/audio"]
image = ["rig-core/image", "rig-agent?/image", "rig-reqwest?/image"]
derive = ["dep:rig-derive", "rig-core/derive", "rig-agent?/derive"]
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ The root `rig` facade exposes companion crates behind one feature per integratio
rig = { version = "0.36.0", features = ["lancedb", "fastembed"] }
```

<!-- sorted: start -->
| Integration | Crate | Feature | Module path |
| --- | --- | --- | --- |
| AWS Bedrock | [`rig-bedrock`](https://github.com/0xPlaygrounds/rig/tree/main/crates/rig-bedrock) | `bedrock` | `rig::bedrock` |
Expand All @@ -175,6 +176,7 @@ rig = { version = "0.36.0", features = ["lancedb", "fastembed"] }
| ScyllaDB | [`rig-scylladb`](https://github.com/0xPlaygrounds/rig/tree/main/crates/rig-scylladb) | `scylladb` | `rig::scylladb` |
| SQLite | [`rig-sqlite`](https://github.com/0xPlaygrounds/rig/tree/main/crates/rig-sqlite) | `sqlite` | `rig::sqlite` |
| SurrealDB | [`rig-surrealdb`](https://github.com/0xPlaygrounds/rig/tree/main/crates/rig-surrealdb) | `surrealdb` | `rig::surrealdb` |
<!-- sorted: end -->

`rig::memory` is available without the `memory` feature; it contains the core
conversation memory traits and in-memory backend re-exported from `rig-core`.
Expand Down
2 changes: 2 additions & 0 deletions crates/rig-core/src/providers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
//! # Ok(())
//! # }
//! ```
// sorted: start
pub mod anthropic;
pub mod azure;
pub mod chatgpt;
Expand Down Expand Up @@ -134,3 +135,4 @@ pub mod voyageai;
pub mod xai;
pub mod xiaomimimo;
pub mod zai;
// sorted: end
Loading
Loading