Why deploy coding agents through Ori
With OIDC sign-in, engineers use their own OpenRouter account instead of an API key. Nobody has to create, share or rotate keys, and no key sits on a laptop working until someone remembers to revoke it. Ori keeps a sign-in session and gives each agent access tokens that expire after about 24 hours, so a leaked token stops working on its own. IT also gets one tool to manage instead of one per agent. You deploy and configure Ori, and Ori sets up each agent it launches. Engineers can’t loosen the policy from a shell, a project or a flag. Since requests made with Ori’s credentials go through your OpenRouter organization, its model allowlists, provider settings and spend limits apply to all of them.Prerequisites
- Your OpenRouter organization ID, from the Org ID field in Settings > Preferences. To restrict Ori to one workspace, you also need its ID from the workspace’s Settings page.
- An MDM that can write macOS managed preferences or push files to
/etc/ori(Linux) andC:\ProgramData\ori(Windows) - Ori 0.16.0 or later on every machine before the policy arrives
- A Business or Enterprise plan, only if you want to pin requests to a US or EU region
1. Install Ori
Deploy Ori before the policy, because older releases don’t recognize some of these settings. To control which version runs, addORI_DISABLE_UPDATES to the policy, or set ORI_MINIMUM_VERSION to block anything older than a given release.
2. Write the policy
This policy makes OIDC the only way to sign in, only accepts keys from your organization and workspace, and only allows Claude Code and Codex. Replace the twoYOUR_… values. Leave out ORI_REQUIRED_WORKSPACE_ID to allow any workspace in the organization.
com.openrouter.ori.plist:
Optional:
3. Test it on one machine
Write the policy as a machine file, sign in, and check the result. If the machine already has a policy file, back it up first. Replace the IDs with your own, and delete theORI_REQUIRED_WORKSPACE_ID line if you don’t restrict Ori to one workspace. On macOS and Linux:
ori login --oidc opens OpenRouter’s approval page. If you’re already signed in to OpenRouter, approving takes one click and you’re back in the terminal. ori auth shows the account, the required organization and workspace and whether the key matches, and which administrator source set each value. For a script, ori auth --json reports data.policyStatus as compliant when the key meets the policy. ori doctor lists any setting Ori ignored because a user, project or shell set it.
4. Deliver the policy
- macOS: upload
com.openrouter.ori.plistas a custom-settings payload for thecom.openrouter.oridomain in Jamf, Kandji, Intune or any MDM that writes managed preferences. This source takes priority over everything else, with one exception: if a Mac already has a per-usercom.openrouter.oriprofile, that profile replaces this one for ordinary settings such as the sign-in switches and the allowed agents. Remove the per-user profile or add the same settings to it. - Linux: push
/etc/ori/config.jsonwith your configuration management. - Windows: push
C:\ProgramData\ori\config.json.
5. Have engineers sign in
Send engineers this prompt to paste into their coding agent:6. Roll out in rings
- Deploy Ori 0.16.0 or later to a pilot group, without the policy.
- Add the policy for the pilot group. Have them sign in with OIDC, launch each allowed agent, and run
ori auth. - Confirm their requests show up in your OpenRouter activity under the right workspace.
- Expand to the rest of the company in stages.
Check your work
ori auth --jsonreportsdata.policyStatusascomplianton a pilot machineori loginwithout--oidcno longer offers a way to paste or save an API key- An exported
OPENROUTER_API_KEYis ignored - A key from outside your organization is refused
- An agent that isn’t in
ORI_ENABLED_HARNESSESis hidden and refuses to start - Pilot requests show up under the right workspace in OpenRouter
What this doesn’t cover
- Turning off a sign-in method doesn’t delete keys it already saved. The organization requirement refuses keys from anyone else, and
ori logout --allremoves them from the machine, but they keep working at OpenRouter until someone deletes them at openrouter.ai/settings/keys. - The policy covers the credential Ori gives the agents it launches. An engineer who runs
claudedirectly with their own Anthropic account isn’t covered. - Someone who steals an access token, or reads the session and its key from disk on today’s unsigned releases, can use it for about 24 hours. Revoking the sign-in stops new tokens, not ones already issued.
- Engineers on personal machines can use the engineer prompt with the same organization and workspace, so OpenRouter’s server-side settings still apply to them. The device policy doesn’t.
FAQ
Can I deploy Claude Code and Codex to every engineer without giving them API keys?
Yes. Deploy Ori with your MDM and push a policy that turns off API-key sign-in. Engineers runori login --oidc from their terminal, then ori claude or ori codex. Ori passes each agent a short-lived access token from their OpenRouter sign-in, so nobody saves an OpenRouter API key.
Which MDMs does this work with?
Any MDM that can write macOS managed preferences for thecom.openrouter.ori domain, or push a file to /etc/ori/config.json on Linux and C:\ProgramData\ori\config.json on Windows. That includes Jamf, Kandji and Intune.
Can engineers turn the policy off?
No. Settings from your MDM outrank anything an engineer sets in their shell, a project or a command-line flag. If the policy file is malformed or can’t be read, Ori refuses to use any key until it’s fixed.Does OIDC sign-in remove every credential from the laptop?
No. Ori still keeps an OIDC session on the machine. It limits what a stolen credential is worth, because access tokens expire after about 24 hours, unlike an API key that works until someone revokes it. Until Ori releases are signed, a malicious package that can read the home directory can still use that session until it expires.Do I need an Enterprise plan?
No. OIDC sign-in is in beta and available to every OpenRouter account. Only pinning requests to a US or EU region needs a Business or Enterprise plan.What happens to API keys engineers already saved?
Ori doesn’t delete them. With the organization requirement, Ori refuses keys from outside your organization, andori logout --all removes saved keys from the machine. Delete the old keys at openrouter.ai/settings/keys so they stop working.
Next steps
- Read the Ori overview
- See every setting in Ori configuration
- Set up Claude Desktop with OpenRouter Sign-In, a separate OIDC integration that doesn’t use Ori (beta)