Choose and configure a provider
Keep provider construction explicit while the rest of the application uses portable SDK contracts.
Install the SDK once, then add only the provider adapters your application uses. Provider factories create model instances; generation, tools, agents, and workflows consume the shared model contract.
Published TypeScript provider packages
Verified against npm on 2026-10-24. These adapter versions are independent of the SDK package.
| Package | Published version |
|---|---|
@zhivex-ai/anthropic |
0.15.0 |
@zhivex-ai/azure-openai |
0.8.0 |
@zhivex-ai/bedrock |
2.1.0 |
@zhivex-ai/deepseek |
0.6.0 |
@zhivex-ai/gemini |
0.14.0 |
@zhivex-ai/kimi |
0.8.0 |
@zhivex-ai/meta |
0.3.0 |
@zhivex-ai/ollama |
0.6.0 |
@zhivex-ai/openai |
0.17.0 |
@zhivex-ai/openrouter |
0.7.0 |
@zhivex-ai/qwen |
0.18.0 |
@zhivex-ai/vertex |
1.3.0 |
@zhivex-ai/xai |
0.4.0 |
@zhivex-ai/zai |
0.3.0 |
See the complete provider release history for changes and migration guidance. Publication does not establish live certification for every provider/model.
TypeScript adapters
bun add @zhivex-ai/sdk @zhivex-ai/openai
bun add @zhivex-ai/anthropic
bun add @zhivex-ai/gemini
bun add @zhivex-ai/openrouter
bun add @zhivex-ai/ollama
import { createOpenAI } from "@zhivex-ai/openai";
import { createAnthropic } from "@zhivex-ai/anthropic";
import { createGemini } from "@zhivex-ai/gemini";
const openai = createOpenAI({ apiKey: process.env.OPENAI_API_KEY });
const anthropic = createAnthropic({ apiKey: process.env.ANTHROPIC_API_KEY });
const gemini = createGemini({ apiKey: process.env.GEMINI_API_KEY });
const model = openai("gpt-6-astra");
The TypeScript packages also include Azure OpenAI, xAI, Meta, Vertex, Qwen, Kimi, DeepSeek, Z.AI, OpenRouter, Bedrock, Ollama, and a policy-based Gateway.
Provider release versions
The 14 TypeScript adapters are versioned independently. See the provider release history for every published update since this portal’s previous baseline, current npm versions, dependency-only patches and provider-specific upgrade guidance.
Python factories
The Python package exposes providers from the public zhivex_ai namespace:
from zhivex_ai import create_anthropic, create_gemini, create_meta, create_openai
openai = create_openai()
anthropic = create_anthropic()
gemini = create_gemini()
meta = create_meta()
Hosted-provider credentials are read from server environment variables unless explicitly passed to the factory.
TypeScript 1.13 expands createAnthropic() beyond ANTHROPIC_API_KEY: it can use a Bearer token, select a workspace for personal or service-account keys, rotate credentials through an application callback, resolve a named profile, or obtain cached credentials through Workload Identity Federation. Keep the selected mode and workspace server-side, and verify refresh plus retry behavior with the exact deployment identity.
Adapter availability
This is an adapter map, not a promise that every model supports every feature:
| Provider | TypeScript | Python |
|---|---|---|
| OpenAI | @zhivex-ai/openai |
create_openai() |
| Azure OpenAI | @zhivex-ai/azure-openai |
create_azure_openai() |
| Anthropic | @zhivex-ai/anthropic |
create_anthropic() |
| Gemini | @zhivex-ai/gemini |
create_gemini() |
| Vertex AI | @zhivex-ai/vertex |
create_vertex() |
| Qwen | @zhivex-ai/qwen |
create_qwen() |
| Kimi / Moonshot | @zhivex-ai/kimi |
create_kimi() |
| DeepSeek | @zhivex-ai/deepseek |
create_deepseek() |
| vLLM | — | create_vllm() |
| xAI | @zhivex-ai/xai |
— |
| Meta | @zhivex-ai/meta |
create_meta() — stable portable Standard scope; native extras beta |
| Z.AI | @zhivex-ai/zai |
— |
| Bedrock | @zhivex-ai/bedrock |
create_bedrock() — experimental |
| Ollama | @zhivex-ai/ollama |
create_ollama() — experimental |
| OpenRouter | @zhivex-ai/openrouter |
create_openrouter() — experimental |
An em dash means that the SDK does not document a corresponding public adapter. Do not substitute an undocumented deep import.
Compare capability surfaces
| Surface | TypeScript shared contract | Python shared contract |
|---|---|---|
| Text and streaming | Stable | Stable |
| Structured output | Stable; enforcement depends on provider/model | Stable; enforcement depends on provider/model |
| Portable local tools | Stable | Stable |
| Embeddings | Stable | Stable |
| Audio and generative media | Stable high-level APIs; provider/model dependent | Native media clients are beta; provider/model dependent |
| Hosted tools and remote MCP | Mixed stable/experimental provider surfaces | Beta provider-data and hosted-tool surfaces |
| Realtime/live agents | Stable shared lifecycle; provider/model dependent | Stable normalized lifecycle since 0.26; native APIs vary |
Use the selected model’s runtime capabilities for a real decision. A provider name alone is too coarse: API mode, model family, region, deployment, and account access can all change the available surface. The Stable TypeScript realtime contract covers OpenAI, Azure OpenAI, Gemini, Vertex, and Qwen adapters, but it does not make any provider preview model permanently available.
TypeScript can render a matrix from the actual configured models:
import {
createProviderSupportMatrix,
renderProviderSupportMatrix
} from "@zhivex-ai/sdk";
const matrix = createProviderSupportMatrix([
openai("gpt-6-astra"),
anthropic("claude-sonnet-4-5")
]);
console.log(renderProviderSupportMatrix(matrix));
Python exposes the selected model’s agent capability metadata:
from zhivex_ai import get_agent_capabilities, get_agent_support_tier
model = create_openai()(model_id)
capabilities = get_agent_capabilities(model)
print(get_agent_support_tier(model))
print(capabilities.remote_mcp, capabilities.hosted_web_search)
The TypeScript matrix helpers are stable. TypeScript 1.7 introduced Beta discriminated capability profiles for provider authors who must distinguish native, prompted, model-dependent, and unsupported behavior while deriving the existing boolean capability shape. TypeScript 1.12 adds Beta provider-conformance reports that keep implemented, offline, installed-package, authenticated-live, skipped, failed, and stale evidence separate. Python 0.19 similarly distinguishes contract-supported from release-certified; Tier-1 membership is not live evidence.
Pin model-catalog decisions
createModelCatalog() and defaultModelCatalog are Stable contracts for provider-scoped identity, aliases, recommendations, and optional versioned pricing metadata. TypeScript 1.7 moves ownership of the release-managed default inventory to the SDK:
import { defaultModelCatalog } from "@zhivex-ai/sdk/catalog";
const model = defaultModelCatalog.find("openai", "gpt-5.6-luna");
Import the default from @zhivex-ai/sdk or @zhivex-ai/sdk/catalog when you want future inventory updates. The deprecated @zhivex-ai/core copy is a frozen compatibility snapshot until the next major; createModelCatalog() remains available for application-owned data. A catalog snapshot is routing metadata, not authenticated capability or billing evidence.
Custom catalogs default to pinned data. Record the SDK version, catalog snapshot and pricing version with a run when reproducibility matters. Treat the built-in catalog as rolling only at package-release boundaries, and verify provider availability, entitlement, region, preview status, and current pricing before live routing or charging users.
The historical TypeScript 1.13 and Python 0.22 snapshots included Gemini/Vertex 3.7 Flash, Gemini Omni 1.1 Flash and Transcribe, Qwen 3.8 Flash, the Claude lifecycle metadata available at that release, and explicit deprecated or retired records. TypeScript also models Grok 4.6 and DeepSeek V4 Flash Vision Exp. Versions, previews, and separately billed model ids remain distinct catalog entries rather than aliases.
Resolve trusted model identifiers
TypeScript 1.9 adds the Beta createModelResolver() for trusted application configuration that benefits from provider/model identifiers or local aliases:
import { defaultModelCatalog, generateText } from "@zhivex-ai/sdk";
import { createModelResolver } from "@zhivex-ai/sdk/beta";
const resolver = createModelResolver({
catalog: defaultModelCatalog,
adapters: { openai, anthropic },
aliases: [
{ alias: "support-default", target: "openai/gpt-6-astra" }
]
});
const result = await generateText({
model: resolver.model("support-default"),
prompt: "Summarize the incident."
});
The resolver rejects unknown providers and models against the supplied catalog before adapter invocation. It does not discover providers, credentials, endpoints, or routing policy, and direct provider factories remain the canonical reversible path.
Portable first, native when needed
Use the portable surface for messages, generation, streaming, structured output, tools, and normalized usage. Reach for a provider-native namespace or providerOptions only when the feature has no portable equivalent.
Keep that native code behind your own adapter so the rest of the product remains movable.
Capability checks matter
A published provider package does not imply identical support for every model or feature. Before shipping:
- choose a model that advertises the required capability;
- check the current provider matrix and stability level;
- handle unsupported features explicitly;
- run an authenticated smoke for the exact provider, model, operation, and release candidate you will deploy.
Offline tests establish contract behavior; they do not prove that credentials, quota, regional availability, or an upstream preview is working in production.
Keep four different statements separate:
- the adapter accepts a model id;
- the model advertises a capability in the SDK contract;
- deterministic tests cover request/response mapping;
- an authenticated smoke passed for the exact provider, model, operation, artifact, and commit.
Claude on Vertex
Use the Vertex provider with Google bearer authentication and Anthropic publisher routing for supported Claude text, client tools, streaming, reasoning, and native structured output. Direct Anthropic-only features are rejected. Vertex Claude has separate catalog entries; direct Anthropic pricing and recommendations do not carry over automatically.
Vision, live models and compaction
The adapters support DeepSeek V4.1 Flash vision and legacy aliases, removes stale fixed DeepSeek prices, and adds Gemini 3.8 Live catalog entries and background thinking protocol handling. Supply reviewed pricing when a cost ceiling requires it; a removed fixed rate must not be treated as zero cost.
Anthropic compaction preserves signed provider-data blocks and accounts for billed iterations. Keep the returned block unchanged and first in non-system history; replace only the submitted prefix when retaining later turns. Empty or refused summaries must leave original history available. See the versioned Anthropic contract.
Native managed agents are Beta
createOpenAI(options).agents exposes native session creation, event streaming,
item listing, event submission and cancellation. It uses provider-owned state.
Aborting a stream only closes local consumption; explicitly call cancelTurn
to cancel remote work. Recover a disconnected session by retrieving its state and
items before resubmitting work. Empty HTTP 202 event acknowledgements may return
undefined; idle or subagent events do not establish root-turn success.
createAnthropic(options).managedAgents exposes native agents, environments
and sessions, including session event streaming and tool confirmations. Native
permission policy auto can execute calls without human review; use always_ask
when a human checkpoint is required. These resources do not use Zhivex’s local
persistence or approval queues. Automatic request retries are disabled by default.
Review the versioned OpenAI
and Anthropic
contracts before adoption. Native sessions are separate from runAgent and its
external-effect reconciliation. Provider/model/operation certification remains scoped.
Python catalog and certification
Application-owned catalog construction, lookup, defensive copies and typed
capability/pricing metadata are Stable. The maintained default_model_catalog
snapshot and provider capability discovery remain Beta. Metadata does not establish
live availability or current prices.
Provider certification now binds wheel hash, source, workflow identity, target, operations and evidence age. Records older than 30 days become stale. Meta Standard, Meta Contributor and concrete vLLM deployments remain distinct targets. A published 0.24 wheel does not inherit certification from 0.23; consult the artifact-specific support contract.
Qwen multimodal input
TypeScript 1.21.1 and Python 0.25.0 include Qwen3.8-Omni-Flash support. The published TypeScript adapter version appears in the table above. The model accepts text, images, audio, and video and returns text over HTTP. Streaming, callable tools, and hosted web search through Responses are supported. Use prompted structured output with local validation; native JSON Schema and audio output are not supported.
DeepSeek V4.1 Flash adds image input. Gemini 3.8 Live adds catalog and protocol updates, including background thinking. OpenAI managed sessions and Anthropic compaction use native Beta APIs; Python GPT-Live was Experimental in 0.25; its documented WebSocket subset is Stable since 0.26. Model catalog entries are distinct from artifact-specific live certification.
Provider updates reviewed on October 1, 2026
TypeScript 1.24 expands Vertex authenticated publisher routes, specialized OCR/FIM, Interactions, embeddings, media and context-cache expiration updates. Use exact model profiles: unknown IDs do not advertise unverified advanced capabilities. Realtime tool cancellation is correlated by call ID and cannot undo local effects.
TypeScript 1.25.2 adds GPT-6 Sol/Luna through Responses and Claude Opus 5.5 with model-specific thinking, sampling and tool constraints. Qwen 0.17.2 includes the Image 2.1 synchronous path, a 64 MiB upload cap measured by decoded base64 bytes, and the earlier typed Cloud APIs plus bounded hosted search with URL citations. Hosted models retain Qwen identity, regional constraints and pricing boundaries.
Python 0.27 adds Express API-key and optional Google Auth ADC authentication through
zhivex-ai-sdk[vertex], plus Beta native Vertex services and partner adapters.
See the published wheel guide. Older live reports,
restricted model access and partial service coverage do not certify this release.
Current model capability and native API boundaries
TypeScript 1.35.0 accepts provider/model strings and openaiCompatible.
createMistralCompatible and createGroqCompatible are presets of that
factory. They are not native adapters and they are not separate npm packages.
The catalog records source-backed Gemini API and Vertex shutdown dates, stops
recommending those retiring entries, and adds Vertex
deepseek-ai/deepseek-v4.1-flash-maas with no invented token price. The Gemini
API shutdown of gemini-3.1-flash-lite is 2027-05-07. Vertex
multimodalembedding@001 retires on 2027-04-01. Azure OpenAI gpt-4o-mini
now retires on 2027-04-14. Default model ids are unchanged.
TypeScript 1.34.0 catalogs OpenRouter meta/muse-spark-open and Ollama
muse-spark-open at $1.25 input, $0.15 cached input, and $4.25 output per
million tokens. OpenRouter accepts reasoning efforts low, medium, high, and
xhigh, and does not advertise parallel_tool_calls. Ollama rejects none and
max. Direct Meta Model API ids are unchanged.
Claude Haiku 5.5 is on the direct Anthropic API, Bedrock, and Vertex. Claude
Sonnet 5.5 remains on direct Anthropic and Vertex with separate transports.
Gemini 4 Argon (gemini-4-argon) is on the Gemini API and Vertex.
grok-4.7 is Responses-only and always-reasoning. gpt-6.1-sol rejects none
and minimal reasoning and requires the Responses API for tools.
OpenAI 0.17.0 accepts prompt-cache TTL "12h" on Responses
prompt_cache_options and explicit breakpoints. Chat Completions ignore that
TTL and warn once. The provider default remains 30 minutes, and "30m" is
still sent. Twelve-hour writes are priced at 2.5× the uncached input rate when
usage.cacheWriteTokensDetails is present. 30-minute writes and usage without
a split keep the catalog cache-write rate. Custom voices are { id: string }
on speech, Realtime, and GPT-Live. Named voices stay strings.
Anthropic 0.15.0 and Claude on Vertex accept optional userProfileId and send
it as the anthropic-user-profile-id header. Opt-in anthropicVersion
"2026-10-21" rejects temperature, top_p, and top_k, direct assistant
document blocks, and non-empty user-message citations locally. On that version,
model.capabilities.sampling.topP is false while stop sequences stay
supported. The default anthropic-version header remains 2023-06-01.
Bedrock Messages hosts that opt into 2026-10-21 use the same checks, and
that version is accepted there only for Claude 4.7 and later. The OpenAI
12-hour prompt-cache TTL, userProfileId, and API version 2026-10-21 are
covered by unit tests only. They were not exercised in the live certification
of this release.
OpenAI 0.17.0 and OpenRouter 0.7.0 keep conservative text/streaming defaults for
unrecognized model IDs. Tools, vision, reasoning and native structured output need
a known profile or explicit per-model modelCapabilities. Declare only features
verified for the route; unknownModelCapabilities: "legacy" is an explicit migration
option. xAI and Vertex provide their own capability declarations to shared transports.
Credentialed fetches reject redirects. Gemini, Qwen, Vertex, xAI, and Azure OpenAI
reject non-string voice values before a request. String voices and defaults are
unchanged. DeepSeek streamed chat selects the choice whose index is 0.
Python 0.29.0 adds experimental application-owned computer execution. Python 0.28.3 remains the prior snapshot for Beta native OpenAI hosted multi-agent Responses, Gemini Voices/TTS, Qwen rerank and Qwen3.8 LiveTranslate. See the published 0.29.0 wheel guide for version-specific imports and constraints. Catalog metadata does not establish live certification.
Full provider references
Continue with Gateway routing, MCP and hosted tools, or multimodal features after choosing the portable provider boundary.