Skip to content

Model providers for Run and Check

Run and Check share one AI configuration. Each invocation still starts a fresh conversation; the operation selects its instructions and tool permissions.

SettingEnvironment variable
ProviderVIBIUM_AI_PROVIDER
ModelVIBIUM_AI_MODEL
Optional API base URLVIBIUM_AI_BASE_URL
Optional OpenAI reasoning effortVIBIUM_AI_REASONING_EFFORT

Both operations support openai, xai, anthropic, google, openai-compatible, and local. Provider credentials use their native environment variables:

ProviderCredentialDefault API base URL
openaiOPENAI_API_KEY, requiredhttps://api.openai.com/v1
xaiXAI_API_KEY, or a signed-in Grok CLI sessionhttps://api.x.ai/v1
anthropicANTHROPIC_API_KEY, requiredhttps://api.anthropic.com/v1
googleGOOGLE_API_KEY, or GEMINI_API_KEYhttps://generativelanguage.googleapis.com/v1beta
openai-compatibleOPENAI_API_KEY, optionalExplicit base URL required
localOPENAI_API_KEY, optionalhttp://127.0.0.1:8080/v1

GOOGLE_API_KEY is the canonical Google variable; GEMINI_API_KEY (the name Google’s own SDKs use) is read when GOOGLE_API_KEY is unset. If an optional key is configured, it is sent to the configured endpoint. Base URLs must be HTTP(S), without embedded credentials, query, or fragment. Native base URL overrides use the provider’s API version prefix, not the full messages/generateContent endpoint.

Run, live Check, saved-input Check, and AI readiness accept the same overrides:

CLI flagJavaScript / MCP / Java optionPython keyword
--providerproviderprovider
--modelmodelmodel
--ai-base-urlaiBaseURLai_base_url
--reasoning-effortreasoningEffortreasoning_effort

Explicit options override the shared AI environment for this invocation only. Later calls still use their original defaults. Credentials always come from the selected provider’s environment variable; there is no API-key option.

When the provider changes, supply the model explicitly. Vibium clears the old provider’s model, endpoint, and reasoning effort before applying your options. The new provider’s default endpoint is used, or supply aiBaseURL for a custom endpoint. openai-compatible always requires an explicit endpoint after a provider change. If the provider stays the same, omitted options retain the shared AI defaults.

An empty base URL resets the provider default. An empty reasoning effort clears an inherited setting. Empty provider/model values are errors. In Python, None omits an option; use "" for either reset.

For example, after exporting the appropriate API keys:

Terminal window
vibium ready ai --provider anthropic --model your-claude-model
vibium run "change my timezone to America/Chicago and save it" \
--provider anthropic --model your-claude-model -o run.zip
# Uses Claude for this goal and saves the run, without changing Run defaults.
vibium check "the saved timezone is America/Chicago after refresh" \
--provider openai --model gpt-5.6-sol --reasoning-effort none
# Uses OpenAI for a fresh assessment.
vibium check "the order confirmation was shown" -i record.zip \
--provider local --model your-loaded-model \
--ai-base-url http://127.0.0.1:8080/v1 --reasoning-effort ""
# Checks saved evidence using the specified local server and its default effort.

For evals, specify all four settings explicitly so same-provider environment defaults cannot affect a run. AI readiness accepts these flags too; use the same overrides when checking a particular eval configuration.

JavaScript/TypeScript (Browser, Page, and both async/sync APIs):

await page.run('change my timezone to America/Chicago', {
provider: 'anthropic', model: 'your-claude-model',
});
await page.check('the saved timezone is America/Chicago', {
provider: 'openai', model: 'gpt-5.6-sol', reasoningEffort: 'none',
});

Python (use await for the async API):

result = page.check("the saved timezone is America/Chicago", provider="openai",
model="gpt-5.6-sol", reasoning_effort="none")

Java:

page.run("change my timezone to America/Chicago",
RunOptions.builder().provider("anthropic").model("your-claude-model").build());
page.check("the saved timezone is America/Chicago",
CheckOptions.builder().provider("openai").model("gpt-5.6-sol")
.reasoningEffort("none").build());

MCP uses flat arguments on vibium_run and vibium_check:

{"name":"vibium_check","arguments":{"claim":"the saved timezone is America/Chicago","provider":"openai","model":"gpt-5.6-sol","reasoningEffort":"none"}}

Archive SDK calls accept overrides alongside record, including module-level browser.check(...) and Java Vibium.check(...).

Recorded Run/Check parent spans contain params.modelConfig: resolved provider, model, reasoning effort, output-token cap, action limit, and timeout. An empty effort means the provider’s default. These are requested settings, not a guarantee of a provider’s model revision or deterministic output. API keys and endpoint URLs are omitted. Metadata uses the existing recording redaction machinery. Saved-input checks leave their source archive unchanged; they do not add a new recording span to it.

Export the appropriate credential privately before these examples. Replace placeholder model names with models available to your account or local server.

OpenAI Run:

Terminal window
export VIBIUM_AI_PROVIDER=openai
export VIBIUM_AI_MODEL=gpt-5.6-sol
export VIBIUM_AI_REASONING_EFFORT=none
vibium ready ai

xAI (Grok) uses the same Chat Completions protocol with XAI_API_KEY:

Terminal window
export VIBIUM_AI_PROVIDER=xai
export VIBIUM_AI_MODEL=grok-4
unset VIBIUM_AI_BASE_URL
vibium ready ai

vibium ready ai xai --model grok-4 selects the same provider for one call.

When XAI_API_KEY is unset, Vibium reuses a signed-in Grok CLI session: it reads the access token from ~/.grok/auth.json (or $GROK_HOME/auth.json) and uses it while it is valid. Vibium never refreshes, stores, or rewrites that login. When the session expires, run grok login again or export XAI_API_KEY. vibium ready ai reports this credential as Grok login.

Use different providers for individual calls without changing the shared defaults:

Terminal window
vibium run "change my timezone to America/Chicago and save it" \
--provider anthropic --model 'your-claude-model'
vibium check "the saved timezone persists after reload" \
--provider google --model 'your-gemini-model'

The corresponding keys are ANTHROPIC_API_KEY and GOOGLE_API_KEY.

Local Check, with a compatible server already running:

Terminal window
export VIBIUM_AI_PROVIDER=local
export VIBIUM_AI_MODEL='your-loaded-model'
unset VIBIUM_AI_BASE_URL VIBIUM_AI_REASONING_EFFORT
vibium ready ai

local selects the OpenAI-compatible adapter and supplies a default endpoint. It does not install, download, launch, configure, or stop a model server or model files. An API key is not required. Use openai-compatible and an explicit base URL for other compatible servers:

Terminal window
export VIBIUM_AI_PROVIDER=openai-compatible
export VIBIUM_AI_BASE_URL=http://localhost:1234/v1
export VIBIUM_AI_MODEL='your-tool-capable-model'
vibium ready ai

vibium ready ai checks the shared AI configuration used by Run and Check. It accepts --json, makes at most two synthetic model requests, and leaves browsers alone. Use vibium ready ai anthropic --model your-model to select a provider positionally, or use the existing --provider flag. Plain vibium ready also tests the selected browser; see readiness diagnostics. Exit 0 and result.ready: true indicate that configuration and the provider tool round-trip passed. It does not test screenshot capability or application behavior. Unsupported tool protocols produce errors and setup guidance.

Vibium loads ~/.config/vibium/ai.env for empty AI variables on each command. Nonempty process environment still wins. Command substitution is not expanded. Set VIBIUM_LOAD_AI_ENV=0 to skip.

vibium config init writes that file for you at ~/.config/vibium/ai.env, readable only by you, with every setting present and commented:

$ vibium config init
Wrote ~/.config/vibium/ai.env (0600) — provider, model and API key for run and check
Edit it, then run vibium. Empty AI variables are loaded from this file.

It refuses to overwrite an existing file unless you pass --force, which keeps a .bak. The credential lines ship empty on purpose, so vibium ready ai reports a key you forgot to fill in before it spends a request finding out. The CLI reads settings on each call; SDK and MCP runtimes read their own process environment and need restarting after environment defaults change. Per-call overrides take effect immediately and do not require a runtime restart.

OpenAI and xAI use the Chat Completions function-tool protocol. Compatible endpoints must accept function tools, parallel_tool_calls: false, and max_completion_tokens. Image input is needed when an operation requests a screenshot. See OpenAI function calling.

Anthropic uses native Messages tool_use and tool_result blocks. Google uses native Gemini generateContent function calls and responses. Both adapters translate requested PNG/JPEG screenshots into the provider’s image format. See Anthropic tool calls and Gemini API schemas.

Reasoning-effort settings are supported for OpenAI, xAI, and compatible endpoints. OpenAI gpt-5 and gpt-6 models need none for Chat Completions function tools; vibium setup ai writes that default for them and says so. Other OpenAI model families keep the provider default. gpt-6.1 models accept function tools only on OpenAI’s Responses API, which Vibium does not use yet. No reasoning effort makes them work; vibium ready ai reports this. Choose another model, such as gpt-5.6-sol. Leave reasoning-effort settings unset for Anthropic and Google; extended thinking is not requested from Anthropic. Free-form assistant text accompanying tool calls and readable reasoning are discarded. Gemini’s opaque function-call signatures are retained only in memory during that invocation and returned to Google as required by its protocol; they never enter recordings or results. See Gemini thought signatures.

Native provider protocols, AI readiness, fresh-context separation, and browser-tool execution have deterministic fixture coverage. Real OpenAI Run acceptance covers both an existing browser and standalone browser cleanup. Real Anthropic, Gemini, and llama.cpp/local-server acceptance remains pending until the required credentials or server environment is supplied.

Run deterministic coverage with make test-run. Real-provider checks are opt-in via VIBIUM_AI_LIVE=1 and that provider’s VIBIUM_AI_* settings:

Terminal window
VIBIUM_AI_LIVE=1 node --test --test-concurrency=1 tests/run/live.test.js