This documentation is for the federal deployments of Devin. Back to Devin Docs
Location
The CLI,
devin models validate, and the Desktop Models settings section all resolve the file the same way. The system path is typically root-owned; use DEVIN_MODELS_FILE for per-user overrides. On Windows, lock down C:\ProgramData\Devin\ before placing the file there.
Complete example
chat_completions and responses), and a loopback http:// endpoint. Copy it to /etc/devin/models.json (C:\ProgramData\Devin\models.json on Windows) and edit.
Schema reference (version 0)
Top level:
Each entry in
models:
The schema is strict: unknown fields are rejected, so a typo fails validation instead of being silently ignored. There is no top-level endpoint block and no inline API key.
API key environment variables
api_key.env is an indirection. The agent reads the key from its own process environment at startup. The variable must be set for every listed model, even for endpoints that ignore the key (such as Ollama or an unauthenticated vLLM); it may be empty. Otherwise the agent fails to start with model '<name>': API key environment variable '<VAR>' is not set.
- CLI: export the variable in the shell, or in the systemd/launchd unit, that runs
devin. - Desktop: the bundled agent inherits the Desktop app’s environment, not your terminal’s. A variable exported in
~/.zshrcis normally not visible to an app launched from the Dock, Finder, or Spotlight. Provide it in one of these ways:-
Recommended: the
devin.acp.agentEnvsetting (Settings → Devin Local → Environment Variables, or insettings.json):Values are merged into the agent’s environment when it is spawned. Restart the agent or the app after changing them. Use the same setting forDEVIN_MODELS_FILEif the file is not at the default path. -
Launch environment: on macOS,
opendoes not pass your shell’s environment to the app. Either runlaunchctl setenv VAR valueto make a variable visible to Dock and Finder launches until the next login, or start the app from a shell that has the variables exported by running the executable under/Applications/Devin - Airgap.app/Contents/MacOS/directly. On Linux set the variables in the.desktoplauncher or the systemd user environment.
-
Recommended: the
Validate the file
On problems, every diagnostic is printed with its code and the model it applies to, and the command exits nonzero:
{"path": …, "valid": false, "diagnostics": [...]} for automation. devin models validate runs without a valid license, so you can prepare the file before the license is installed.
Apply changes
Model backends initialize at process start. After editing the file, restart the CLI, or restart the bundled agent in Desktop, to load the new configuration. If the file is missing or invalid, the standalone CLI refuses to start and prints the error. Desktop’s bundled agent starts degraded with no models: sessions cannot run inference, and the Models settings section shows theMDL diagnostics so you can fix the file in place. Desktop validates before saving, never writes an invalid file, writes atomically, and refuses (MDL014) to replace a file owned by another user, so a root-owned /etc/devin/models.json can only be changed by an administrator on disk. On Windows, when the models file is owned by an administrator, a standard user cannot save model settings from Desktop (the save is refused with MDL014); an administrator can.
Error codes
Endpoint reachability and inference problems found by
devin airgap doctor are reported as NET and CFG codes; see Error codes.
