Guides

Coding agent setup

Any agent that speaks the OpenAI protocol can run on Pearl, three settings, no code changes.

Coding agents are chat completions in a tool loop, so pointing one at Pearl is the same everywhere: a base URL, an API key, and a model ID. Every model in the catalog supports tools; start with deepseek-ai/DeepSeek-V4-Pro for hard, long-context work and deepseek/deepseek-v4-flash-0731 when latency and cost matter more. See Choosing a model.

The universal route: environment variables

Tools built on the official OpenAI SDKs read the standard variables, often that's the entire setup:

export OPENAI_BASE_URL="https://inference.pearlresearch.ai/v1"
export OPENAI_API_KEY="$PEARL_API_KEY"

opencode

Add a custom provider to ~/.config/opencode/opencode.json (this exact setup runs Pearl's own engineering work), then pick a Pearl model from the model picker:

~/.config/opencode/opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "pearl": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Pearl Inference",
      "options": {
        "baseURL": "https://inference.pearlresearch.ai/v1",
        "apiKey": "{env:PEARL_API_KEY}"
      },
      "models": {
        "deepseek-ai/DeepSeek-V4-Pro": {"name": "DeepSeek V4 Pro"},
        "deepseek/deepseek-v4-flash-0731": {"name": "DeepSeek V4 Flash"},
        "zai-org/GLM-5.2": {"name": "GLM-5.2"},
        "zai-org/GLM-5.3-Flash": {"name": "GLM-5.3 Flash"}
      }
    }
  }
}

Aider

Aider routes OpenAI-compatible providers through the openai/ model prefix:

export OPENAI_API_BASE="https://inference.pearlresearch.ai/v1"
export OPENAI_API_KEY="$PEARL_API_KEY"

aider --model openai/deepseek-ai/DeepSeek-V4-Pro

Cline, Continue, and other IDE agents

IDE assistants with a provider picker all follow the same shape: choose OpenAI Compatible as the provider type, set the base URL to https://inference.pearlresearch.ai/v1, paste a Pearl API key, and enter a catalog model ID verbatim (they're namespaced, zai-org/GLM-5.2, not glm).

Verify before blaming the tool

When an agent misbehaves, first prove the credentials and model work with one request, it separates configuration problems from tool problems in ten seconds:

curl https://inference.pearlresearch.ai/v1/chat/completions \
  -H "Authorization: Bearer $PEARL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "deepseek/deepseek-v4-flash-0731", "messages": [{"role": "user", "content": "ping"}], "max_tokens": 10}'

What makes agents run well on Pearl

  • Agent loops are the textbook prompt-caching case, long system prompts and an append-only transcript replay on every iteration, so the cached-input discount compounds across the whole run.
  • Watch finish_reason. Agents that truncate mid-edit usually hit max_tokens during the thinking phase, raise the cap or lower reasoning.effort.
  • Give the agent its own API key ("agents-dev"), so you can revoke a runaway loop without touching production, and attribute its spend in Analytics.

Agents retry aggressively by design, make sure your retry policy respects the error semantics: back off on 429/5xx, but stop on 402, no amount of retrying refills a balance.

Coding agent setup, Pearl Inference Docs