Repository navigation
Service: Berget Code Runner
Berget Code Runner (serviceId birme-berget-code-runner) runs headless OpenCode agent sessions backed by Berget AI, a sovereign EU cloud with an OpenAI-compatible API. In Eyevinn Open Source Cloud (OSC) it is a job (one-shot, exits when done), not a long-running service. License: MIT. It is the sibling of Claude Runner and Codex Runner and is used the same way.
- Clone a git repository, run
opencode runnon-interactively with your prompt against it, and exit with the agent's exit code. - Select the model, branch (
#branchsuffix on the URL) and working subdirectory. - Clone private repositories with an access token.
- Stream formatted events (assistant text, tool calls, tool results, step summaries) or raw JSONL to the job logs.
- Give the agent access to the OSC MCP server, and load environment variables from an OSC Application Config Service instance before the agent starts.
Create the job with create-service-instance using serviceId: "birme-berget-code-runner". The name must be alphanumeric and at most 20 characters. Store credentials first with create-service-secret (serviceId birme-berget-code-runner), for example bergetapikey and, for private repositories, gittoken. A {{secrets.NAME}} reference only works when it is the entire field value.
{
"name": "bergetjob",
"BergetApiKey": "{{secrets.bergetapikey}}",
"SourceUrl": "https://github.com/your-org/your-repo#main",
"Prompt": "Add a health check endpoint to the Express app",
"GitToken": "{{secrets.gittoken}}"
}Follow the run with get-logs-for-instance. The runner prints the settings it uses, clones the repository, starts the agent and streams output.
| Option | Required | Type | Meaning |
|---|---|---|---|
| name | Yes | string | Name of the job. Letters, digits and underscore only, at most 20 characters. |
| Prompt | Yes | string | The task the agent performs against the cloned repository. |
| BergetApiKey | Yes | string, sensitive | Berget AI API key used by the OpenCode agent to call the model. Pass as {{secrets.NAME}}. |
| SourceUrl | Yes | string | Git repository URL to clone. Append #branch to check out a branch, for example https://github.com/org/repo#main. |
| Model | No | string | Model to use. Default moonshotai/Kimi-K2.6. Also google/gemma-4-31B-it and mistralai/Mistral-Medium-3.5-128B. |
| GitToken | No | string, sensitive | Personal access token for cloning a private repository. Not needed for public repositories. |
| SubPath | No | string | Subdirectory of the cloned repository to use as the working directory. Default is the repository root. |
| OscAccessToken | No | string, sensitive | OSC access token. If set, the OSC MCP server is made available to the agent. |
| OscMcpUrl | No | string | OSC MCP endpoint. Default https://mcp.osaas.io/mcp. |
| ConfigSvc | No | string | Name of an OSC Application Config Service instance. Requires OscAccessToken. Its parameters are loaded as environment variables before the agent starts. |
| ConfigApiKey | No | string, sensitive | API key for the encrypted parameter store, so secret parameters are decrypted when loaded from ConfigSvc. |
| BergetBaseUrl | No | string | Berget AI API base URL. Default https://api.berget.ai/v1. |
| Verbose | No | string | Default 1: events are formatted into readable output. Set 0 or false for OpenCode plain text output. |
| RawJson | No | string | Set 1 or true to emit raw JSONL events instead of formatted output. |
BergetApiKey, GitToken, OscAccessToken and ConfigApiKey are secrets; store them with create-service-secret and reference them as {{secrets.NAME}}.
The agent follows the standard OpenCode files in the cloned repository: AGENTS.md for project instructions and constraints, and .opencode/ for project-level OpenCode configuration.
- The agent runs with permission prompts disabled and can read and change everything in the cloned repository and run commands in the container. Point it only at repositories and prompts you trust.
- The job clones a shallow, single-branch copy and does not push changes back unless your prompt and token allow it.
- The runner accepts
MAX_TURNS,ALLOWEDTOOLSandDISALLOWEDTOOLSfor compatibility with Claude Runner but ignores them, so they are not offered as options. - A full run with a live Berget key, private repositories, the OSC MCP integration and the config service have not been tested on OSC yet.