1.0.0: narrow first-class LLM support to LiteLLM, OpenAI, Anthropic (drop HuggingFace callables)
Target: 1.0.0. First-class LLM support narrows to LiteLLM, OpenAI, and Anthropic. HuggingFace model/pipeline callables lose built-in support.
Together with #1593 (structured decoding) this finally drops transformers, torch, and the whole huggingface extra.
What goes
From guardrails/llm_providers.py (913 lines today):
HuggingFaceModelCallable(:259) andHuggingFacePipelineCallable(:364)- Their dispatch branches in
get_llm_ask(:579,:587) andget_async_llm_ask(:879) - The type-sniffing imports those branches need:
transformers/torchat:270,:277,:375,:382, andPreTrainedModel/TFPreTrainedModel/FlaxPreTrainedModel/Pipelineat:550,:560,:566,:585. These run at dispatch time purely toisinstance-check user input — removing them is a startup and dependency win, not just a line-count one. pyproject.toml: thehuggingfaceextra (transformers,torch,guardrails-jsonformer) disappears entirely once #1593 also lands.
Proposed addition — kill ManifestCallable too (:88, plus AsyncManifestCallable at :746). manifest-ml is a research library that is effectively dead, and it does not survive a "LiteLLM, OpenAI, Anthropic only" rule. Flagging explicitly since it wasn't named in the decision.
HF users are not cut off
ArbitraryCallable (:434) / AsyncArbitraryCallable (:814) remain, so anyone can still wrap an HF pipeline in a function and pass it. The change is that we stop detecting and special-casing it. Worth saying plainly in the release notes — "dropped" will otherwise read as "impossible."
Open question this surfaces: what does "first-class OpenAI and Anthropic" actually mean?
There is no OpenAI callable and no Anthropic callable today. Both already route through LiteLLMCallable (:145) / AsyncLiteLLMCallable (:633). So the decision is ambiguous between:
Option A — LiteLLM is the only path. OpenAI and Anthropic are "first-class" in the sense of being tested and documented. Zero new dependencies, no new code. But we inherit LiteLLM's feature lag, which sits badly with core tenant 5 ("around feature parity with OpenAI and Anthropic's APIs") — parity is hard to hit through a translation layer that trails both providers.
Option B — native SDK paths for OpenAI and Anthropic, LiteLLM as the everything-else fallback. openai is already a core dependency; this would add anthropic. Gives exact parity and direct access to provider-specific surface (prompt caching, thinking blocks, current tool-use shapes) as it ships. More code to own.
Recommendation: Option B. Tenant 5 names those two providers specifically, and that promise is not really deliverable through LiteLLM alone. LiteLLM stays regardless — it's the fallback for everything else, and guardrails-api already calls litellm.acompletion directly on the OpenAI-compatible endpoint.
Note this interacts with open question 2 in #1591: if the LLM moves out of Guard entirely, "first-class provider support" may reduce to which request/response shapes we can parse, rather than which clients we call. Worth settling the two together.
Source: guardrails-ai/guardrails