Settings: Integrations
Last reviewed November 15, 2026 (checked against the app).
These settings are spread over several Settings pages, on desktop and web: Providers & keys, Local models and Media (AI models); Webhooks & notifications, Browser, Runtimes & Docker and Command-line tools (Tools); Access and keys and Remote access (Security); and Privacy (General). All settings lists every page.
How do I run local models inside Codex?
This is the default. To check or change it, open Settings -> Local models -> Ollama -> Local model harness.
With Codex CLI (the default) an agent that runs a local model (ollama: or vllm:) runs inside Codex, so it can edit files, run commands and tests, browse the web, and use the MCP tools its company grants, while every model call goes to your local server at no cost. With OpenCode CLI the same local model runs inside OpenCode instead, with file edits, shell commands and web fetch; it uses the server's ordinary chat-completions API, so it suits a server without the Responses API. With Direct a local model answers through the Ollama chat loop and cannot use tools.
Each agent can override the global choice under Edit agent -> Integrations -> Local model harness. Before a Codex run starts, CPLai checks that the local server exposes the OpenAI Responses API and stops with a clear message if it does not (vLLM needs a build with /v1/responses).
The global harness selector is available on desktop and web; the per-agent selector is in the desktop editor. This setting controls agent launches, not ordinary Chat transport. See Local Models for prerequisites and the vLLM agent-catalog boundary.
How do I manage API keys for programmatic access?
Two pages under Settings > Security list every key and sign-in that can reach CPLai, grouped by what owns it. Access and keys holds your own: Keys you created, Connected assistants, Sign-ins (one row per browser) and Terminal tabs and chats. Agent and machine access holds what your agents, helpers and other computers use: Agents (run keys, owner only), Delegations, Paired machines (owner only) and This install (owner only). A link in each page's header opens the other. The chips at the top filter the cards (Needs a look lists rows to check, such as a legacy key or a sign-in about to end), and the search box finds a row by name, browser, company, agent or key prefix. Agent mailboxes are managed separately in Business Integrations.
CPLai supports personal access tokens (PATs) for programmatic API access. Use them to authenticate external scripts, CI pipelines, or custom integrations against the CPLai REST API. They are listed under Keys you created.
Creating a key
- Click New key at the top of the page (or New key › under Keys you created).
- Give it a descriptive name (e.g. "CI deploy hook", "local script").
- Optionally select /v1 API permissions and set a per-key rate limit (default 60 requests/minute). Leaving every
/v1permission unchecked creates a key with CPLai's default operator permissions, without/v1access. You can change the permissions afterward with Permissions. - Click Create.
- Copy the token immediately with Copy: it is shown only once.
The token format is cpl_pat_ followed by 32 hex characters. Its saved record contains a hash, so CPLai cannot show the token again.
The Default operator token is listed under This install as Operator token. CPLai creates it for local coordination and keeps its value for reuse; agents and scripts you start outside CPLai read it from ~/.env. If it is missing or revoked, CPLai provisions a replacement at startup.
How do I edit a key's permissions or inspect usage?
On a key under Keys you created, choose Permissions. Tick the permissions the key needs (organization and team management, hiring agents, settings, runs, messaging, chat imports, Keychain, memory, knowledge, the code index, and the /v1 permissions), then choose Save. Changes apply to the key's next request.
Read keychain (keychain:read) permits metadata access without revealing stored secret values. Write keychain (keychain:write) includes metadata access and permits managing entries and reading stored credentials, subject to the entry's ownership and the caller's other access checks. See Keychain before sharing an operator token with a script or terminal session.
Usage shows the key's request counts by day and call for the last 14 days.
Using a key
Include the token as a Bearer token in the Authorization header:
Authorization: Bearer cpl_pat_abc123...
The API validates the token on every request and tracks when each key was last used.
Revoking a key
- Find the key under Keys you created.
- Click Revoke.
- Confirm.
A revoked key stops working at once. It stays listed until you choose Delete on its row, or Delete revoked keys under the card for all of them.
How do I disconnect a browser-extension session?
Each browser signed in to the web dashboard or the CPL Browser extension is one row under Sign-ins. Choose Sign out on a row to end that sign-in; an extension sign-in ends together with the short-lived keys it uses. Sign out everywhere else ends every sign-in except the browser you are using. The browser you are using is marked You; sign it out from the account menu.
What else is on the two pages?
- Terminal tabs and chats: each terminal tab and agent chat you open gets its own key, which ends when the tab or chat closes. End key cuts one off now.
- Delegations: short-lived keys that let a built-in helper (such as Peak or Merge Desk) act with your permissions while you work with it, for 8 hours at most. End now ends one.
- Agents (owner only): each agent's live run keys and today's refusals. End keys ends an agent's live run keys; Use the shared token keeps an agent on the shared operator token. When an agent was refused a call it needs, the row shows the call and what it does in plain words, with Allow it: after you confirm, that agent's runs may make exactly that call (the same method and the same address, so a different item stays refused), and nothing else it was refused. Only calls on CPLai's reviewed list can be allowed, and the confirmation names the exact call and the kind of call it is. Calls that belong to you or to this install (settings, keys, users, agents, pairing, updates and similar) can never be allowed, and neither can calls whose target is not in the address, such as reading or writing a project's files, git, or the vault: those rows say "This cannot be allowed from here". Take back refuses the call again.
- Rotate (owner only, on the desktop app): on the Operator token row under This install. CPLai makes a new operator value, uses it for new agent runs and terminal tabs, and writes it into this computer's
~/.env. The old value keeps working, because other computers, scripts and skills may still hold it: after the overlap window (7 days unless you change operatorRotateOverlapHours) it ends by itself only once it has gone a whole day without use. If it is still being used, it stays and you get one item in your Inbox saying where it was last used, so you can keep it or end it. End the old value now ends it at once; Rotate and end the old value now is for a value that may have leaked. On the web dashboard, Rotate is shown but held, because only the desktop app updates~/.env. - Paired machines (owner only): worker machines that run agents for this install (Remove) and other CPLai installs you paired with (Unpair).
- Show ended keys shows rows that have ended (revoked, expired or signed out); otherwise the page only counts them.
How do I remove ended sign-ins and keys?
The owner sees Remove ended sign-ins and keys after 7 days near the top of the page. It is off by default, and the line under it says how many ended rows would be removed now. When you turn it on (you confirm first), CPLai deletes ended sign-ins and session keys (terminal tab, chat, member terminal, run and delegation keys) every hour once they have been ended for 7 days. They cannot be brought back. Personal keys, assistant connections, the operator token and anything still live are never removed.
Tip: The clipboard security filter automatically blocks
cpl_pat_tokens from being captured in Clipboard History, so accidental copies do not persist.
How do I add provider API keys?
- Open Settings -> Providers & keys -> API Keys.
- Add the key for each provider you use.
- Save the setting.
| Provider | Unlocks |
|---|---|
| Anthropic | Claude chat models and Claude API features |
| OpenAI | GPT models, reasoning models, embeddings, Whisper, and OpenAI image generation |
| Perplexity | Sonar search and research models |
| OpenRouter | Universal gateway - routes to Claude, GPT, Gemini, Sonar, and many other models through a single key. Also provides fallback access to embeddings and web search when native provider keys are absent. See OpenRouter as a universal gateway below. |
| Ollama Cloud | Cloud-hosted Ollama models through opencode agents |
| FAL.ai | Image and video generation (primary media provider) |
| Kie AI | Image and video generation models |
| ElevenLabs | Text-to-speech voiceover jobs. Desktop and web both expose the provider key; the automatic agent or Chat voiceover picker is not yet available. |
| Google Gemini | Gemini chat and reasoning models |
| v0 | Page and UI generation on the Designer page |
| Vercel | Quick publish and deployment actions |
| Firecrawl | Web scraping, crawling, and web content indexing |
Tip: Use Keychain for credentials that agents or companies need at runtime. Use API key fields here for app-level provider configuration.
If none of Anthropic, OpenAI, OpenRouter, or Gemini has a key, the Integrations section shows a No AI provider keys yet banner at the top. Chat models, embeddings, and utility features need at least one of these, and a single OpenRouter key unlocks nearly everything. The banner points you to add keys below or to re-run guided setup from the About section.
The OpenAI Settings key can provide a metered Codex fallback when CLI account auth is unavailable. The Google Gemini Settings key remains an app-level Chat provider and does not enable Antigravity agent runs. For a metered Antigravity agent fallback, provide ANTIGRAVITY_API_KEY through Keychain or the agent's environment.
ElevenLabs is an explicit audio provider, not an image or video default. The current Chat media panel still exposes image and video intents only. Supported automation and API clients must select ElevenLabs explicitly and provide a voice ID for a voiceover job. The onboarding Test action verifies the account without spending characters, so a valid key can still be out of monthly character quota.
How does native key precedence work?
When you have both a native provider key (e.g. Anthropic) and an OpenRouter key, CPLai always uses the native key for that provider's models. OpenRouter routing only activates as a fallback when the native key is missing. This means:
- If you have an Anthropic key and an OpenRouter key, Claude models use Anthropic directly (faster, no middleman)
- If you have only an OpenRouter key, Claude models route through OpenRouter transparently
- The same precedence applies to all providers: OpenAI, Google Gemini, Perplexity, and others
How do I choose a default media provider?
Open Settings -> Media -> Media Providers.
| Control | What it does |
|---|---|
| Default provider | Choose FAL.ai or Kie.ai as the provider used by agents and the chat composer when no provider is specified |
| Provider status | Shows whether a provider key is stored. It does not make a live request to test provider reachability. |
| Catalog | Click Refresh catalog to pull the latest model list from each configured provider. Desktop only. |
The default provider affects both desktop and web media generation. When an agent or the Painter tool generates an image without specifying a provider, it routes through the default. The other provider remains available as a fallback.
Tip: You need at least one media provider key (FAL.ai or Kie AI) for generation and catalog refresh. A configured status confirms key presence, not provider health or account balance.
ElevenLabs does not appear in the default-provider toggle because it only handles audio intents. Voiceover jobs must select it explicitly.
How do I configure ElevenLabs voiceover?
- On desktop or web, open Settings -> Providers & keys -> API Keys.
- Add your ElevenLabs API key.
ElevenLabs is separate from the default visual-media setting above. Its shipped audio adapter is designed for explicit voiceover requests, supports standard narration and lower-cost draft intents, and requires a voice ID from your ElevenLabs account. It is never selected as the default provider for image or video generation.
The desktop and web Settings fields store the same credential but do not include a live Test control. To validate the key, re-run Guided Onboarding from desktop Settings -> About & updates and use Test on the ElevenLabs provider row. That read-only check does not spend characters, and an account with no remaining character allowance can still show a valid key. During synthesis, quota exhaustion is reported as a quota problem instead of a broken credential.
The current Image and Video composer, Chat tools, and agent media tools do not submit ElevenLabs voiceover jobs automatically.
This setting does not change Chat read-aloud. Desktop Chat continues to use Microsoft Edge TTS, while the web dashboard uses the browser's Web Speech API.
Agents receive the configured ELEVENLABS_API_KEY at launch and can use the provider directly when instructed. That direct provider access is separate from CPLai's media-job adapter.
See Image, Video, and Voiceover Generation for the media workflow boundary.
How do I install and manage the local ComfyUI runtime?
Open Settings -> Media -> Media runtime (ComfyUI). The same card appears on desktop and web. Web controls manage the runtime on the CPLai host through authenticated CPLai routes; they do not connect to ComfyUI on the browser's machine.
Only an administrator can install or change the runtime.
How do I install it?
Click Install. CPLai downloads the pinned official ComfyUI and comfy-cli releases on first enable, verifies their hashes, and builds an isolated Python environment. Nothing is bundled with the CPLai installer.
The card reports each provisioning step:
- hash-verified download;
- ComfyUI extraction;
- Python environment;
- GPU-matched PyTorch;
- ComfyUI requirements;
- comfy-cli;
- model paths;
- final verification.
Installation requires enough free space above the configured media disk floor. The default floor is 40 GB. If the card reports a disk_floor error, free space on the displayed model volume before retrying.
How do I control and maintain it?
| Control | What it does |
|---|---|
| Start | Starts the managed loopback-only worker after provisioning |
| Stop | Stops the worker without removing the runtime or models |
| Restart | Restarts the currently promoted runtime version |
| Repair | Re-runs the idempotent setup steps for the installed version |
| Check for updates | Stages and smoke-tests the pinned update before promoting it |
| Roll back | Returns to the retained previous version when one is available |
| Remove | Stops and removes the managed runtime after confirmation; separately stored models and persisted media remain |
| Change (models folder) | Points the runtime at a custom absolute folder for model weights |
| Reset to default (models folder) | Clears the custom folder back to <workspace folder>/media-models |
The status row shows the installed version, running process, PyTorch variant, free disk space, and rollback target. The models folder row below it shows where checkpoints, LoRAs, and other weights live. By default this is the media-models subfolder of the CloudPeakLabs workspace folder you picked during setup (for example C:\Users\you\CloudPeakLabs\media-models); use Change to move it to any absolute path, such as a larger drive. A changed folder takes effect the next time the worker starts or restarts.
If another CPLai instance already owns the worker, the card becomes read-only and identifies the owning instance. Stop or manage the runtime from that owner instead of trying to start a second worker. Ownership clears automatically when the owning instance exits, so a card that stays read-only means that instance is still running.
The managed runtime and media-job contract are available, but the full local ComfyUI Media Studio workflow is not connected to the Chat media panel. Current Chat generation uses the configured FAL.ai or Kie AI provider.
Tip: Installing the runtime does not silently download every model. Add the model required by an approved workflow to the displayed model root when CPLai reports
model_missing.
See Image and Video Generation for local workflow scope, hosted provider differences, updates, rollback, and troubleshooting.
How do I use a remote ComfyUI server?
Beside ComfyUI endpoint, select Change, enter the server's http:// address, and select Save. Use an address reachable from the CPLai host, without credentials in the URL. Save stores the address; it does not test generation. Use local runtime restores the default endpoint.
This setting redirects ComfyUI jobs. The runtime installation and maintenance buttons still control the local runtime on the CPLai host, and hosted FAL.ai/Kie AI jobs keep their provider configuration. See remote ComfyUI setup.
How do I enable local Ollama models?
- Install and start Ollama on your machine.
- Open Settings -> Local models -> Ollama.
- Turn on Enable Local Models on desktop, or Enable Ollama on web.
- Confirm Server URLs (one per line; the first server also serves embeddings).
- Choose the default local model.
Desktop Settings also shows installed models and a pull-new-model workflow. Web Settings can configure the server connection and default model.
On desktop, Pull New Model provides curated model suggestions and also accepts a typed model name. Downloads and deletions apply to the configured server's machine. Desktop Chat's Context picker sets the conversation's Ollama context size, with a default of 32k capped at the model maximum.
The Local Models guide explains model downloads, context-cache memory, the Host memory (GB) fit warning, vLLM server controls, and local Librarian selection. Use desktop to start or stop vLLM through its configured commands; the web toggle saves the connection setting without executing those commands.
On desktop, this Ollama-specific default is used only when a conversation-creation action did not supply a model and the Account default is empty or unavailable. The Account default always wins when both are set. Existing conversations keep their current model.
Enforce Local Only for a company
Company admins can open Trust Center and enable Local Only. The policy is company-scoped and shared by desktop, web, the scheduler, API launches, external-event launches, and durable retries. Once enabled, CPLai rejects any new agent run unless its execution path is local Ollama and its model uses the ollama: prefix. ollama-cloud/ and ollama-cloud: are hosted services and are deliberately rejected.
Local Only means no cloud AI. It does not cut agents off from the web: their browser follows the company's Posting on websites setting in Trust Center, the same as any other company.
Agent chat follows Local Only too, on web, desktop, Telegram, channels and War Rooms. A chat turn with an agent on a cloud model is refused with a reply that says so, and an already-open session stops at its next message. Only an agent whose chat runs on Ollama, or on OpenCode with a local model, can chat while Local Only is on. A chat runs the agent's own CLI, so a cloud CLI such as Claude Code or Codex is refused even with an ollama: model. War Rooms always run Claude Code, so they need Any model.
The switch is audited. Viewers can read it, but only company admins can change it. Existing completed output is unaffected; turn the policy off explicitly before intentionally launching a cloud-backed agent.
Let a Local Only company use cloud AI in a narrow way
While Local Only is on, Trust Center's Cloud AI rule shows three switches under Exceptions to Local Only. All are off by default, and each is audited:
| Switch | What it allows |
|---|---|
| Any model | Agents may run and chat on cloud models too. Local Only then only records the intent. |
| Cloud fallback | When a run on the local model fails, the service's retry may use a cloud model from that agent's own fallback chain. A first launch on a cloud model is still refused, even when that model is in the chain, and so are other cloud models. |
| Ask a cloud model | A local agent may ask a cloud model one question at a time with the ask_cloud_model tool. |
Cloud fallback applies to the service's automatic retry of a failed run (scheduled, web and API launches). A fallback the desktop app starts on its own is refused under Local Only.
Ask a cloud model uses your logged-in Claude Code, never an API key. The default model is claude-sonnet-5, and the cloudAskModel setting must name a Claude model: with any other model the ask is refused, because Codex would let the cloud model read files on this machine. The cloud model gets no tools, no MCP servers, and none of your settings or CLAUDE.md files, so it sees only the question. An agent may make at most 30 asks an hour, and a failed or timed-out ask counts. Each agent has one ask running at a time, and at most three run at once across all agents. An ask runs inside its own contained process tree, and its slot frees only once CPLai has confirmed every process in that tree is gone. If cleanup cannot be confirmed, that agent cannot ask again until CPLai restarts. Asking works on Windows only for now. On macOS and Linux, CPLai cannot confirm that every process an ask started has exited, so the ask is refused before it is sent or counted. Each attempt and each answer is written to the audit log against the agent and its run.
Local Only covers agent runs, agent chat and the background jobs that work on a company's text: run summaries, ticket and mission breakdowns, project pulse, duplicate checks, memory reviews and explanations, incident notes, fleet doctor, debriefs, helper calls, the Oracle, Chat edit fix-up, the titles and summaries of a company's chats, and blocked-ask summaries. On a cloud model such a job sends nothing, waits, and says why; on a local model it runs as before. Any model lifts this for the company. Jobs that belong to no company (editor AI, mail sorting, meeting prep, the Terminal Supervisor, Start work, prompt improvement, skill tests, the Vault librarian, learned preferences, and chats outside a company) are not affected unless you turn on While any company is in Local Only, jobs that belong to no company use only local models in Settings > Utility models. It is off by default, and only you can turn it on or off.
While any company is in Local Only with Ask a cloud model off, CPLai also stops reading Ollama's public model library, which fills the download suggestions in Settings > Local models; the last list stays (see Local Models).
Search indexing and semantic search follow Local Only only when you turn on While any company is in Local Only, search sends no text to a cloud embedding provider in Settings > Vault & search (off by default). Every company shares one search index, so that switch applies to all of them.
Ollama models whose tag ends in -cloud (for example gpt-oss:120b-cloud) run on Ollama's servers, not on your computer, so Local Only treats them as cloud models for agents, chat and background jobs, and the refusal names the model. Pick an Ollama model without -cloud in its name.
Other product features may still use network integrations that you configured, so disable or remove those integrations separately when the machine must have no outbound connectivity. The Ollama runner itself accepts only http on localhost or 127.0.0.1, and the preflight VRAM guard blocks a model that cannot safely fit the largest detected GPU unless the operator sets the exact-model override shown in the error.
The recommendations in the Ollama settings card are sized against the Host memory (GB) value you declare on the same card (the same input the local-model fit guardrail uses). With a budget set, models that need most of the host's memory carry a warning; without one, the card shows a generic note and no per-model warnings. Set the value to your serving host's real GPU/unified memory so the guidance matches your hardware.
How do I set up the Browser Runtime?
Open the desktop app and go to Settings -> Browser -> Browser Runtime. The web Settings page shows the same card as a desktop-managed notice because browser installation happens on the machine running CPLai.
The first half of the card tracks CPLai's bundled Chrome automation stack:
| Step | What it installs |
|---|---|
| Python runtime | An isolated Python environment for browser automation |
| Patchright driver | The browser-control library agents use to drive Chrome |
| Google Chrome | The browser driven by the Patchright engine |
Each row shows pending, setting up, ready, or failed. CPLai provisions this stack once during setup. If the card reports a degraded system-Python fallback or a failed step, click Re-run setup to repair it.
How do I choose a local or remote Docker engine?
Use Settings -> Runtimes & Docker -> Docker engine on desktop or web. Choose the local engine or enter a remote SSH/TLS connection, then select Test connection and Save. New agent runs and terminals receive the saved environment; already-open sessions keep their current one. See Docker Environments for connection fields, remote Camofox setup, and path-mapping limits.
How do I enable Camofox?
Camofox is an optional containerized Firefox engine. You only need it for agents whose Browser engine is set to Camofox.
Camofox uses the saved Docker environment. For a remote engine, test and save that environment first, then enable Camofox here. Migrate camofox profiles in the desktop Docker engine card copies existing local profiles to the remote engine. The Docker Desktop installation steps below apply to a local engine.
- In Settings -> Browser -> Browser Runtime, find Camofox (Firefox engine).
- Click Enable camofox.
- If Docker Desktop is missing, the Docker row shows not installed and the card offers Install Docker. This is an uninstalled state, not a failed setup.
- Finish the Docker installer and restart Windows when it asks.
- After restart, CPLai resumes Camofox setup automatically. If Docker Desktop opens a first-run or service-agreement prompt, accept it. Click Enable camofox again if the card asks for a manual retry.
CPLai never installs or offers Camofox on its own: it is set up only when you click Enable camofox here. The card shows live Docker, image, and container progress while it works. The web dashboard's Browser Runtime card points here, because the install runs Docker on this computer.
Tip: Installing Docker for Camofox does not switch existing agents to Docker execution. Browser engine and agent execution backend are separate per-agent controls.
How does CPLai keep Claude Code up to date?
Open Settings -> Command-line tools -> Claude Code. The card shows the version that claude starts, when CPLai last checked, and any release that is waiting to install. New Claude models only appear once Claude Code is updated, so this is also where a missing model usually comes from.
CPLai updates Claude Code itself, on Windows:
- Every six hours the always-on service checks for a new Claude Code release.
- A release installs automatically once it is a day old, so a release Anthropic pulls or patches within hours never reaches your agents. Update now skips the wait and installs the newest release straight away.
- The new version installs into its own folder next to the current one. No existing folder is touched, and nothing that is running is touched.
- Before anything uses it, the new version must report its version and answer a short test prompt. If it fails, the current version stays and the card shows why.
- Then new terminal tabs, agent runs, chat messages, and
claudetyped in any terminal start the new version. Sessions that were already open keep the version they started with until they close. - The version before it is kept as a fallback until the next update succeeds. Any older folder is deleted once nothing runs from it and no file in it is open, so there are normally two copies on disk.
The always-on service does not read your curl settings (.curlrc or _curlrc in your user folders) for this check; it honors the HTTPS_PROXY and ALL_PROXY environment variables. If a check fails, the card shows curl's own error.
Each check also makes sure the current version is what it should be. If its program file is missing, or it reports a different version, CPLai installs it again beside the broken copy at that check. If that copy reports the right version, CPLai switches to it straight away and runs its short test prompt at the next check, so a repair works even while you are signed out, offline or at your plan limit. A repair happens even with Update automatically off, and then it reinstalls the same version. Until it is repaired, claude starts the previous version CPLai kept, and Today shows "Claude Code is broken on" with the computer's name under Needs you.
With Update automatically off, a version you install yourself with claude update or claude install is kept: CPLai takes it as the current version and does not change it back.
Turn off Update automatically to stay on the current version; Update now still works. While it is on, CPLai updates Claude Code and claude update typed in a terminal is turned off, because it would rewrite the copy CPLai manages. Agents cannot change this setting or start an update.
Note: Claude Code's own built-in updater is off for everything CPLai starts, and for
claudetyped in any terminal, because it rewrote the program files while sessions were running from them. CPLai's updater replaces it.
How does OpenRouter work as a universal gateway?
OpenRouter can serve as a single API key that unlocks most of CPLai's features, even without native provider keys. Configure it in Settings -> Providers & keys.
- Get an API key from openrouter.ai.
- Open Settings -> Providers & keys.
- Paste your OpenRouter API key.
- (Optional) Paste an Ollama Cloud API key if you want Ollama Cloud models through opencode.
What OpenRouter unlocks
With only an OpenRouter key configured (no native Anthropic, OpenAI, Perplexity, or Gemini keys), you get access to:
| Feature | How it works |
|---|---|
| Chat models | Claude, GPT, Gemini, Sonar, and 200+ other models route through OpenRouter transparently |
| Embeddings | Smart Context, vault semantic search, conversation indexing, codebase indexing, and Firecrawl RAG all use text-embedding-3-small via OpenRouter's OpenAI-compatible gateway |
| Web search | The @web mention and web search tool use Sonar models through OpenRouter when no Perplexity key is present |
| Internal AI helpers | Title generation, summarization, preference learning, Terminal Supervisor, ticket decomposition, subagent dispatch, skill evaluation, and prompt improvement all fall back through OpenRouter |
| Opencode agents | Create agents with CLI type opencode and select OpenRouter-hosted models like GLM 5.2. These also appear as race participants on the Parallel Racing page. |
| Parallel Racing | OpenRouter models appear in the race participant list alongside native-provider models |
Model availability in the model picker
The model selector shows visual indicators based on which keys you have configured:
| Indicator | Meaning |
|---|---|
| No badge | The model uses its native provider key directly (fastest path) |
| "via OpenRouter" badge | The model will route through OpenRouter because the native key is missing |
| Greyed out with tooltip | The model cannot be used - neither the native key nor an OpenRouter key is configured |
This helps you see at a glance which models are available and how they will be routed.
What about Ollama Cloud models?
Ollama Cloud models use the prefix ollama-cloud/ in the model field. CPLai auto-configures the opencode provider registry so these models resolve without manual config editing.
Tip: If you have both native provider keys and an OpenRouter key, the native keys always take precedence for their respective models. OpenRouter kicks in only for models whose native key is absent, so you get the best of both worlds.
How do I turn on lossless compaction?
When a Claude agent's conversation fills up, Claude Code normally replaces the older part with a summary. A summary can lose a file path, an exact error, or a command the agent needs later. Lossless compaction keeps the conversation as it was and only removes old tool output the agent no longer needs; everything kept stays word for word.
A small decision model you run yourself picks what to keep. CPLai works with Kev or any server that offers the same API. TypeSafe's hosted API is not used, so your agents' conversations never leave your own machines.
- Start your decision model server, for example Kev on a machine with enough GPU memory for the model size you chose.
- Open Settings -> Utility models -> Lossless compaction on desktop or web.
- Enter its Decision model address, for example
http://localhost:8009, and a Key only if your server asks for one. Only you can change this address, on the desktop or signed in on the web; agents and the API cannot. - Click Test decision model. It shows the models the server offers, or why it could not reach it.
- Turn on Lossless compaction.
It applies to Claude agent runs, agent chat, and Claude and OpenCode tabs on the Terminal page that start after the change. A Terminal tab that was already open keeps its normal compaction until you open a new one. When the decision model cannot answer (it is off, still loading, or too busy), or when there is little old tool output to remove, the conversation uses its normal summary instead, so nothing stops working.
The decision model is only asked about large tool outputs (2,000 characters or more), a part of the conversation at a time, biggest first. Every tool call stays in the conversation; only outputs it no longer needs are cut to their first lines. Claude Code waits at most 30 seconds for each answer, and each part is sized to answer well within that. A compaction stops asking after 3 minutes, and any output it did not get to stays as it is.
OpenCode works a little differently. Once its conversation passes 60% of the model's context, the decision model is asked once (that turn waits about a minute while it decides), and from then on the old tool output it does not need is left out of what OpenCode sends to the model. OpenCode's saved conversation keeps everything.
Codex and Antigravity keep their own compaction: neither lets anything else decide what stays in the conversation.
The key is stored encrypted and is never shown again; use Remove to delete it.
How do I choose the Oracle models?
Open Settings -> Providers & keys -> API Keys in the desktop app or web dashboard.
| Setting | Behavior |
|---|---|
| Oracle Model | Primary model for Chat's second-opinion Oracle tool. Empty uses Claude Opus 5.5. |
| Oracle Fallback Model | Tried when the primary model's provider key is missing or its request fails. Empty uses GPT-5.4. |
The selectors offer the native Anthropic and OpenAI catalogs. A claude-* model uses the saved Anthropic key; the OpenAI choices use the saved OpenAI key. These calls go directly to the provider API and are billed per token. They do not use Claude Max, a ChatGPT/Codex subscription, Antigravity, Ollama, or OpenRouter.
If only one native provider key is configured, CPLai skips a selection that needs the missing key and tries the other model. Choose the same model for both fields to disable the fallback attempt.
When neither native key exists, server-side and web Chat can instead route Oracle through the configured Utility Model, including an OpenRouter-backed utility model. Desktop's direct Oracle tool still requires an Anthropic or OpenAI key.
Desktop and web expose equivalent Oracle selectors and save the same primary and fallback values. Both surfaces derive their displayed defaults from the same model contract used by the Oracle runtimes.
Tip: Keep the fallback on a different provider when you want the Oracle to survive a provider outage or missing key.
How do I configure inbound webhooks?
- Open Settings -> Webhooks & notifications -> Inbound Webhooks.
- Toggle Enable Server.
- Choose the port shown in the app.
- Generate or paste a bearer token.
- Copy the trigger URL and replace
{agentId}with the target agent id.
Use inbound webhooks when an external system should trigger an agent. Keep the bearer token private.
| Field | Purpose |
|---|---|
| Enable Server | Starts or stops the local webhook receiver |
| Port | Local port used by the receiver |
| Bearer Token | Required authentication token |
| Trigger URL | Template endpoint for launching an agent |
When a running desktop listener is connected to the service live feed, port and token changes saved from the web dashboard apply automatically within a few seconds. CPLai re-reads the saved values and restarts only the listener that was already running. If the listener is off or the desktop app is closed, the new values apply on its next start.
How do I expose inbound webhooks publicly?
Use Remote Access when an external service needs to reach your local webhook server and you do not want to configure port forwarding.
- Open Settings -> Webhooks & notifications -> Inbound Webhooks.
- Turn on Enable Server.
- In the desktop app's Remote Access card, pick a mode:
| Mode | What it does | Setup |
|---|---|---|
| Off | Tunnel disabled. Webhooks are reachable only on your local network. | None |
| Development | Rotating *.trycloudflare.com URL, zero setup. Good for testing. The URL changes each time you restart the tunnel. |
Click Development, wait for the URL to appear |
| Production | Stable URL through either an external Cloudflare connector or CPLai's in-app Named Tunnel. | Set and test the public URL; add a tunnel token only if CPLai should run the connector |
When CPLai runs the tunnel itself (Development, or a Production tunnel that CPLai manages), it uses an installed cloudflared only if it is version 2026.10.2 or newer, because older versions trust compromised certificates. Otherwise, on Windows it downloads a pinned cloudflared release, checks the SHA-256 hash, and caps the download size; on macOS, install or upgrade it yourself (for example brew upgrade cloudflared). If the helper cannot be verified, CPLai reports a tunnel error instead of launching it.
For a Production tunnel that CPLai manages:
- Create a Named Tunnel in the Cloudflare Zero Trust dashboard.
- Copy the tunnel token.
- Paste it in Tunnel Token. CPLai saves it to the PostgreSQL settings store and mirrors it to the OS keychain when available.
- Set the Public URL to your configured tunnel hostname.
The desktop app writes the PostgreSQL value first and reads it back before it shows the Stored badge or enables the Production start controls. It then mirrors the token to the OS keychain on a best-effort basis. When reading, CPLai prefers the keychain value and falls back to PostgreSQL, so a Windows account mismatch does not make a successfully saved token disappear. Clearing the token removes it from both stores.
If an external Cloudflare service already owns the connector, leave the token empty, enter the stable public URL, and select Test connection. When the URL is reachable and CPLai's in-app supervisor is not running, Settings identifies it as externally managed. The external service continues independently; Start tunnel is only for the CPL-managed token path.
The web Remote Access card shows guidance only. It has no mode switch, Public URL field, test, token, or start controls, and it never exposes the tunnel-token secret. Use the desktop app to choose a mode, save and test the public URL, save or clear a token, and start CPLai's Named Tunnel. The persisted PostgreSQL fallback remains available when the headless service runs under a different Windows account from the desktop app.
The public dashboard URL is your configured tunnel hostname plus /dashboard/
(for example https://cpl.example.com/dashboard/). In Cloudflare, that
hostname routes to the always-on headless service at the runtime API address
shown on Trust Center's Status tab. The port can differ between installs, so copy it
from that tab. The service starts automatically on boot and serves the
full web dashboard. The API needs no public hostname of its own; add one only
if you have reviewed what it exposes.
Tip: Keep the webhook bearer token enabled even when using a public tunnel. The tunnel makes the endpoint reachable, but the bearer token is what authenticates incoming requests.
How do I add notification channels?
- Open Settings -> Webhooks & notifications -> Notification Channels.
- Click Add channel.
- Choose Telegram, Email, Slack, Discord, SMS (Twilio), or Desktop notification.
- Fill in the channel configuration.
- Save the channel.
- Toggle the event preferences for that channel.
Notification channels are used for agent run events, alerts, and proactive messages.
How do I use webhooks and the /v1 API?
The Developer Platform gives external systems a stable, scoped surface:
- /v1 API (
/api/v1/...): authenticates ONLY with scopedcpl_pat_keys (see API keys) - never the shared agent bearer or a browser session. Endpoints cover tickets (list/create/comment), projects, plans, agents (trimmed listing), incidents, clips, Ask, extracts, and/v1/me. Every request is scope-checked, rate-limited per key with aRetry-Afteron breach, and metered into the per-key usage view. - Webhooks (Settings -> Webhooks & notifications -> Webhooks, on desktop and web): company-scoped subscriptions that deliver signed JSON to your endpoint when things happen. Events:
ticket.created,incident.opened,incident.resolved,run.completed. The signing secret (whsec_...) is shown once at creation; verify deliveries by computing HMAC-SHA256 over the raw body and comparing to theX-CPL-Signatureheader. Target URLs must be public addresses (internal and cloud-metadata addresses are rejected), redirects are never followed, deliveries retry with backoff, and a subscription auto-disables after 10 consecutive failures. Test sends a sample delivery on demand. The dispatcher runs in the always-on service and delivers events that occur while it is running.
