tinyagents 2.1.1

A durable agent + graph harness for Rust.
Documentation
# TinyAgents BYOK provider matrix — template.
#
#   cp providers.env.example providers.env
#   # fill in the keys you have, then:
#   cargo test --test live_provider_matrix -- --nocapture
#
# `providers.env` is gitignored. NEVER commit real keys.
#
# Every provider below speaks the OpenAI Chat Completions wire format, so one
# adapter reaches all of them — only the base URL and model differ. Each entry
# is up to four variables keyed by an uppercase slug:
#
#   PROVIDER_<SLUG>_PRESET     a built-in preset name (sets base URL + default
#                              model): openai, anthropic, deepseek, groq, xai,
#                              openrouter, together, mistral, ollama
#   PROVIDER_<SLUG>_BASE_URL   any OpenAI-compatible base URL — use instead of
#                              _PRESET for providers without one
#   PROVIDER_<SLUG>_API_KEY    blank => the provider is SKIPped, never dialled
#   PROVIDER_<SLUG>_MODEL      optional with a preset (its default is used),
#                              REQUIRED with a bare _BASE_URL
#
# The matrix discovers providers from this file, so adding one is three lines
# here — no Rust changes. If PROVIDER_<SLUG>_API_KEY is blank the preset's own
# key variable (OPENAI_API_KEY, GROQ_API_KEY, …) is used as a fallback.
#
# The models below are suggestions — set whatever your account can reach.

# ---------------------------------------------------------------------------
# Built-in presets
# ---------------------------------------------------------------------------

PROVIDER_OPENAI_PRESET=openai
PROVIDER_OPENAI_API_KEY=
PROVIDER_OPENAI_MODEL=gpt-4.1-mini

# Anthropic's OpenAI-compatible Chat Completions endpoint.
PROVIDER_ANTHROPIC_PRESET=anthropic
PROVIDER_ANTHROPIC_API_KEY=
PROVIDER_ANTHROPIC_MODEL=claude-3-5-sonnet-latest

PROVIDER_DEEPSEEK_PRESET=deepseek
PROVIDER_DEEPSEEK_API_KEY=
PROVIDER_DEEPSEEK_MODEL=deepseek-chat

PROVIDER_GROQ_PRESET=groq
PROVIDER_GROQ_API_KEY=
PROVIDER_GROQ_MODEL=llama-3.3-70b-versatile

PROVIDER_XAI_PRESET=xai
PROVIDER_XAI_API_KEY=
PROVIDER_XAI_MODEL=grok-2-latest

PROVIDER_OPENROUTER_PRESET=openrouter
PROVIDER_OPENROUTER_API_KEY=
PROVIDER_OPENROUTER_MODEL=openai/gpt-4o-mini

PROVIDER_TOGETHER_PRESET=together
PROVIDER_TOGETHER_API_KEY=
PROVIDER_TOGETHER_MODEL=meta-llama/Llama-3.3-70B-Instruct-Turbo

PROVIDER_MISTRAL_PRESET=mistral
PROVIDER_MISTRAL_API_KEY=
PROVIDER_MISTRAL_MODEL=mistral-small-latest

# Local Ollama needs no credential and is dialled with a blank _API_KEY, unlike
# every hosted row — there is no key to withhold, so requiring a placeholder
# would only ever exclude a working local server. Comment the row out (or stop
# the server) to leave it out of a run.
PROVIDER_OLLAMA_PRESET=ollama
PROVIDER_OLLAMA_API_KEY=
# Must match the pulled tag exactly — Ollama 404s on an untagged name it has
# not pulled. Check with `ollama list`.
PROVIDER_OLLAMA_MODEL=llama3.2:3b

# ---------------------------------------------------------------------------
# OpenAI-compatible endpoints reached by base URL
# ---------------------------------------------------------------------------

PROVIDER_CEREBRAS_BASE_URL=https://api.cerebras.ai/v1
PROVIDER_CEREBRAS_API_KEY=
# Cerebras rotates its catalogue aggressively and 404s with "Model does not
# exist or you do not have access to it." for anything retired — the llama-3.x
# ids that used to work are gone. List what your account actually serves with
# `curl -H "Authorization: Bearer $KEY" https://api.cerebras.ai/v1/models`.
PROVIDER_CEREBRAS_MODEL=gpt-oss-120b

PROVIDER_FIREWORKS_BASE_URL=https://api.fireworks.ai/inference/v1
PROVIDER_FIREWORKS_API_KEY=
PROVIDER_FIREWORKS_MODEL=accounts/fireworks/models/llama-v3p3-70b-instruct

# Google Gemini via its OpenAI-compatibility layer.
PROVIDER_GEMINI_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai
PROVIDER_GEMINI_API_KEY=
PROVIDER_GEMINI_MODEL=gemini-2.0-flash

PROVIDER_DEEPINFRA_BASE_URL=https://api.deepinfra.com/v1/openai
PROVIDER_DEEPINFRA_API_KEY=
PROVIDER_DEEPINFRA_MODEL=meta-llama/Llama-3.3-70B-Instruct

PROVIDER_NOVITA_BASE_URL=https://api.novita.ai/v3/openai
PROVIDER_NOVITA_API_KEY=
PROVIDER_NOVITA_MODEL=meta-llama/llama-3.3-70b-instruct

PROVIDER_GMI_BASE_URL=https://api.gmi-serving.com/v1
PROVIDER_GMI_API_KEY=
PROVIDER_GMI_MODEL=deepseek-ai/DeepSeek-V3

PROVIDER_NVIDIA_BASE_URL=https://integrate.api.nvidia.com/v1
PROVIDER_NVIDIA_API_KEY=
PROVIDER_NVIDIA_MODEL=meta/llama-3.3-70b-instruct

PROVIDER_PERPLEXITY_BASE_URL=https://api.perplexity.ai
PROVIDER_PERPLEXITY_API_KEY=
PROVIDER_PERPLEXITY_MODEL=sonar

PROVIDER_SAMBANOVA_BASE_URL=https://api.sambanova.ai/v1
PROVIDER_SAMBANOVA_API_KEY=
PROVIDER_SAMBANOVA_MODEL=Meta-Llama-3.3-70B-Instruct

PROVIDER_HYPERBOLIC_BASE_URL=https://api.hyperbolic.xyz/v1
PROVIDER_HYPERBOLIC_API_KEY=
PROVIDER_HYPERBOLIC_MODEL=meta-llama/Llama-3.3-70B-Instruct

PROVIDER_LAMBDA_BASE_URL=https://api.lambda.ai/v1
PROVIDER_LAMBDA_API_KEY=
PROVIDER_LAMBDA_MODEL=llama3.3-70b-instruct-fp8

PROVIDER_MOONSHOT_BASE_URL=https://api.moonshot.ai/v1
PROVIDER_MOONSHOT_API_KEY=
PROVIDER_MOONSHOT_MODEL=kimi-k2-0711-preview

PROVIDER_ZHIPU_BASE_URL=https://open.bigmodel.cn/api/paas/v4
PROVIDER_ZHIPU_API_KEY=
PROVIDER_ZHIPU_MODEL=glm-4-flash

# ---------------------------------------------------------------------------
# Self-hosted / local servers (OpenAI-compatible)
# ---------------------------------------------------------------------------
#
# For a deeper local-runtime check than this matrix — a full tool round trip,
# structured output, and real embeddings + retrieval — see
# `tests/live_local_models.rs` and `tests/live_local_embeddings.rs`
# (`LOCAL_MODEL_TESTS=1 cargo test --test live_local_models`). Those discover
# the served model from the server itself and need no configuration here.

# LM Studio has a built-in preset, so it needs no _BASE_URL unless the server
# is remote or on a non-default port. The preset sets the local-runtime
# behaviour the plain _BASE_URL form does not: no Authorization header, and the
# request-shape degradations llama.cpp-backed servers require.
PROVIDER_LMSTUDIO_PRESET=lmstudio
PROVIDER_LMSTUDIO_API_KEY=
# REQUIRED — unlike every other preset, LM Studio has no default model: the id
# is whatever GGUF you loaded. List them with `lms ps`, or
# `curl localhost:1234/v1/models`.
PROVIDER_LMSTUDIO_MODEL=qwen/qwen3-4b

PROVIDER_VLLM_BASE_URL=http://localhost:8000/v1
PROVIDER_VLLM_API_KEY=
PROVIDER_VLLM_MODEL=meta-llama/Llama-3.1-8B-Instruct