xAI
Grok over an OpenAI-compatible API — a distinct model family with strong reasoning, useful as an alternate judge, with grok-4 as the default model.
xAI serves the Grok family — strong reasoning models from a lineage independent of the
Claude, GPT, and Gemini lines. That independence is the point: in a pipeline built on
cross-family judging, a third or fourth distinct family is genuinely useful. Stella
speaks the OpenAI-compatible dialect against https://api.x.ai/v1.
Setup
export XAI_API_KEY="xai-..."xAI sits fourth in auto-detection, so the key alone
is enough. Prefer a file? Store the key in
~/.config/stella/credentials.toml, or rename the
env var Stella reads with providers.xai.api_key_env — see
overriding the key source.
Selecting models
The provider id is xai; the default model is grok-4.
stella --model xai/grok-4 run "review the retry logic for races"
export STELLA_MODEL=xai/grok-4Configuration
Being OpenAI-compatible, xAI takes the standard sampling parameters — temperature,
top_p, max_tokens, and friends — configured per agent under
agent_engine_config. The
settings.json providers map can override the base URL
or default model like any other provider:
{
"providers": {
"xai": {
"base_url": "https://llm-gateway.internal.example.com/v1",
"default_model": "grok-4"
}
}
}--base-url (env form STELLA_BASE_URL) overrides the settings value for one run. In a
project's .stella/settings.json, base_url is ignored unless STELLA_TRUST_PROJECT=1
— see the project trust boundary.
In the pipeline
grok-4's sweet spot is the alternate judge: when your worker and primary judge are
already Claude and GPT, Grok gives you a third family for tie-breaking or for goal-mode
round judging without same-model bias. It holds its own as a worker on reasoning-heavy
tasks too. See Examples for profile patterns and
Agent engine config for the per-agent wiring.
Catalog pricing
| Model | Context | In $/Mtok | Out $/Mtok | Cached-in $/Mtok |
|---|---|---|---|---|
grok-4 | 256k | 3.00 | 15.00 | 0.75 |
List prices from Stella's seed catalog — verify with xAI; your local catalog re-syncs
from models.dev via stella models refresh. See the
Model guide for the full cross-provider table.
Amazon Bedrock
Claude under AWS governance — SigV4-signed Bedrock Converse, cross-region inference profiles, and why this provider is deliberately last in auto-detection.
DeepSeek
The price/performance outlier — deepseek-chat at $0.27/$1.10 per Mtok, the natural triage model for every lineup and a very capable budget worker.