Skip to content

Configuration for private deployments ​

A private deployment reads its settings from environment variables in deploy/private.env. configure.py creates that file from the bundle's example with fresh random secrets. You then fill in your own endpoints and sign-in. On the cloud service none of this applies. We run that configuration.

Never put a secret's value anywhere but the server's environment. Settings in the app take only credential references.

Mode and addresses ​

VariableValue
YI_MODEproduction
YI_DEPLOYMENTprivate
YI_OFFLINEtrue for a deployment with no internet access. Requires YI_DEPLOYMENT=private
YI_PUBLIC_URLThe HTTPS address people open, for example https://agent.corp.internal. Production requires HTTPS
YI_ALLOWED_HOSTSHost names the API answers to, comma-separated
YI_DATABASE_URLThe PostgreSQL connection URL. Production requires PostgreSQL. configure.py fills in the bundled database's password
POSTGRES_DB, POSTGRES_USER, POSTGRES_PASSWORDThe bundled database. The password is generated
YI_SESSION_SECRET, YI_TOKEN_SECRETTwo different random values of at least 32 characters. Generated by configure.py. Don't reuse them elsewhere

Sign-in ​

Register a client for Yi Code at your identity provider with the redirect URI YI_PUBLIC_URL followed by /auth/callback, for example https://agent.corp.internal/auth/callback.

VariableValue
YI_OIDC_ISSUERThe provider's issuer URL. Required in production
YI_OIDC_CLIENT_IDThe client ID. Default yi-agent
YI_OIDC_CLIENT_SECRETThe client secret, if the client is confidential
YI_PRIVATE_ORG_IDThe organization everyone in this deployment belongs to, for example customer
YI_OIDC_ROLE_CLAIMThe claim that carries the role. Default org_role. Values are owner, admin or member. Anything else counts as member
YI_OIDC_ORG_ROLEOptional. Gives every user the same role, for a single-team provider. Prefer a signed role claim, and never give every internal user admin
YI_OIDC_ORG_CLAIMIn the example file, default org_id. A private deployment takes the organization from YI_PRIVATE_ORG_ID, so this claim isn't used
YI_OIDC_AUTHORIZATION_MODEuserinfo (default) rechecks membership and role at the provider's userinfo endpoint. login_only checks only at sign-in
YI_AUTHORIZATION_RECHECK_SECONDSHow often the recheck runs, 5 to 300 seconds. Default 60
YI_ORG_ENROLLMENTLeave at invite

Connections ​

VariableValue
YI_GIT_HOSTSGit hosts that projects may use, comma-separated. Default github.com
YI_CONNECTOR_HOSTSHosts allowed for model, knowledge and MCP endpoints, comma-separated. Offline, every endpoint must be on this list
YI_GATEWAY_URLYI_PUBLIC_URL followed by /v1/gateway. Execution hosts send model and tool calls here

Execution ​

VariableValue
YI_RUNTIME_IMAGEThe runtime image, pinned by digest. install.py sets it to the bundled image
YI_MAX_CONCURRENCYTurns running at the same time across the deployment, 1 to 10. Default 10
YI_MAX_RUN_SECONDSUpper limit for a turn in seconds. Default 3600. Ask turns are capped at 900 seconds and Code turns at 3600 within it

Execution hosts are registered as pools of type static, see Private and offline deployment.

Artifact storage ​

VariableValue
YI_ARTIFACT_BACKENDlocal (default) keeps artifacts on the control plane's volume. s3 uses S3-compatible object storage, needed for more than one API replica
YI_ARTIFACT_ENDPOINTThe object storage URL, with s3
YI_ARTIFACT_BUCKETThe bucket, with s3
YI_ARTIFACT_PREFIXKey prefix inside the bucket. Default yi-agent

Keep as shipped ​

DO_NOT_TRACK=1 and LITELLM_LOCAL_MODEL_COST_MAP=True keep the bundled libraries from sending telemetry or fetching data from the internet.

Credential references ​

Fields such as "Credential reference (optional)" or "Git credential reference" take the name of an environment variable on the API server, not the secret. The name must start with your organization's prefix, shown at the end of the "Settings" page after "Your prefix:", for example YI_CREDENTIAL_…_GIT. The deployment administrator sets the value in the server's environment. The database stores only the name, and the app never shows a value.

A reference that has no value on the server is refused when you save it.

Models ​

Administrators add model endpoints in "Settings" under "Model endpoints":

  • "OpenAI-compatible endpoint /v1" and "Deployment name", on a host in YI_CONNECTOR_HOSTS.
  • "Output token parameter": the one the endpoint expects, max_completion_tokens (the default) or max_tokens, which many internal compatible endpoints use.
  • A credential reference, blank for an unauthenticated internal endpoint.
  • Input, cached input and output rates in USD per million tokens. These are what turns are charged.

"Check endpoint" sends a real tool call and checks that the reply reports whole-number token usage. In production a model is offered only after it passes.

The HTTP API ​

The API is what the web app uses. It authenticates with the browser session and requires same-origin requests for changes. A deployment describes its routes in an OpenAPI document at /openapi.json.