Skip to main content
The gateway enforces the compliance boundary for the models it serves, but it does not control client-side behavior — local tool execution, file access, outbound destinations, etc. Client-side behavior is the customer’s responsibility.
Factory’s custom models (“BYOK”) point droid at the Consus Gateway. Instead of pasting an API key, each developer installs a small credential helper once. The first time droid needs a credential, the helper opens a browser tab to the Consus portal. You sign in with your company account, and the helper receives a key issued to you. Nobody sees or copies a key, and IT has nothing to push to your computer.

Before you start

You need:
  • Factory installed. See the Factory docs if you don’t have it yet.
  • Access to the Consus portal through your organization’s SSO. Ask your Consus admin if portal.consus.io doesn’t recognize your account.

Step 1: Install the credential helper

One command, no admin rights. It places a single shell script at ~/.consus/helper.sh. The helper is the same for every tool; Enterprise SSO sign-in covers it in full.
The helper is plain, readable source (helper.sh is POSIX shell; helper.ps1 is PowerShell). It talks only to portal.consus.io and stores the key it receives in ~/.consus/key, readable by your user only.

Step 2: Point Factory at the gateway

Open ~/.factory/settings.json and add the Consus models under customModels. Set apiKeyHelper to the helper, not to a key.
Notes:
  • Compliance level. The :fedramp-high suffix picks the authorization boundary. Use :itar for ITAR / export-controlled work. Don’t mix levels in one session. See Models for every ID and level.
  • Provider. Claude models use "provider": "anthropic" with the bare base URL. OpenAI and Gemini models use "provider": "openai" with https://api.consus.io/v1.
  • Helper refresh. apiKeyHelperTtlMs is how often Factory re-runs the helper (default five minutes). One minute means a key revoked in the portal stops working within a minute; with a key present each run takes milliseconds and makes no network call.
  • Organization-wide. A Factory org admin can push these same customModels through Factory’s org-managed settings so nobody edits a file. Factory refuses static apiKey values in org-managed models and expects exactly this apiKeyHelper form. The org’s model policy must allow custom models.
  • Personal or org-managed settings only. Factory ignores apiKeyHelper in project-level settings and in a --settings file passed on the command line; put it in ~/.factory/settings.json or the org-managed settings.

Step 3: Sign in

Start droid and send any prompt on a Consus model. Your browser opens to the Consus portal:
  1. Sign in with your company account (your organization’s SSO, plus the portal’s security-key or passkey check).
  2. The page shows the tool and the computer asking for access, for example Factory on eric-mbp. Only approve a request you just started on your own computer.
  3. Click Approve. You can close the tab; droid continues on its own.
The helper keeps the key for next time, so this happens once per computer. Factory re-runs the helper every few minutes; while a key is present that takes milliseconds and makes no network call. If droid reports Failed to obtain an API key from the configured apiKeyHelper command on that first prompt, the sign-in simply hadn’t finished yet. Complete it in the browser and send the prompt again. You can also sign in ahead of time:

Verify

shows who is signed in, the organization, and the key’s expiry. In droid, /model lists the Consus entries. For scripts, custom models are addressed by an ID Factory builds from the display name, custom:<display-name-with-dashes>-0, for example:
If you get the ID wrong, droid’s Invalid model message lists the exact IDs it knows.

Sign out or switch accounts

  • sh ~/.consus/helper.sh logout forgets the key on this computer. The next prompt signs in again.
  • To disable the key everywhere (lost laptop, someone leaving), revoke it in the Consus portal under your keys. It is labeled factory - <computer name>. Admins can revoke any key in their organization.

Troubleshooting

What the helper does and doesn’t do

See Enterprise SSO sign-in: what it stores, what it talks to, and how revocation works. In short, it talks only to portal.consus.io, keeps the key in ~/.consus/key with user-only permissions, never prints anything but the key, and contains no secrets of its own.