Skip to content

Providers and frameworks

CallNative objectDefault gateway rootExtra
shield.openai()openai.OpenAI/openaiopenai
shield.anthropic()anthropic.Anthropic/anthropicanthropic
shield.bedrock()boto3 bedrock-runtime client/bedrockbedrock
shield.genai()google.genai.Client/genaigenai
shield.genai_cached()GenaiCachedClient proxy/genaigenai
shield.langchain()langchain_openai.ChatOpenAI/langchainlangchain
shield.litellm()LiteLLMShield/litellmlitellm
shield.pydanticai()pydantic_ai.Agent/pydanticai/v1pydanticai

Optional dependencies are imported lazily. A missing extra raises ImportError when its builder is called, not when deepintshield is imported. That native exception carries a stable provider/framework dependency code; use the error catalog rather than parsing its install message.

Every builder accepts provider-specific keyword arguments. SDK-owned defaults are applied with kwargs.pop, so explicit base_url, key, client, or headers usually override the generated value. An override can bypass gateway routing or SDK request hooks; review it as a security-sensitive configuration change.

The default OpenAI and Anthropic shortcuts attach an httpx request hook:

  • OpenAI receives a stable prompt_cache_key derived from the reusable prefix.
  • Anthropic receives ephemeral cache-control markers on supported static prompt sections.

Passing your own http_client disables that SDK injection. The gateway’s workspace setting remains authoritative and can strip caching markers.

genai_cached() is opt-in because Gemini context-cache storage is metered. It hashes the model/system/tools prefix, reuses a live cached-content resource, and creates a missing resource in the background for a later call. Defaults are a 32,768-token minimum prefix and an environment/configured TTL. Verify economics with your provider pricing, hit rate, prefix size, and request interval; caching is not inherently cheaper for every workload.

openai = shield.openai(passthrough=True)
anthropic = shield.anthropic(passthrough=True)
genai = shield.genai(passthrough=True)

Passthrough keeps the provider-native wire shape while traversing the corresponding gateway passthrough route. It is not a bypass around virtual-key authentication or every gateway policy. Verify feature behavior on the chosen route; protocol-specific features can differ from the unified route.

bind() returns native framework objects pointed at the OpenAI-compatible gateway transport:

chat_model = shield.bind("langgraph").model("gpt-4o-mini")
embedder = shield.bind("langgraph").embedder("text-embedding-3-small")
crew_llm = shield.bind("crewai").llm("gpt-4o-mini")
agents_client = shield.bind("openai_agents").apply()
llama_llm = shield.bind("llamaindex").llm("gpt-4o-mini")
autogen_client = shield.bind("autogen").model_client("gpt-4o-mini")
pydantic_model = shield.bind("pydanticai").model("gpt-4o-mini")
Canonical binderAliasesBuilders
langgraphlangchainmodel, embedder
crewaillm, model
openai_agentsopenai-agentsclient, apply
llamaindexllama-index, llama_indexllm, embedder
autogenag2model_client, client
pydanticaipydantic-ai, pydantic_aimodel, agent

Unknown binders raise ValueError; a nonexistent builder attribute raises AttributeError and lists that module’s callable binders.

Convenience binder accessors exist for shield.crewai(), shield.openai_agents(), shield.llamaindex(), and shield.autogen().

Transparent routing versus Agentic enforcement

Section titled “Transparent routing versus Agentic enforcement”

A binder changes where model/embedding traffic is sent and adds gateway attribution headers. Agentic framework enforcement is a separate layer installed by the live DeepintShield client. You can use either layer independently, but most governed agents need both:

native model / embedder -> DeepIntShield gateway -> provider
native tool boundary -> Agentic decision -> local or MCP tool

Use identity=True on a binder only when the gateway route should also receive an agent token. This can trigger identity discovery and token acquisition.

The tables above describe builders present in SDK 2.5.1; they do not guarantee every version or feature of each third-party package. Pin and test the provider and framework versions used in production. Cover basic calls, streaming, structured output, tool calls, embeddings, errors, timeouts, and shutdown. Automatic Agentic integration fails closed when an imported framework version cannot be instrumented, rather than silently claiming protection.

See the provider-specific integration guides and Agentic governance.