Skip to content

Providers

textfsm-ai integrates 18 LLM providers behind one interface (generate(), run_pipeline(), and the textfsm-ai generate/textfsm-ai pipeline CLI commands all take the same provider="..." value). Most providers just need an API key; a few cloud-gateway providers (Bedrock, Vertex AI, OCI) use their own ambient credential chains instead and take extra parameters in place of api_key.

The actual per-provider SDK calls are delegated to anyask, a standalone package (same maintainer) that owns the 18 provider implementations — textfsm-ai's pip install textfsm-ai[<provider>] extras are a thin pass-through to the matching anyask[<provider>] extra.

Run textfsm-ai providers list at any time for the live, code-derived version of this table.

All providers

Provider provider value Credential Extra params Example model
OpenAI "openai" OPENAI_API_KEY gpt-4o-mini
Anthropic "anthropic" ANTHROPIC_API_KEY claude-haiku-4-5-20251001
Google Gemini "gemini" GEMINI_API_KEY gemini-2.5-flash
DeepSeek "deepseek" DEEPSEEK_API_KEY deepseek-v4-flash
Azure OpenAI "azure" AZURE_API_KEY endpoint (AZURE_ENDPOINT), api_version (AZURE_API_VERSION), model is a deployment name (AZURE_DEPLOYMENT) (your deployment name)
Groq "groq" GROQ_API_KEY llama-3.1-8b-instant
xAI (Grok) "xai" XAI_API_KEY grok-3-mini
Together AI "together" TOGETHER_API_KEY meta-llama/Llama-3.1-8B-Instruct-Turbo
Fireworks AI "fireworks" FIREWORKS_API_KEY accounts/fireworks/models/llama-v3p1-8b-instruct
Cerebras "cerebras" CEREBRAS_API_KEY llama3.1-8b
Perplexity "perplexity" PERPLEXITY_API_KEY sonar
OpenRouter "openrouter" OPENROUTER_API_KEY google/gemini-2.5-flash-lite
Moonshot AI (Kimi) "moonshot" MOONSHOT_API_KEY moonshot-v1-8k
Mistral AI "mistral" MISTRAL_API_KEY mistral-small-latest
Amazon Bedrock "bedrock" (none — AWS credential chain) region (BEDROCK_REGION/BEDROCK_DEFAULT_REGION, required) anthropic.claude-haiku-4-5-v1:0
Cohere "cohere" COHERE_API_KEY command-light
Google Vertex AI "vertexai" (none — GCP ADC credential chain) project (VERTEXAI_PROJECT, required), region (VERTEXAI_REGION, required) gemini-2.5-flash
Oracle OCI "oci" (none — ~/.oci/config credential file) compartment_id (OCI_COMPARTMENT_ID, required), region (OCI_REGION, optional — falls back to the config file) meta.llama-3.3-70b-instruct

Credentials resolve in this order everywhere: CLI flag / explicit function argument > provider-specific environment variable > providers.yaml. See the CLI Guide for the full flag reference and the Quickstart for Python API usage examples, including the three cloud-gateway providers above.

Two implementation shapes

Internally (inside anyask, not this repo), providers fall into two groups — this only matters if you're extending provider support itself, not for calling textfsm-ai:

  • Shape A — OpenAI-compatible chat-completions API (DeepSeek, Groq, xAI, Together AI, Fireworks AI, Cerebras, Perplexity, OpenRouter, Moonshot). These share one HTTP client implementation and differ only in base URL, env var, and default model.
  • Shape B — a native SDK with its own request/response shape (OpenAI, Anthropic, Gemini, Azure, Mistral, Bedrock, Cohere, Vertex AI, OCI). Bedrock, Vertex AI, and OCI additionally take extra constructor parameters (region/project/compartment_id) instead of api_key, since they authenticate via their cloud platform's own credential chain rather than a project-level API key.

There is no automatic provider routing or fallback — --provider (or provider="..." in the Python API) is always explicit.