[package]
edition = "2021"
rust-version = "1.90"
name = "llmr"
version = "0.2.0"
build = false
exclude = [
"/.github",
"/docs",
"/ROADMAP.md",
"/rust-toolchain.toml",
"/deny.toml",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Reach language models across providers, with capabilities you can read before you ask and usage you can trust."
documentation = "https://docs.rs/llmr"
readme = "README.md"
keywords = [
"llm",
"anthropic",
"openai",
"ai",
"provider",
]
categories = [
"api-bindings",
"asynchronous",
]
license = "MIT"
repository = "https://github.com/bircex/llmr"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
"--cfg",
"docsrs",
]
[features]
anthropic = ["dep:base64"]
bedrock = ["anthropic"]
cli = [
"dep:tokio",
"tokio/process",
"tokio/io-util",
"tokio/time",
]
default = [
"anthropic",
"openai",
]
embeddings = []
gemini = ["dep:base64"]
openai = ["dep:base64"]
reqwest = ["dep:reqwest"]
retry = [
"dep:tokio",
"tokio/time",
]
testkit = []
tracing = ["dep:tracing"]
[lib]
name = "llmr"
path = "src/lib.rs"
[[example]]
name = "anything_openai_shaped"
path = "examples/anything_openai_shaped.rs"
required-features = [
"openai",
"reqwest",
]
[[example]]
name = "ask"
path = "examples/ask.rs"
required-features = [
"anthropic",
"reqwest",
]
[[example]]
name = "is_it_reachable"
path = "examples/is_it_reachable.rs"
required-features = [
"openai",
"reqwest",
]
[[example]]
name = "nearest"
path = "examples/nearest.rs"
required-features = [
"openai",
"embeddings",
"reqwest",
]
[[example]]
name = "routing"
path = "examples/routing.rs"
required-features = [
"openai",
"reqwest",
]
[[example]]
name = "what_it_cost"
path = "examples/what_it_cost.rs"
required-features = [
"anthropic",
"reqwest",
]
[[test]]
name = "against_a_real_endpoint"
path = "tests/against_a_real_endpoint.rs"
[[test]]
name = "an_embedder_honours_the_contract"
path = "tests/an_embedder_honours_the_contract.rs"
[[test]]
name = "concurrency"
path = "tests/concurrency.rs"
[[test]]
name = "every_provider_honours_the_contract"
path = "tests/every_provider_honours_the_contract.rs"
[[test]]
name = "how_a_request_finds_a_provider"
path = "tests/how_a_request_finds_a_provider.rs"
[[test]]
name = "the_shipped_tables"
path = "tests/the_shipped_tables.rs"
[[test]]
name = "trying_again"
path = "tests/trying_again.rs"
[[test]]
name = "what_a_command_line_tool_prints"
path = "tests/what_a_command_line_tool_prints.rs"
[[test]]
name = "what_a_span_says"
path = "tests/what_a_span_says.rs"
[[test]]
name = "what_a_stream_carries"
path = "tests/what_a_stream_carries.rs"
[[test]]
name = "what_bedrock_puts_on_the_wire"
path = "tests/what_bedrock_puts_on_the_wire.rs"
[[test]]
name = "what_gemini_puts_on_the_wire"
path = "tests/what_gemini_puts_on_the_wire.rs"
[[test]]
name = "what_goes_on_the_wire"
path = "tests/what_goes_on_the_wire.rs"
[dependencies.async-trait]
version = "0.1"
[dependencies.base64]
version = "0.22"
features = ["alloc"]
optional = true
default-features = false
[dependencies.futures-core]
version = "0.3"
[dependencies.reqwest]
version = "0.12"
features = [
"json",
"rustls-tls",
"stream",
]
optional = true
default-features = false
[dependencies.serde]
version = "1"
features = ["derive"]
[dependencies.serde_json]
version = "1"
[dependencies.thiserror]
version = "2"
[dependencies.tokio]
version = "1"
optional = true
default-features = false
[dependencies.toml]
version = "1.1"
[dependencies.tracing]
version = "0.1"
features = ["std"]
optional = true
default-features = false
[dev-dependencies.async-trait]
version = "0.1"
[dev-dependencies.tokio]
version = "1"
features = [
"rt-multi-thread",
"macros",
"time",
"process",
"io-util",
]
[lints.clippy]
await_holding_lock = "deny"
await_holding_refcell_ref = "deny"
[lints.rust]
unsafe_code = "forbid"