[workspace]
members = [".", "llmkit-python", "llmkit-node"]
resolver = "2"
[workspace.lints.rust]
unsafe_code = "warn"
missing_docs = "warn"
[workspace.lints.clippy]
dbg_macro = "deny"
todo = "deny"
unimplemented = "deny"
print_stdout = "warn"
print_stderr = "warn"
cloned_instead_of_copied = "warn"
doc_markdown = "warn"
explicit_iter_loop = "warn"
flat_map_option = "warn"
fn_params_excessive_bools = "warn"
inefficient_to_string = "warn"
manual_let_else = "warn"
map_unwrap_or = "warn"
needless_pass_by_value = "warn"
redundant_closure_for_method_calls = "warn"
semicolon_if_nothing_returned = "warn"
unnecessary_wraps = "warn"
unused_async = "warn"
cargo_common_metadata = "warn"
[package]
name = "llmkit"
description = "Production-grade LLM client - 100+ providers, 11,000+ models. Pure Rust."
version = "0.1.3"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/yfedoseev/llmkit"
keywords = ["llm", "ai", "openai", "anthropic", "claude"]
categories = ["api-bindings", "asynchronous"]
[dependencies]
tokio = { version = "1", features = ["full"] }
async-trait = "0.1"
futures = "0.3"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
reqwest = { version = "0.13", features = ["json", "stream", "multipart", "query", "form"] }
thiserror = "2"
tracing = "0.1"
uuid = { version = "1", features = ["v4", "serde"] }
bytes = "1"
pin-project-lite = "0.2"
parking_lot = "0.12"
tokio-stream = "0.1"
async-stream = "0.3"
eventsource-stream = "0.2"
tokio-tungstenite = "0.28"
aws-config = { version = "1", optional = true }
aws-sdk-bedrockruntime = { version = "1", optional = true }
aws-smithy-types = { version = "1", optional = true }
gcp_auth = { version = "0.12", optional = true }
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12"], optional = true }
base64 = "0.22"
url = "2"
regex = "1"
dashmap = "6"
sha2 = "0.10"
hex = "0.4"
[features]
default = ["anthropic", "openai"]
anthropic = []
openai = []
openrouter = []
ollama = []
groq = []
mistral = []
azure = []
bedrock = ["dep:aws-config", "dep:aws-sdk-bedrockruntime", "dep:aws-smithy-types"]
openai-compatible = []
google = []
vertex = ["dep:gcp_auth", "dep:rustls"]
cohere = []
ai21 = []
huggingface = []
replicate = []
baseten = []
runpod = []
cloudflare = []
watsonx = []
databricks = []
datarobot = []
sagemaker = []
snowflake = []
azure-ai = []
cerebras = []
sambanova = []
stability = []
fireworks = []
deepseek = []
aleph-alpha = []
nlp-cloud = []
voyage = []
jina = []
fal = []
deepgram = []
elevenlabs = []
yandex = []
gigachat = []
clova = []
maritaca = []
writer = []
openai-realtime = []
runwayml = []
recraft = []
naver = []
kakao = []
lg-exaone = []
plamo = []
sarvam = []
krutrim = []
ntt = []
softbank = []
tilde = []
silo-ai = []
swiss-ai = []
pika = []
luma = []
kling = []
heygen = []
did = []
twelve-labs = []
rev = []
speechmatics = []
playht = []
resemble = []
leonardo = []
ideogram = []
black-forest-labs = []
modal = []
tensordock = []
vastai = []
runware = []
ai71 = []
clarifai = ["openai-compatible"]
vercel-ai = ["openai-compatible"]
poe = ["openai-compatible"]
gradient = ["openai-compatible"]
reka = ["openai-compatible"]
lambda-labs = ["openai-compatible"]
nvidia-nim = ["openai-compatible"]
xinference = ["openai-compatible"]
public-ai = ["openai-compatible"]
bytez = ["openai-compatible"]
chutes = ["openai-compatible"]
comet-api = ["openai-compatible"]
compactifai = ["openai-compatible"]
synthetic = ["openai-compatible"]
morph = ["openai-compatible"]
heroku-ai = ["openai-compatible"]
v0 = ["openai-compatible"]
together = []
anyscale = []
deepinfra = []
xai = []
nvidia = []
github = []
novita = []
hyperbolic = []
lambda = []
friendli = []
octoai = []
predibase = []
nebius = []
siliconflow = []
moonshot = []
zhipu = []
yi = []
minimax = []
dashscope = []
featherless = []
nscale = []
volcengine = []
ovhcloud = []
galadriel = []
lm-studio = []
tgi = []
llamafile = []
fastchat = []
aphrodite = []
tabby = []
koboldcpp = []
text-gen-webui = []
localai = []
jan = []
openllm = []
nitro = []
mlc = []
infinity = []
petals = []
triton = []
baichuan = []
qwen = []
stepfun = []
ai360 = []
spark = []
ernie = []
hunyuan = []
upstage = []
meta-llama = []
pangu = []
sensenova = []
sea-lion = []
tiangong = []
openai-proxy = []
portkey = []
helicone = []
keywords-ai = []
unify = []
aimlapi = []
prem = []
martian = []
centml = []
crusoe = []
coreweave = []
lightning = []
cerebrium = []
banana = []
beam = []
mystic = []
kluster = []
lighton = []
ionos = []
scaleway = []
mistral-embeddings = []
lepton = []
gpt4all = []
vllm = []
perplexity = []
baidu = []
alibaba = []
assemblyai = []
oracle = []
sap = []
streaming-multiplexer = []
smart-router = []
rate-limiter = []
observability = []
circuit-breaker = []
all-providers = [
"anthropic",
"openai",
"openrouter",
"ollama",
"groq",
"mistral",
"azure",
"bedrock",
"openai-compatible",
"google",
"vertex",
"cohere",
"ai21",
"huggingface",
"replicate",
"baseten",
"runpod",
"cloudflare",
"watsonx",
"databricks",
"datarobot",
"sagemaker",
"snowflake",
"cerebras",
"sambanova",
"stability",
"fireworks",
"deepseek",
"aleph-alpha",
"nlp-cloud",
"voyage",
"jina",
"fal",
"deepgram",
"elevenlabs",
"yandex",
"gigachat",
"clova",
"maritaca",
"writer",
"openai-realtime",
"clarifai",
"vercel-ai",
"poe",
"gradient",
"reka",
"lambda-labs",
"nvidia-nim",
"xinference",
"public-ai",
"bytez",
"chutes",
"comet-api",
"compactifai",
"synthetic",
"morph",
"heroku-ai",
"v0",
"together",
"anyscale",
"deepinfra",
"xai",
"nvidia",
"github",
"novita",
"hyperbolic",
"lambda",
"friendli",
"octoai",
"predibase",
"nebius",
"siliconflow",
"moonshot",
"zhipu",
"yi",
"minimax",
"dashscope",
"featherless",
"nscale",
"volcengine",
"ovhcloud",
"galadriel",
"lm-studio",
"tgi",
"llamafile",
"xinference",
"fastchat",
"aphrodite",
"tabby",
"koboldcpp",
"text-gen-webui",
"localai",
"jan",
"openllm",
"nitro",
"mlc",
"infinity",
"petals",
"triton",
"baichuan",
"qwen",
"stepfun",
"ai360",
"spark",
"ernie",
"hunyuan",
"reka",
"upstage",
"meta-llama",
"pangu",
"sensenova",
"sea-lion",
"tiangong",
"openai-proxy",
"portkey",
"helicone",
"keywords-ai",
"unify",
"aimlapi",
"prem",
"martian",
"centml",
"crusoe",
"coreweave",
"lightning",
"cerebrium",
"banana",
"beam",
"mystic",
"bytez",
"morph",
"kluster",
"lighton",
"ionos",
"scaleway",
"mistral-embeddings",
"lepton",
"gpt4all",
"alibaba",
"baidu",
"assemblyai",
"runware",
"oracle",
"sap",
"runwayml",
"recraft",
"streaming-multiplexer",
"smart-router",
"rate-limiter",
"observability",
"circuit-breaker",
]
[dev-dependencies]
tokio-test = "0.4"
wiremock = "0.6"
[[example]]
name = "01_simple_completion"
required-features = ["anthropic"]
[[example]]
name = "02_streaming"
required-features = ["openai"]
[[example]]
name = "03_tool_calling"
required-features = ["anthropic"]
[[example]]
name = "04_vision"
required-features = ["anthropic"]
[[example]]
name = "05_structured_output"
required-features = ["openai"]
[[example]]
name = "06_extended_thinking"
required-features = ["openrouter"]
[[example]]
name = "07_multiple_providers"
required-features = ["anthropic", "openai"]
[[example]]
name = "08_error_handling"
required-features = ["openrouter"]
[[example]]
name = "09_async_usage"
required-features = ["openrouter"]
[[example]]
name = "10_batch_processing"
required-features = ["openrouter"]
[[example]]
name = "11_embeddings"
required-features = ["openai"]
[[example]]
name = "12_audio_synthesis"
required-features = ["openai"]
[[example]]
name = "13_audio_transcription"
required-features = ["openai"]
[[example]]
name = "14_image_generation"
required-features = ["openai"]
[[example]]
name = "15_specialized_api"
required-features = ["cohere", "openai"]
[[example]]
name = "16_video_generation"
required-features = ["runwayml"]
[[example]]
name = "17_response_caching"
required-features = ["openrouter"]
[[example]]
name = "18_retry_resilience"
required-features = ["openrouter"]
[[example]]
name = "19_openai_compatible"
required-features = ["openai-compatible"]