<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.stoney-cloud.com/w/index.php?action=history&amp;feed=atom&amp;title=AI_on_demand%3A_Configuring_OpenCode_Terminal</id>
	<title>AI on demand: Configuring OpenCode Terminal - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.stoney-cloud.com/w/index.php?action=history&amp;feed=atom&amp;title=AI_on_demand%3A_Configuring_OpenCode_Terminal"/>
	<link rel="alternate" type="text/html" href="https://wiki.stoney-cloud.com/w/index.php?title=AI_on_demand:_Configuring_OpenCode_Terminal&amp;action=history"/>
	<updated>2026-11-03T20:40:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://wiki.stoney-cloud.com/w/index.php?title=AI_on_demand:_Configuring_OpenCode_Terminal&amp;diff=1304&amp;oldid=prev</id>
		<title>Sst-pde: /* Overview */</title>
		<link rel="alternate" type="text/html" href="https://wiki.stoney-cloud.com/w/index.php?title=AI_on_demand:_Configuring_OpenCode_Terminal&amp;diff=1304&amp;oldid=prev"/>
		<updated>2026-11-03T15:06:17Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Overview&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:06, 3 November 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://opencode.ai OpenCode] is an open-source AI coding agent, available as a desktop application, in the browser or via the terminal. It supports tool calls, MCP servers, skills, plugins, etc. for software development workflows. OpenCode can be configured to exclusively use AI models hosted by [https://www.stepping-stone.ch/en/products/artificial-intelligence stepping stone AG] via its OpenAI-compatible API.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://opencode.ai OpenCode] is an open-source AI coding agent, available as a desktop application, in the browser or via the terminal. It supports tool calls, MCP servers, skills, plugins, etc. for software development workflows. OpenCode can be configured to exclusively use AI models hosted by [https://www.stepping-stone.ch/en/products/artificial-intelligence stepping stone AG] via its OpenAI-compatible API.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; This guide walks through configuring the terminal variant of OpenCode. If you are looking for guidance on setting up the terminal version of OpenCode, see [[AI on demand: &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Configure &lt;/del&gt;OpenCode Desktop]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; This guide walks through configuring the terminal variant of OpenCode. If you are looking for guidance on setting up the terminal version of OpenCode, see [[AI on demand: &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Configuring &lt;/ins&gt;OpenCode Desktop]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The following steps describe how to create a basic OpenCode setup using models provided by stepping stone AG, and some good first steps to control and extend the agents capabilities.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The following steps describe how to create a basic OpenCode setup using models provided by stepping stone AG, and some good first steps to control and extend the agents capabilities.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mw_3738417_app?h005:diff::1.12:old-1303:rev-1304 --&gt;
&lt;/table&gt;</summary>
		<author><name>Sst-pde</name></author>
	</entry>
	<entry>
		<id>https://wiki.stoney-cloud.com/w/index.php?title=AI_on_demand:_Configuring_OpenCode_Terminal&amp;diff=1303&amp;oldid=prev</id>
		<title>Sst-pde at 15:05, 3 November 2026</title>
		<link rel="alternate" type="text/html" href="https://wiki.stoney-cloud.com/w/index.php?title=AI_on_demand:_Configuring_OpenCode_Terminal&amp;diff=1303&amp;oldid=prev"/>
		<updated>2026-11-03T15:05:58Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:05, 3 November 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://opencode.ai OpenCode] is an open-source AI coding agent, available as a desktop application, in the browser or via the terminal. It supports tool calls, MCP servers, skills, plugins, etc. for software development workflows. OpenCode can be configured to exclusively use AI models hosted by [https://www.stepping-stone.ch/en/products/artificial-intelligence stepping stone AG] via its OpenAI-compatible API.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://opencode.ai OpenCode] is an open-source AI coding agent, available as a desktop application, in the browser or via the terminal. It supports tool calls, MCP servers, skills, plugins, etc. for software development workflows. OpenCode can be configured to exclusively use AI models hosted by [https://www.stepping-stone.ch/en/products/artificial-intelligence stepping stone AG] via its OpenAI-compatible API.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; This guide walks through configuring the terminal variant of OpenCode. If you are looking for guidance on setting up the terminal version of OpenCode, see [[AI on &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Demand&lt;/del&gt;: Configure OpenCode Desktop]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; This guide walks through configuring the terminal variant of OpenCode. If you are looking for guidance on setting up the terminal version of OpenCode, see [[AI on &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;demand&lt;/ins&gt;: Configure OpenCode Desktop]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The following steps describe how to create a basic OpenCode setup using models provided by stepping stone AG, and some good first steps to control and extend the agents capabilities.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The following steps describe how to create a basic OpenCode setup using models provided by stepping stone AG, and some good first steps to control and extend the agents capabilities.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mw_3738417_app?h005:diff::1.12:old-1301:rev-1303 --&gt;
&lt;/table&gt;</summary>
		<author><name>Sst-pde</name></author>
	</entry>
	<entry>
		<id>https://wiki.stoney-cloud.com/w/index.php?title=AI_on_demand:_Configuring_OpenCode_Terminal&amp;diff=1301&amp;oldid=prev</id>
		<title>Sst-pde: Created page with &quot;== Overview ==  [https://opencode.ai OpenCode] is an open-source AI coding agent, available as a desktop application, in the browser or via the terminal. It supports tool calls, MCP servers, skills, plugins, etc. for software development workflows. OpenCode can be configured to exclusively use AI models hosted by [https://www.stepping-stone.ch/en/products/artificial-intelligence stepping stone AG] via its OpenAI-compatible API.  &#039;&#039;&#039;Note:&#039;&#039;&#039; This guide walks through confi...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.stoney-cloud.com/w/index.php?title=AI_on_demand:_Configuring_OpenCode_Terminal&amp;diff=1301&amp;oldid=prev"/>
		<updated>2026-11-03T15:05:33Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Overview ==  [https://opencode.ai OpenCode] is an open-source AI coding agent, available as a desktop application, in the browser or via the terminal. It supports tool calls, MCP servers, skills, plugins, etc. for software development workflows. OpenCode can be configured to exclusively use AI models hosted by [https://www.stepping-stone.ch/en/products/artificial-intelligence stepping stone AG] via its OpenAI-compatible API.  &amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; This guide walks through confi...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[https://opencode.ai OpenCode] is an open-source AI coding agent, available as a desktop application, in the browser or via the terminal. It supports tool calls, MCP servers, skills, plugins, etc. for software development workflows. OpenCode can be configured to exclusively use AI models hosted by [https://www.stepping-stone.ch/en/products/artificial-intelligence stepping stone AG] via its OpenAI-compatible API.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; This guide walks through configuring the terminal variant of OpenCode. If you are looking for guidance on setting up the terminal version of OpenCode, see [[AI on Demand: Configure OpenCode Desktop]]&lt;br /&gt;
&lt;br /&gt;
The following steps describe how to create a basic OpenCode setup using models provided by stepping stone AG, and some good first steps to control and extend the agents capabilities.&lt;br /&gt;
&lt;br /&gt;
{{Note|title=⚠️ Warning|content=Remember that agents such as OpenCode can autonomously perform actions on the system they run, such as reading / editing files, making web requests, executing terminal commands, etc. Agents may also interpret untrusted inputs such as skills or AGENTS.md files as instructions. Consider carefully which actions an agent should be allowed to execute, and whether a container or VM solution may be appropriate to prevent your agent from accessing sensitive information.}}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* A valid [https://www.stepping-stone.ch/en/products/artificial-intelligence AI on Demand] API key.&lt;br /&gt;
* Network access to &amp;lt;code&amp;gt;https://llm.stoney-cloud.com/v1&amp;lt;/code&amp;gt;&lt;br /&gt;
* The ID of the AI models you wish to use with OpenCode (e.g. &lt;br /&gt;
* &amp;#039;&amp;#039;Optional:&amp;#039;&amp;#039; [https://nodejs.org Node.js] 20 or newer if you intend to install opencode via npm.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Use your JavaScript package manager of choice to install the terminal variant of OpenCode:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
npm install -g @opencode/cli&lt;br /&gt;
# or&lt;br /&gt;
bun install -g --trust @opencode/cli&lt;br /&gt;
# or&lt;br /&gt;
brew install anomalyco/tap/opencode-v2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://opencode.ai/v2/docs https://opencode.ai/v2/docs] for further information on how to install OpenCode.&lt;br /&gt;
&lt;br /&gt;
Verify that the installation was successful by starting OpenCode:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
opencode --version&lt;br /&gt;
opencode&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=packed heights=200&amp;gt;&lt;br /&gt;
OpenCode TUI.png|thumb|OpenCode Terminal&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure provider and models ==&lt;br /&gt;
&lt;br /&gt;
To configure stepping stone AG as your provider, you must modify your OpenCode configuration file to include the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;$schema&amp;quot;: &amp;quot;https://opencode.ai/config.json&amp;quot;,&lt;br /&gt;
  &amp;quot;providers&amp;quot;: {&lt;br /&gt;
    &amp;quot;stepping-stone&amp;quot;: {&lt;br /&gt;
      &amp;quot;name&amp;quot;: &amp;quot;stepping stone AG&amp;quot;,&lt;br /&gt;
      &amp;quot;package&amp;quot;: &amp;quot;@opencode/ai/providers/openai-compatible&amp;quot;,&lt;br /&gt;
      &amp;quot;env&amp;quot;: [&amp;quot;STONEY_KEY&amp;quot;],&lt;br /&gt;
      &amp;quot;settings&amp;quot;: {&lt;br /&gt;
        &amp;quot;baseURL&amp;quot;: &amp;quot;https://llm.stoney-cloud.com/v1&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;models&amp;quot;: {}&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Linux machines, the default location of your personal configuration file is &amp;lt;code&amp;gt;~/.config/opencode/opencode.jsonc&amp;lt;/code&amp;gt; or equivalent. See [https://opencode.ai/v2/docs/config/#locations https://opencode.ai/v2/docs/config/#locations] for more information on where to place the configuration file on your system.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; When configuring stepping stone AG as your provider as above, OpenCode expects to find your API key in an environment variable called &amp;lt;code&amp;gt;STONEY_KEY&amp;lt;/code&amp;gt;. Alternatively you may add your key directly to the configuration file by removing the &amp;lt;code&amp;gt;&amp;quot;env&amp;quot;: [&amp;quot;STONEY_KEY&amp;quot;],&amp;lt;/code&amp;gt; line, and adding your key as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
      &amp;quot;settings&amp;quot;: {&lt;br /&gt;
        &amp;quot;baseURL&amp;quot;: &amp;quot;https://llm.stoney-cloud.com/v1&amp;quot;,&lt;br /&gt;
        &amp;quot;apiKey&amp;quot;: &amp;quot;YOUR API KEY GOES HERE&amp;quot;,&lt;br /&gt;
      },&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|title=⚠️ Warning|content=Your API key must be kept secret by you! Be careful where you store your key to prevent it from being stolen or abused by a third party.}}&lt;br /&gt;
&lt;br /&gt;
Next, you should configure at least one model you wish to use with OpenCode. The following is a configuration for the &amp;lt;code&amp;gt;GLM-5.3-Flash&amp;lt;/code&amp;gt; model provided by stepping stone AG:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
      &amp;quot;models&amp;quot;: {&lt;br /&gt;
        &amp;quot;zai-org/GLM-5.3-Flash&amp;quot;: {&lt;br /&gt;
          &amp;quot;name&amp;quot;: &amp;quot;GLM 5.3 Flash&amp;quot;,&lt;br /&gt;
          &amp;quot;limit&amp;quot;: {&lt;br /&gt;
            &amp;quot;context&amp;quot;: 262144,&lt;br /&gt;
          },&lt;br /&gt;
          &amp;quot;cost&amp;quot;: {&lt;br /&gt;
            &amp;quot;input&amp;quot;: 0.3,&lt;br /&gt;
            &amp;quot;output&amp;quot;: 1.5,&lt;br /&gt;
            &amp;quot;cache&amp;quot;: {&lt;br /&gt;
              &amp;quot;read&amp;quot;: 0.045,&lt;br /&gt;
            },&lt;br /&gt;
          },&lt;br /&gt;
        },&lt;br /&gt;
      }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace &amp;lt;code&amp;gt;zai-org/GLM-5.3-Flash&amp;lt;/code&amp;gt; with the ID of the particular model you wish to use, and refer to [https://www.stepping-stone.ch/en/products/artificial-intelligence https://www.stepping-stone.ch/en/products/artificial-intelligence] for pricing and context window limits. Additional model specific configuration can be added as needed. See [https://opencode.ai/v2/docs/models/ https://opencode.ai/v2/docs/models/] for further information on configuring models.&lt;br /&gt;
&lt;br /&gt;
To check if your configuration is correct, restart OpenCode after changing the configuration file. If the configuration is correct, you should be able to select the newly added model hosted by stepping stone AG from the list of available models. You can open a selection of all models available to you via the shortcut &amp;lt;code&amp;gt;CTRL + X&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;m&amp;lt;/code&amp;gt;. You may need to scroll to the end of the displayed list.&lt;br /&gt;
&amp;lt;gallery mode=packed heights=200&amp;gt;&lt;br /&gt;
OpenCode_TUI_Model_selection.png|Model selection menu&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, select the newly added model, then enter a first prompt to test that the model is working correctly.&lt;br /&gt;
&amp;lt;gallery mode=packed heights=200&amp;gt;&lt;br /&gt;
OpenCode_TUI_Initial_prompt.png|Enter an initial prompt&lt;br /&gt;
OpenCode_TUI_Initial_prompt_response.png|Check that you receive a response&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Useful short-cuts and menus ==&lt;br /&gt;
&lt;br /&gt;
The following is a list of useful shortcuts to get started with using OpenCode:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;CTRL + P&amp;lt;/code&amp;gt;: Open the main menu to interact with the agent, manage sessions and MCP servers, configuration, theming, etc.&lt;br /&gt;
* &amp;lt;code&amp;gt;CTRL + X&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt;: Open a fresh session.&lt;br /&gt;
* &amp;lt;code&amp;gt;CTRL + X&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;L&amp;lt;/code&amp;gt;: Switch to another existing session.&lt;br /&gt;
* &amp;lt;code&amp;gt;CTRL + X&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;W&amp;lt;/code&amp;gt;: Close the current session tab.&lt;br /&gt;
* &amp;lt;code&amp;gt;CTRL + X&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;M&amp;lt;/code&amp;gt;: Switch the current model.&lt;br /&gt;
* &amp;lt;code&amp;gt;CTRL + X&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;: Switch the current agent mode.&lt;br /&gt;
* &amp;lt;code&amp;gt;CTRL + X&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;Q&amp;lt;/code&amp;gt;: Quit OpenCode.&lt;br /&gt;
* &amp;lt;code&amp;gt;CTRL + C&amp;lt;/code&amp;gt;: Clear prompt input field.&lt;br /&gt;
&lt;br /&gt;
== Permissions ==&lt;br /&gt;
&lt;br /&gt;
OpenCode provides a built in sandbox to limit what actions an agent is allowed to perform. You can configure permissions via the configuration file (there is currently no option to configure permissions via the user interface). Permissions are defined as a list of rules. For each action (e.g. read/write a file, execute a shell command, etc.), you may define a set of rules, each with a pattern determining when the rule applies, and an effect to determine if the action is allowed, denied or requires explicit approval by the user. The following shows some examples of permission rules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
  &amp;quot;permissions&amp;quot;: [&lt;br /&gt;
    { &amp;quot;action&amp;quot;: &amp;quot;shell&amp;quot;, &amp;quot;resource&amp;quot;: &amp;quot;*&amp;quot;, &amp;quot;effect&amp;quot;: &amp;quot;ask&amp;quot; },&lt;br /&gt;
    { &amp;quot;action&amp;quot;: &amp;quot;shell&amp;quot;, &amp;quot;resource&amp;quot;: &amp;quot;git status *&amp;quot;, &amp;quot;effect&amp;quot;: &amp;quot;allow&amp;quot; },&lt;br /&gt;
    { &amp;quot;action&amp;quot;: &amp;quot;shell&amp;quot;, &amp;quot;resource&amp;quot;: &amp;quot;git push *&amp;quot;, &amp;quot;effect&amp;quot;: &amp;quot;deny&amp;quot; },&lt;br /&gt;
    { &amp;quot;action&amp;quot;: &amp;quot;skill&amp;quot;, &amp;quot;resource&amp;quot;: &amp;quot;*&amp;quot;, &amp;quot;effect&amp;quot;: &amp;quot;allow&amp;quot; },&lt;br /&gt;
    { &amp;quot;action&amp;quot;: &amp;quot;read&amp;quot;, &amp;quot;resource&amp;quot;: &amp;quot;*&amp;quot;, &amp;quot;effect&amp;quot;: &amp;quot;allow&amp;quot; },&lt;br /&gt;
    { &amp;quot;action&amp;quot;: &amp;quot;edit&amp;quot;, &amp;quot;resource&amp;quot;: &amp;quot;*.html&amp;quot;, &amp;quot;effect&amp;quot;: &amp;quot;allow&amp;quot; },&lt;br /&gt;
  ]&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|title=⚠️ Warning|content=Try to keep the permissions you define as restrictive as feasable. In particular, do not allow your agent to perform sensitive or dangerous actions without your explicit approval.}}&lt;br /&gt;
&lt;br /&gt;
{{Note|title=⚠️ Warning|content=While OpenCode provides a sandbox controlled via permissions, you should never rely exclusively on the sandbox to ensure that your agent does not perform dangerous actions or accesses sensitive data. Always exercise good judgement when deciding what your agent should be allowed to do.}}&lt;br /&gt;
&lt;br /&gt;
== Further steps ==&lt;br /&gt;
&lt;br /&gt;
You now have a basic OpenCode agent setup available to you. You may further customise and extend OpenCode in a variety of ways, such as by adding skills, configuring MCP servers or OpenCode plugins.&lt;br /&gt;
&lt;br /&gt;
Check [https://opencode.ai/v2/docs/ https://opencode.ai/v2/docs/] to see how you can extend your configuration file to adapt your agent to your needs.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
* [https://opencode.ai/v2/docs/ OpenCode documentation]&lt;br /&gt;
* [https://opencode.ai/v2/docs/providers OpenCode providers guide]&lt;br /&gt;
* [https://opencode.ai/v2/docs/config OpenCode configuration reference] and [https://opencode.ai/config.json configuration schema]&lt;br /&gt;
* [https://opencode.ai/v2/docs/permissions OpenCode permissions guide]&lt;br /&gt;
* [https://opencode.ai/v2/docs/mcp-servers OpenCode MCP servers guide]&lt;br /&gt;
* [https://modelcontextprotocol.io Model Context Protocol specification]&lt;br /&gt;
* [https://www.stepping-stone.ch/en/products/artificial-intelligence stepping stone AG – Artificial Intelligence]&lt;br /&gt;
* [[AI on Demand: Usage]]&lt;br /&gt;
&lt;br /&gt;
[[Category: AI on Demand]]&lt;br /&gt;
[[Category: OpenCode]]&lt;/div&gt;</summary>
		<author><name>Sst-pde</name></author>
	</entry>
</feed>