agentsdk 0.6.2

An open-source Rust library for building AI-powered applications, inspired by the Vercel AI SDK. It provides a robust, type-safe, and easy-to-use interface for interacting with various Large Language Models (LLMs).
Documentation

[package]
name = "agentsdk"
version = "0.6.2"
edition = "2024"
license = "MIT"
description = "An open-source Rust library for building AI-powered applications, inspired by the Vercel AI SDK. It provides a robust, type-safe, and easy-to-use interface for interacting with various Large Language Models (LLMs)."
homepage = "https://github.com/dineshdb/agentsdk"
repository = "https://github.com/dineshdb/agentsdk"
readme = "README.md"
keywords = ["ai", "sdk", "agentsdk", "ai-sdk-rs", "openai"]
categories = ["api-bindings", "asynchronous"]

[package.metadata.release]
pre-release-commit-message = "chore: release {{version}}"
pre-release-replacements = [
    {file="CHANGELOG.md", search="Unreleased", replace="{{version}}"},
    {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1},
    {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}"},
    {file="CHANGELOG.md", search="<!-- next-header -->", replace="<!-- next-header -->\n\n## [Unreleased] - ReleaseDate", exactly=1},
    {file="CHANGELOG.md", search="<!-- next-url -->", replace="<!-- next-url -->\n[Unreleased]: https://github.com/dineshdb/agentsdk/compare/{{tag_name}}...HEAD", exactly=1},
]
[workspace]
members = [".", "crates/agentsdk-macros"]
resolver = "2"

[features]
default = ["language-model-request", "embedding-model-request"]
full = [
    "language-model-request",
    "embedding-model-request",
    "prompt",
    "openai",
    "openaicompatible",
    "openaichatcompletions",
    "anthropic",
    "groq",
    "vercel",
    "google",
    "openrouter",
    "deepseek",
    "amazon-bedrock",
    "togetherai",
    "xai",
    "mistral",
    "abacus",
    "aihubmix",
    "alibaba",
    "alibaba-cn",
    "bailing",
    "baseten",
    "chutes",
    "cloudflare-ai-gateway",
    "cortecs",
    "firmware",
    "fireworks-ai",
    "friendli",
    "fastrouter",
    "github-copilot",
    "github-models",
    "helicone",
    "huggingface",
    "iflowcn",
    "inception",
    "inference",
    "io-net",
    "llama",
    "lmstudio",
    "lucidquery",
    "moark",
    "modelscope",
    "moonshotai",
    "moonshotai-cn",
    "morph",
    "nano-gpt",
    "nebius",
    "nova",
    "novita-ai",
    "nvidia",
    "ollama-cloud",
    "opencode",
    "ovhcloud",
    "poe",
    "privatemode-ai",
    "requesty",
    "scaleway",
    "siliconflow",
    "siliconflow-cn",
    "submodel",
    "synthetic",
    "upstage",
    "vultr",
    "wandb",
    "xiaomi",
    "zai",
    "zai-coding-plan",
    "zenmux",
    "zhipuai",
    "zhipuai-coding-plan",
    "302ai",
    "berget",
    "cloudflare-workers-ai",
    "jiekou",
    "kuae-cloud-coding-plan",
    "stackit",
    "stepfun",
]
language-model-request = []
embedding-model-request = []
test-access = []
jitter = ["dep:fastrand"]
prompt = ["tera", "glob"]
axum = ["dep:axum"]
openai = []
anthropic = []
google = []
openaichatcompletions = []
openaicompatible = ["openaichatcompletions"]
groq = ["openaichatcompletions"]
vercel = ["openaichatcompletions"]
openrouter = ["openaichatcompletions"]
deepseek = ["openaichatcompletions"]
mistral = ["openaichatcompletions"]
amazon-bedrock = ["openaichatcompletions"]
togetherai = ["openaichatcompletions"]
xai = ["openaichatcompletions"]
abacus = ["openaichatcompletions"]
aihubmix = ["openaichatcompletions"]
alibaba = ["openaichatcompletions"]
alibaba-cn = ["openaichatcompletions"]
bailing = ["openaichatcompletions"]
baseten = ["openaichatcompletions"]
chutes = ["openaichatcompletions"]
cloudflare-ai-gateway = ["openaichatcompletions"]
cortecs = ["openaichatcompletions"]
firmware = ["openaichatcompletions"]
fireworks-ai = ["openaichatcompletions"]
friendli = ["openaichatcompletions"]
fastrouter = ["openaichatcompletions"]
github-copilot = ["openaichatcompletions"]
github-models = ["openaichatcompletions"]
helicone = ["openaichatcompletions"]
huggingface = ["openaichatcompletions"]
iflowcn = ["openaichatcompletions"]
inception = ["openaichatcompletions"]
inference = ["openaichatcompletions"]
io-net = ["openaichatcompletions"]
llama = ["openaichatcompletions"]
lmstudio = ["openaichatcompletions"]
lucidquery = ["openaichatcompletions"]
moark = ["openaichatcompletions"]
modelscope = ["openaichatcompletions"]
moonshotai = ["openaichatcompletions"]
moonshotai-cn = ["openaichatcompletions"]
morph = ["openaichatcompletions"]
nano-gpt = ["openaichatcompletions"]
nebius = ["openaichatcompletions"]
nova = ["openaichatcompletions"]
novita-ai = ["openaichatcompletions"]
nvidia = ["openaichatcompletions"]
ollama-cloud = ["openaichatcompletions"]
opencode = ["openaichatcompletions"]
ovhcloud = ["openaichatcompletions"]
poe = ["openaichatcompletions"]
privatemode-ai = ["openaichatcompletions"]
requesty = ["openaichatcompletions"]
scaleway = ["openaichatcompletions"]
siliconflow = ["openaichatcompletions"]
siliconflow-cn = ["openaichatcompletions"]
submodel = ["openaichatcompletions"]
synthetic = ["openaichatcompletions"]
upstage = ["openaichatcompletions"]
vultr = ["openaichatcompletions"]
wandb = ["openaichatcompletions"]
xiaomi = ["openaichatcompletions"]
zai = ["openaichatcompletions"]
zai-coding-plan = ["openaichatcompletions"]
zenmux = ["openaichatcompletions"]
zhipuai = ["openaichatcompletions"]
zhipuai-coding-plan = ["openaichatcompletions"]
302ai = ["openaichatcompletions"]
berget = ["openaichatcompletions"]
cloudflare-workers-ai = ["openaichatcompletions"]
jiekou = ["openaichatcompletions"]
kuae-cloud-coding-plan = ["openaichatcompletions"]
stackit = ["openaichatcompletions"]
stepfun = ["openaichatcompletions"]

[dependencies]
agentsdk-macros = { version = "0.6.1", path = "./crates/agentsdk-macros" }
async-trait = "0.1.88"
axum = { version = ">=0.7, <0.9", optional = true }
derive_builder = "0.20.2"
fastrand = { version = "2", optional = true }
futures = "0.3"
glob = { version = "0.3", optional = true }
log = "0.4"
parking_lot = "0.12.5"
reqwest = { version = "0.12", default-features = false, features = ["json", "stream", "rustls-tls"] }
reqwest-eventsource = "0.6.0"
schemars = "1.0.4"
serde = { version = "1.0.219", features = ["derive"] }
serde_json = { version = "1.0" }
tera = { version = "1", optional = true }
thiserror = "2.0.12"
tokio = { version = "1.0", features = ["rt-multi-thread", "macros"] }
uuid = { version = "1.0", features = ["v4"] }

[dev-dependencies]
cargo-husky = { version = "1", features = ["precommit-hook", "run-cargo-test", "run-cargo-clippy", "run-cargo-fmt"] }
dotenv = "0.15.0"
tempfile = "3.10.1"
tokio = { version = "1.0", features = ["full"] }
tower-http = { version = "0.6.8", features = ["cors"] }
wiremock = "0.6.5"

[[example]]
name = "git-summary"
path = "examples/git-summary/src/main.rs"
required-features = ["prompt", "openai"]

[[example]]
name = "react-axum-agent"
path = "examples/react-axum-agent/backend/src/main.rs"
required-features = ["axum", "google", "openai"]

[[test]]
name = "openai_tests"
path = "tests/provider/openai_tests.rs"
required-features = ["openai", "test-access"]

[[test]]
name = "openai_compatible_tests"
path = "tests/provider/openai_compatible_tests.rs"
required-features = ["openaicompatible", "test-access"]

[[test]]
name = "anthropic_tests"
path = "tests/provider/anthropic_tests.rs"
required-features = ["anthropic", "test-access"]

[[test]]
name = "groq_tests"
path = "tests/provider/groq_tests.rs"
required-features = ["groq", "test-access"]

[[test]]
name = "google_tests"
path = "tests/provider/google_tests.rs"
required-features = ["google", "test-access"]

[[test]]
name = "vercel_tests"
path = "tests/provider/vercel_tests.rs"
required-features = ["vercel", "test-access"]

[[test]]
name = "openrouter_tests"
path = "tests/provider/openrouter_tests.rs"
required-features = ["openrouter", "test-access"]

[[test]]
name = "deepseek_tests"
path = "tests/provider/deepseek_tests.rs"
required-features = ["deepseek", "test-access"]

[[test]]
name = "mistral_tests"
path = "tests/provider/mistral_tests.rs"
required-features = ["mistral", "test-access"]

[[test]]
name = "amazon_bedrock_tests"
path = "tests/provider/amazon_bedrock_tests.rs"
required-features = ["amazon-bedrock", "test-access"]

[[test]]
name = "togetherai_tests"
path = "tests/provider/togetherai_tests.rs"
required-features = ["togetherai", "test-access"]

[[test]]
name = "xai_tests"
path = "tests/provider/xai_tests.rs"
required-features = ["xai", "test-access"]