Skip to main content
Junie is the JetBrains coding agent. The CLI connects to the Orq.ai AI Gateway through a custom model profile: a JSON file that names the endpoint and the models to run. Requests appear in Traces automatically.

Prerequisites

A custom model profile authenticates with the Orq.ai API key alone, so no JetBrains AI subscription is required.

Install Junie CLI

Confirm the install:
Homebrew and npm alternatives are listed in the Junie quickstart.

Setup

1

Create the model profile

Junie loads custom profiles from $JUNIE_HOME/models/*.json at user scope ($JUNIE_HOME defaults to ~/.junie) and from .junie/models/*.json in the project root. The filename becomes the profile identifier, so orq.json is selected as custom:orq.Create ~/.junie/models/orq.json, creating the models directory if it does not exist. Only baseUrl and apiType change between the three supported wire formats:
id is the model used for reasoning and code generation. fasterModel overrides it for helper tasks such as summarizing context, and inherits every top-level value it does not set. The model IDs above are examples: any provider-prefixed model enabled in AI GatewaySupported Models works, and one profile can mix models from different providers.
2

Export the API key

The apiKey value resolves ${ORQ_API_KEY} when the profile loads. Export the variable in the shell that starts Junie:
If the variable is unset, Junie refuses to load the profile and names the unresolved variable.
3

Start Junie on the profile

Without the flag, junie opens the model picker, where the profile is listed as Orq.ai AI Gateway under the Orq.ai provider. A custom profile needs no JetBrains account: when one is available, the picker replaces the sign-in options.On the first interactive launch Junie also offers to import configuration from Claude Code or Codex, which can be skipped, and asks about sharing anonymous statistics.
A profile in .junie/models/ loads only for a trusted project, and Junie asks for that decision when the interactive UI opens the project. Because --model is resolved before the UI opens, a first run in a new project fails with Unknown custom model profile. To use project scope instead of user scope, start junie once without --model, choose Trust this project, then launch with the profile. User scope has no trust requirement.
Gateway routing requires the Junie CLI. The JetBrains IDE plugin cannot be pointed at a custom endpoint yet, so this profile has no effect inside the IDE (JUNIE-554).

Configuration reference

The endpoint follows the wire format, not the model vendor. All three combinations are verified working: OpenAICompletion works with any model enabled in the workspace, because the AI Gateway translates the OpenAI format to each provider. Use Anthropic for Claude models to reach the provider as a native Messages call instead of through that translation. Junie also accepts Google for Gemini endpoints. The Gemini path carries the model inside the URL (/v1beta/models/{model}:generateContent) and the profile supplies baseUrl and id separately, so it is untested against the AI Gateway.

Troubleshooting

Junie reports the unresolved variable name when a ${VAR} reference has no value in the environment. Export the variable in the shell that starts Junie.
Junie resolves --model before the project trust decision, so a profile in .junie/models/ fails this way on a first run in a new project. Either place the profile at ~/.junie/models/, or start junie once without --model and choose Trust this project. Confirm the filename matches the selector exactly: orq.json is custom:orq.
Check that /model lists the profile after the built-in providers. A profile in .junie/models/ is also skipped for an untrusted project, and one in ~/.junie/models/ is not.
The id must be the provider-prefixed identifier the AI Gateway expects, for example openai/gpt-5.4. The model also has to be enabled for the workspace in AI GatewaySupported Models.
Profiles are read when Junie starts. Restart the CLI after editing the file, or reselect the profile with /model.
Confirm the API key is a valid Orq.ai key and that it is scoped to the workspace holding the models. Keys from other providers are rejected, because the profile sends the value as a Bearer token to the AI Gateway.
Confirm baseUrl matches the apiType pairing used, and that the profile was selected for the session. Traces are scoped to the workspace of the API key, and a new trace takes a few seconds to appear in Traces.

Verification

Run a task in a project, for example junie --model custom:orq "Summarize this repository". The session completes in the terminal, and a new row appears within a few seconds in Traces showing the model identifier from the profile’s id, the token usage, and the tool calls Junie made.