Set up Mirror CLI, or another coding agent, with Reflection models and complete a first coding task
This quickstart takes you from an API key to a working Mirror CLI session, and ends with a small task that confirms Mirror can read files, edit code, and run tests with Reflection models.Mirror’s built-in Reflection provider selects its endpoint automatically, so it needs only your API key.If you’d rather use a coding agent you already have, Pi, OpenCode, Hermes Agent, and GitHub Copilot in VS Code also work with Reflection models. Choose its tab under Set up your agent, and configure an OpenAI-compatible Chat Completions provider with these values:
Setting
Value
Base URL
https://api.reflection.ai/openai/v1, the OpenAI-compatible endpoint
Model ID
Beam-1.0-501B-A23B
API key
A Reflection API key, read from the REFLECTION_API_KEY environment variable. GitHub Copilot stores the key in VS Code instead.
Claude Code, Codex, and Cursor can use Beam through Vercel AI Gateway, with an AI Gateway API key instead of a Reflection API key. Run npx vercel ai-gateway setup, then select reflection/beam as the agent’s model. Mirror can use the gateway too, with --api vercel.
Before you start
1
Create an API key
Sign in to the Reflection platform, open API Keys, and create a key. The full key is shown only once, so copy it now. Export it in the shell you start your agent from, or add the line to your shell profile:
The response lists Beam-1.0-501B-A23B. If you get a 401 instead, see 401 Unauthorized.
3
Create a sample project
Each guide uses the same first task: fixing a failing test in a small Python project. Create the project now; you need Python 3 and Git with your commit identity configured.
python3 -m unittest fails with AssertionError: 3.0 != 4.
Set up your agent
Mirror CLI
Pi
OpenCode
Hermes Agent
GitHub Copilot
Mirror CLI is Reflection’s coding agent for the terminal. It uses Reflection and Beam-1.0-501B-A23B by default, so connecting it takes only an API key.
Install Mirror CLI
Mirror CLI runs on macOS 14 or later on Apple Silicon, and on Linux with glibc 2.28 or later on x86-64 or ARM64. Git or Jujutsu is needed for worktree management; you can start a session in a plain directory without either. Native Windows isn’t supported.Install uv if you don’t already have it, then install Mirror CLI:
uv tool install reflection-mirror
If your shell can’t find mirror after installing, run uv tool update-shell and open a new terminal.To check for an update, run mirror update in a terminal and accept the installation prompt. You can also upgrade the installed tool with uv tool upgrade reflection-mirror.
Connect Mirror CLI to Reflection
1
Start Mirror CLI
Run mirror in the sample project directory, stats-demo. The first time, Mirror CLI shows a Using Mirror notice. In each new directory, it then asks Continue and trust this folder? [y/N]; type y and press Enter to continue.If you’ve used Mirror CLI with another provider, run /model reflection once it starts. Mirror CLI remembers that choice. mirror --api reflection --model Beam-1.0-501B-A23B selects Reflection for that launch only.If REFLECTION_API_KEY is set or a saved Reflection key is available, Mirror CLI opens the prompt and you can skip the next step. An environment key takes precedence over the saved key.
2
Paste your API key
Without an environment key or a saved key, Mirror CLI opens a Connect to Reflection screen with a link to create one:
The Connect to Reflection screen, with a link to create an API key.
Paste your key at the API key › prompt and press Enter. The input is masked, with one * for each character. Mirror CLI saves the key to ~/.mirror/reflection_api_key, readable only by your user, and uses it in later sessions. It doesn’t check the key when it saves it; if the key is wrong, requests fail with 401, and /logout removes the saved key so you can paste another. Press Ctrl+C to cancel without saving.Like other local credentials, the saved key can be read by any command that runs as your user.
3
Check the model
The welcome screen shows Beam-1.0-501B-A23B next to model.
The welcome screen after connecting, with the model above the prompt.
Run a first task in Mirror CLI
With Mirror open in the sample project directory, enter:
Run the tests with python3 -m unittest, find and fix the bug, then run the tests again to confirm they pass.
Mirror CLI asks before it runs shell commands, including ones that only read files, and before it edits files. Press 1 or Enter to approve each one. It shows tool activity as it works. When it’s done, use /quit to return to your shell.Review what Mirror CLI reports. The intended fix replaces len(nums) + 1 with len(nums) in stats.py. Confirm the result yourself:
python3 -m unittestgit diff
The expected result is passing tests and this one-line change to stats.py:
The model can take a different path to the same fix, for example by editing the file with a shell command instead of an edit tool.
Enable web search in Mirror CLI (optional)
Mirror uses You.com for web search and page reading by default. You can choose Tavily or Firecrawl instead with /web-provider. This choice is separate from your model provider.
Web provider
Environment variable
Selection
You.com (default)
YOU_API_KEY
/web-provider you
Tavily
TAVILY_API_KEY
/web-provider tavily
Firecrawl
FIRECRAWL_API_KEY
/web-provider firecrawl
1
Get a web provider API key
Create an account with your chosen provider and copy its API key. You only need a key for the provider you use.
2
Export the key and start Mirror
For You.com, replace the placeholder with your API key and run these commands in the same terminal:
export YOU_API_KEY="YOUR_API_KEY"mirror
For Tavily or Firecrawl, export TAVILY_API_KEY or FIRECRAWL_API_KEY instead. If Mirror is already running, exit and restart it from this terminal so it picks up the key.
3
Choose your provider
Run /web-provider to open the picker, which shows whether each provider’s key is set. Choose the provider whose key you exported. Exporting a key alone doesn’t select that provider.Mirror saves the choice as web_provider in ~/.mirror/config.json and applies it to subsequent tool calls. Calls already running finish with their original provider. Without a saved choice, Mirror uses You.com.
4
Ask Mirror to search
Enter a prompt that asks for a web search, for example:
Search the web for the official Python asyncio TaskGroup documentation and summarize how it handles exceptions. Include links to your sources.
Keep the key for future sessions: Add the export line to your shell profile, such as ~/.zshrc for zsh. Open a new terminal before starting Mirror. Keep keys out of project files and config.json.
Use the right key: Web provider keys are separate from your REFLECTION_API_KEY.
Skip search setup: You can use Mirror for coding tasks without a web provider key. Web search and page reading are available when the selected provider’s key is set. Mirror doesn’t fall back to another provider if a call fails.
Sessions and permissions in Mirror CLI
Steer the agent. Type while it works to add instructions, and press Escape to stop the current turn. Type / to browse commands.
Pick up earlier work./resume reopens a saved conversation and /clear starts a fresh one. mirror --continue resumes where you left off.
Change the model./model switches models and providers, and Mirror CLI remembers the choice. /effort sets the reasoning effort; the default is max unless the workspace has a saved effort.
Work in parallel./worktree <name> creates a workspace with its own agent from the remote’s default branch, preferring origin or the sole remote. If fetching fails, it uses the cached default or local committed revision. Your current edits aren’t copied. Switch workspaces with Tab and Shift+Tab.
Approve tool calls. By default, Mirror CLI asks before shell commands, including ones that only read files such as ls, and before file writes and edits. Built-in file reading and searching don’t need approval. Press 1 or Enter to approve, or 2 to reject. To approve routine tool calls automatically, press F2, use /approvals, or start Mirror CLI with --approval-mode auto. Tools that require explicit confirmation still ask. Each workspace keeps its approval mode. Tools run locally with your account’s permissions; approval isn’t a sandbox.
"$REFLECTION_API_KEY" reads the key from your environment, so the key isn’t stored in the file. Keep the $: without it, Pi sends the text REFLECTION_API_KEY as the key.
contextWindow and maxTokens set the context window and max output. Without them, Pi assumes smaller defaults for a model it doesn’t know.
"reasoning": true makes Pi send a reasoning effort with each request, from its thinking level. thinkingLevelMap limits Pi’s thinking levels to the ones the API accepts: low, medium, high, xhigh, and max. With this map, Pi sends low for its off and minimal levels.
2
Make Reflection the default model
Save this as ~/.pi/agent/settings.json, or add the keys to your existing settings:
To skip this step, start Pi with pi --model reflection/Beam-1.0-501B-A23B:high instead.
3
Check the model
pi --list-models reflection
The list includes Beam-1.0-501B-A23B. If Pi prints No models available, REFLECTION_API_KEY isn’t set in this shell; export it and run the command again.
Run a first task in Pi
From the sample project, run:
pi -p "Run the tests with python3 -m unittest, find and fix the bug, then run the tests again to confirm they pass."
-p runs one prompt, prints the final answer, and exits.Review what Pi reports. The intended fix replaces len(nums) + 1 with len(nums) in stats.py. Confirm the result yourself:
python3 -m unittestgit diff
The expected result is passing tests and this one-line change to stats.py:
The model can take a different path to the same fix, for example by editing the file with a shell command instead of an edit tool.
Sessions and permissions in Pi
Start a session. Run pi in your project to open the interactive interface. The first interactive start downloads fd and ripgrep into ~/.pi/agent/bin unless they’re already on your PATH. pi -p "<prompt>" runs one prompt and exits.
Resume.pi -c continues the most recent session in the current directory, or starts a new one without notice if there isn’t one. pi -r or /resume picks an earlier session, and /new starts a fresh one.
Choose the model and thinking level./model switches models. /thinking or --thinking low|medium|high|xhigh|max sets the reasoning effort.
Stop. Press Esc to stop the current task, or Ctrl+C twice to exit.
Permissions. Pi doesn’t ask for approval before it runs a tool. Limit the tools it can use with --tools, for example --tools read,grep, or run it in a container or VM. See Pi’s security notes.
Known issues with Pi
The model sometimes calls a Pi tool without its required arguments, for example edit without path. Pi rejects the call and the model retries. Tasks still complete, but can take longer.
In scripts, pi -p can wait for input when standard input is an open pipe. Redirect it: pi -p "<prompt>" </dev/null.
The older package, @mariozechner/pi-coding-agent, is deprecated. If pi --version shows 0.73 or earlier, install @earendil-works/pi-coding-agent.
If every request in a session fails with Missing required parameter: 'messages[N].reasoning_content', start a new session with /new. See Troubleshooting.
OpenCode is an open-source coding agent for the terminal. These steps are for OpenCode 2 and were tested with OpenCode 2.0.30.
Install OpenCode
OpenCode runs on macOS, Linux, and Windows. These steps use a Unix shell; on Windows, run them in WSL. Install OpenCode 2 with any of the upstream methods:
curl -fsSL https://opencode.ai/v2/install | bash
npm install -g @opencode/cli
brew install anomalyco/tap/opencode-v2
The install script adds ~/.opencode/bin to PATH in your shell profile. If it prints No config file found, add that directory to PATH yourself. Open a new terminal, then run opencode --version to confirm the install. It prints the version, for example opencode v2.0.30.Recent npm versions can warn that the @opencode/cli install script isn’t covered by allowScripts. The install still works; opencode --version confirms it.OpenCode 1 and OpenCode 2 both install the opencode command. If you have OpenCode 1 from npm (opencode-ai) or Homebrew (anomalyco/tap/opencode), uninstall it first; the install script replaces an OpenCode 1 binary that the script installed. See Migrate from V1.
Connect OpenCode to Reflection
1
Add Reflection as a provider
Save this as opencode.json in your project root, or as ~/.config/opencode/opencode.json to use it in every project:
env names the environment variable that holds your key, so the key isn’t stored in the file. model makes Reflection the default; without it, OpenCode can start on another provider’s model.OpenCode doesn’t read model details from the API, so the model entry describes Beam:
capabilities declares the model as text-only, because the API accepts text input only. When you attach an image or PDF, or a tool reads one, OpenCode sends the model a note that it can’t read the file instead of the file itself. Without capabilities, OpenCode assumes the model accepts images.
limit sets the context window and max output. OpenCode sends limit.output as max_completion_tokens, and compacts a session when it nears limit.context. Without limit, OpenCode assumes a 200,000-token context window and caps output at 32,000 tokens.
variants lists the reasoning efforts you can choose. OpenCode offers low, medium, and high on its own, but a variants list replaces them, so the list includes all five.
OpenCode reads the model’s reasoning from reasoning_content and sends it back in multi-turn conversations and tool calls without further configuration.If you set up OpenCode 1 with an earlier version of this guide, replace that configuration with this one. OpenCode 2 still reads the old format, but its variants hide low, medium, and high.
2
Check the model
opencode models | grep reflection
The output is reflection/Beam-1.0-501B-A23B. This confirms the configuration loaded; it doesn’t check your key.OpenCode 2 runs sessions in a background service, which the first opencode command starts. The service reads REFLECTION_API_KEY from the shell that started it. If OpenCode was already running before you exported the key, or you change the key, restart the service from a shell where the key is set:
opencode service restart
Run a first task in OpenCode
From the sample project, run:
opencode run "Run the tests with python3 -m unittest, find and fix the bug, then run the tests again to confirm they pass."
The output starts with > build · Beam-1.0-501B-A23B, which confirms the model in use.Review what OpenCode reports. The intended fix replaces len(nums) + 1 with len(nums) in stats.py. Confirm the result yourself:
python3 -m unittestgit diff
The expected result is passing tests and this one-line change to stats.py:
The model can take a different path to the same fix, for example by editing the file with a shell command instead of an edit tool.
Sessions and permissions in OpenCode
Start a session. Run opencode in your project to open the interactive interface. opencode run "<prompt>" runs one prompt and exits.
Resume. In the interface, /sessions lists earlier sessions and /new starts a fresh one. From the command line, opencode run -c "<prompt>" continues the last session, and -s <session ID> continues a specific one. opencode session list shows session IDs.
Choose the model./models switches models in the interface; -m reflection/Beam-1.0-501B-A23B sets it for one run.
Choose a reasoning effort. Press Ctrl+T in the interface to cycle through low, medium, high, xhigh, and max, then back to the default, or run /effort to pick one. For one run, add the effort to the model after #: opencode run -m reflection/Beam-1.0-501B-A23B#high "<prompt>". Without an effort, the model uses its default effort.
Show reasoning. The model’s reasoning is kept with the session. Add --thinking to opencode run to print it.
Stop. Press Esc twice to interrupt the current response, and use /exit to quit.
Permissions. OpenCode allows tool calls by default, including reading files outside the project directory. To require approval in the interactive interface, add a permissions list to opencode.json:
The last matching rule wins. external_directory asks before the agent reads or edits files outside the project. Deny execute: through it, the model can call OpenCode’s local server, and it can run commands and change files that way without the shell and edit rules applying. Denying edit alone doesn’t stop file changes through shell, so restrict shell too, or run OpenCode in a container.opencode run can’t prompt, so it rejects each tool call set to ask, and the model continues without it. The run still exits with status 0, so check git diff to see what changed. Add --auto to approve everything that isn’t set to deny. See Permissions.
Known issues with OpenCode
OpenCode lists models from other providers, including free OpenCode Zen models even with no other API keys set. Without "model" in the config, or if it doesn’t match reflection/Beam-1.0-501B-A23B exactly, including capitalization, OpenCode starts on one of them without an error. Check that opencode run output names Beam-1.0-501B-A23B.
The background service keeps the environment it started with. If requests fail with Provide an API key or Playground credential in the Authorization header although REFLECTION_API_KEY is set in your shell, run opencode service restart from that shell. In scripts and CI, add --standalone to opencode run to use a private server that reads the current environment.
In scripts, opencode run waits for standard input to close when it’s an open pipe. Redirect it: opencode run "<prompt>" </dev/null.
With shell and edit set to ask, the model can still run commands and change files through the execute tool, which can call OpenCode’s own local server. Deny execute as shown in Sessions and permissions.
If a run fails with Missing required parameter: 'messages[N].reasoning_content', the session can’t continue. Check git diff, then start a new session: opencode run without -c, or /new in the interface. See Troubleshooting.
Hermes Agent is an open-source agent by Nous Research that runs in the terminal. These steps were tested with Hermes Agent v0.22.2; the install script installs the latest release, which can be newer.
Install Hermes Agent
Hermes Agent runs on macOS, Linux, and WSL2, and upstream also provides a native Windows installer. Install it with the upstream script:
The script installs its own Python, Node.js, and other tools (about 2.4 GB) and adds hermes to your PATH in your shell profile files. --skip-setup skips the hermes setup wizard, whose default choice signs in to a different provider, and the background gateway service that the script otherwise installs and starts on macOS without asking. The next step configures the model. Open a new terminal, or source your shell profile, so that hermes is on your PATH.The Windows installer starts the hermes setup wizard; press Ctrl+C to exit it. If you installed without --skip-setup on macOS, run hermes gateway uninstall to remove the background service.
Connect Hermes to Reflection
1
Set Reflection as the model provider
hermes config set model.provider customhermes config set model.base_url https://api.reflection.ai/openai/v1hermes config set model.default Beam-1.0-501B-A23Bhermes config set model.key_env REFLECTION_API_KEYhermes config set model.reasoning_echo truehermes config set auxiliary.title_generation.model_upgrade_enabled falsehermes config set auth.adopt_external_logins false
These update ~/.hermes/config.yaml in place. The installer creates that file with many other settings, including a model section, so use the commands rather than pasting these keys into it. A second model section makes the file invalid, and Hermes then ignores all of your settings. After the commands, the file contains:
key_env makes Hermes read the key from REFLECTION_API_KEY at startup, so the key isn’t stored in the file. Hermes ignores OPENAI_BASE_URL for a custom provider, so set the base URL here.reasoning_echo keeps a session working when the model returns a tool call without reasoning. Hermes sends each earlier assistant turn back with its reasoning_content, as described in Reasoning. By default, a turn that has no reasoning goes back without that field, and every later request in the session then fails with 400 missing_required_parameter. With reasoning_echo: true, Hermes sends a placeholder for that turn instead. See Troubleshooting.model_upgrade_enabled: false names each session with text from your messages instead of a separate model request. Hermes sends that request with reasoning turned off, and Beam-1.0-501B-A23B always reasons, so it rejects the request, as described in Reasoning. Hermes then retries, but a one-shot run often exits before the retry finishes and prints Auxiliary title generation failed: Connection error.adopt_external_logins: false stops Hermes from reading sign-ins from other coding tools installed on your machine, so it uses only your Reflection key. With the default, true, each interactive start on macOS reads the Claude Code-credentials Keychain item, and Hermes can also read the Codex CLI login.
2
Check the connection
hermes chat --oneshot -q "Reply with exactly: pong"
Hermes shows the model’s reasoning, then replies pong.
Run a first task in Hermes
From the sample project, run:
hermes chat --oneshot -q "Read this repository, run the tests with python3 -m unittest, find and fix the bug, then run the tests again to confirm they pass."
Hermes shows each tool call and an inline diff of its edit as it works.Review what Hermes reports. The intended fix replaces len(nums) + 1 with len(nums) in stats.py. Confirm the result yourself:
python3 -m unittestgit diff
The expected result is passing tests and this one-line change to stats.py:
The model can take a different path to the same fix, for example by editing the file with a shell command instead of an edit tool.
Sessions and permissions in Hermes
Start a session. Run hermes to open the interactive interface. hermes chat --oneshot -q "<prompt>" runs one prompt and exits. Without --oneshot, -q in a terminal starts an interactive session with that prompt.
Resume. Hermes prints resume commands when a session ends, such as hermes -c "<session title>". hermes --resume latest continues the last session, and hermes --resume <session ID> continues a specific one.
Stop. Press Ctrl+C to interrupt the current turn. At an idle prompt, Ctrl+C clears your draft, or exits if the draft is empty. /stop doesn’t stop the turn; it stops background processes that the agent started. /quit exits.
Show reasoning. Hermes shows the model’s reasoning by default. Use /reasoning hide to turn it off and /reasoning show to turn it back on; Hermes saves the setting in config.yaml.
Approvals. Hermes asks before running commands it considers risky. approvals.mode in config.yaml sets this to smart (the default), manual, or off. In smart mode, a model request decides whether to approve a flagged command, block it, or ask you, so flagged commands can run without asking, including destructive ones such as rm -rf .git. To review every flagged command yourself, run hermes config set approvals.mode manual. One-shot runs, with --oneshot or outside a terminal, deny risky commands instead of asking, but this isn’t a sandbox: the model can reach the same result another way, for example by writing and running a script. See the Hermes Agent documentation for details.
Known issues with Hermes
Hermes uses a secondary model for tasks such as risk scoring for approvals and summarizing long conversations. By default it uses your main model, so these requests also go to Reflection.
Background review is on by default. Every 10 turns by default, Hermes sends the conversation to the model again in the background and can save skills and memories from it. To turn it off, run hermes config set auxiliary.background_review.enabled false.
Requests that include an image, such as Hermes’s image analysis, fail with 400 invalid_value, because the API accepts text input only.
If Hermes prints Auxiliary title generation failed, check that hermes config get auxiliary.title_generation.model_upgrade_enabled prints false. The warning doesn’t affect the task.
Occasionally a turn ends with raw tool-call text in place of an answer, and the requested change isn’t made. Check git diff, and run the prompt again.
On first use, Hermes downloads some of its own tools, such as language servers. This needs access to GitHub, PyPI, and npm, but doesn’t send your conversation anywhere. At startup, Hermes also contacts models.dev for model details, and checks GitHub (api.github.com and github.com) for updates once a day, using GITHUB_TOKEN, GH_TOKEN, or your GitHub CLI login if you have one. To turn the update check off, run hermes config set updates.check false.
GitHub Copilot in Visual Studio Code can use your own model provider for its chat and agent. These steps were tested with VS Code 1.146.You need:
VS Code 1.146 or later, signed in to GitHub Copilot. There’s nothing else to install.
A Copilot account that’s allowed to add custom models with your own API key. On Copilot Business and Copilot Enterprise, organization admins can turn this off.
Connect GitHub Copilot to Reflection
1
Add Reflection as a model provider
In VS Code, open the Command Palette and run Chat: Manage Language Models. Select Add Models, then Custom Endpoint, and answer the prompts:
The group in your file also has an apiKey line, which VS Code added and which refers to the stored key. Leave it as it is, and don’t type the key into the file. Copilot can’t read the key from an environment variable, so it doesn’t use REFLECTION_API_KEY. To change the key later, use Update API Key on the Reflection group in Chat: Manage Language Models.Copilot doesn’t read model details from the API, so the model entry describes Beam:
url is the OpenAI-compatible base URL. Copilot adds /chat/completions itself.
toolCalling lets Copilot’s agent read files, edit code, and run commands with the model.
thinking is required. With it, Copilot sends the model’s reasoning back with each earlier assistant turn, as described in Reasoning. Without it, the request after the model’s first tool call fails with 400 missing_required_parameter. See Troubleshooting.
maxOutputTokens is the max output, 128K tokens. maxInputTokens is the 1M-token context window minus that, because the context window counts the prompt and the output together.
Run a first task in GitHub Copilot
Open the sample project folder in VS Code. In the Chat view, choose Beam-1.0-501B-A23B in the model picker and Agent in the mode picker, then enter:
Run the tests with python3 -m unittest, find and fix the bug, then run the tests again to confirm they pass.
Review what GitHub Copilot reports. The intended fix replaces len(nums) + 1 with len(nums) in stats.py. Confirm the result yourself:
python3 -m unittestgit diff
The expected result is passing tests and this one-line change to stats.py:
The model can take a different path to the same fix, for example by editing the file with a shell command instead of an edit tool.
Known issues with GitHub Copilot
If thinking isn’t true for the model, the session fails after the first tool call with Missing required parameter: 'messages[N].reasoning_content', and Copilot shows “Sorry, your request failed”, saying it retried 5 times. Set "thinking": true in chatLanguageModels.json, then start a new chat. See Troubleshooting.
Copilot sends some extra fields of its own with each request. The API ignores them, and they don’t affect the task.
Limits
For Pi, OpenCode, Hermes, and GitHub Copilot, configure an OpenAI-compatible Chat Completions provider. The public API supports Chat Completions and Models, not the OpenAI Responses API. Mirror uses its built-in Reflection provider. See OpenAI compatibility.
Coding agents can send many model requests while completing a task. These count toward your organization’s rate limits like any other request.
Troubleshooting
401 Unauthorized
The API key is missing, malformed, or not valid. Check that REFLECTION_API_KEY is exported in the shell you started the agent from: run the key check in that shell. If you added the export to your shell profile, open a new terminal or source the profile. See Authentication.If Mirror uses a saved key that’s wrong, run /logout and paste a new key. If Pi prints No models available or No API key found, or OpenCode prints Provide an API key or Playground credential in the Authorization header, REFLECTION_API_KEY isn’t set in that shell. For OpenCode, it can instead be missing from the background service: run opencode service restart from a shell where the key is set. OpenCode reports a wrong key as Incorrect API key provided, without the status code. Hermes shows the same message when the key is unset, and suggests hermes setup; ignore that, because the Hermes guide reads the key through key_env instead. ~/.hermes/logs/errors.log says when REFLECTION_API_KEY is empty or unset. In GitHub Copilot, re-enter the key with Update API Key in Chat: Manage Language Models; Copilot doesn’t read REFLECTION_API_KEY.
404 or model not found
Check that the model ID is exactly Beam-1.0-501B-A23B, including capitalization. OpenCode reports a wrong ID as The model [<ID>] you requested is unavailable.
In Pi, OpenCode, Hermes, or GitHub Copilot, check that the base URL is https://api.reflection.ai/openai/v1, ending in /openai/v1 with no trailing path such as /chat/completions. The agent adds that path itself. With a trailing path, OpenCode prints Provider request failed with HTTP 404: 404 page not found.
In Mirror, run /model and select Reflection API, its built-in Reflection provider, or run /model reflection. You do not set a base URL for that provider.
429 Too Many Requests
A rate limit was exceeded. Wait and retry the task, or run fewer agent sessions at once. See Rate limits.
Timeouts or 502 and 503 errors
Reasoning on a large task can take a while before the first output appears. If requests fail with 502 or 503, or time out repeatedly, retry the task. See Errors.
400: Missing required parameter reasoning_content
Every request in a session fails with 400 missing_required_parameter:
Missing required parameter: 'messages[N].reasoning_content'. This model needs the reasoning of every earlier assistant message: send back the 'reasoning_content' returned with that message. If 'reasoning_content' is not available, consider starting a new session or conversation history.
The model sometimes returns a tool-call step without reasoning. An agent that sends that step back without reasoning_content gets this error on every later request in the session. If the agent can send custom request headers, set Reflection-Missing-Reasoning-Strategy: auto to have the API accept such steps. Otherwise, start a new session: /clear in Mirror, /new in Pi, or opencode run without -c in OpenCode. In Hermes, check that hermes config get model.reasoning_echo prints true. In GitHub Copilot, check that thinking is true for the model in chatLanguageModels.json, then start a new chat.
The agent uses a different model
Check the model name the agent prints when it starts.
In Mirror, use /model reflection to change the saved model selection. Launching with mirror --api reflection --model Beam-1.0-501B-A23B uses it for that launch only.
In Pi, OpenCode, or Hermes, check the default provider and model in the configuration shown in its guide.
In GitHub Copilot, check the model picker in the Chat view.
Share feedback
For Mirror CLI, open the GitHub feedback form. Review your report before submitting and remove private information from any attached logs. See reporting a bug.If a guide on this page doesn’t work for you, keep a note of the agent and its version, your operating system, the command you ran, and the error message. Leave out your API key.
Last modified on November 19, 2026
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Reflection Developer Docs","colors":{"primary":"#1e3207","light":"#bdc8b5","dark":"#1e3207"},"logo":{"light":"https://mintcdn.com/reflection-ai/QTuxzl6PxhZZjLhq/logo/light.svg?fit=max\u0026auto=format\u0026n=QTuxzl6PxhZZjLhq\u0026q=85\u0026s=58c942f905cb3bd4c0a14b113a3aee89","dark":"https://mintcdn.com/reflection-ai/QTuxzl6PxhZZjLhq/logo/dark.svg?fit=max\u0026auto=format\u0026n=QTuxzl6PxhZZjLhq\u0026q=85\u0026s=72f108f3de1233371ba966d2f4ff3754"},"favicon":{"light":"https://mintcdn.com/reflection-ai/JsnqP0KHndVcbl2Y/favicon-light.svg?fit=max\u0026auto=format\u0026n=JsnqP0KHndVcbl2Y\u0026q=85\u0026s=d06a05d3592404faa659b9776f0c897e","dark":"https://mintcdn.com/reflection-ai/JsnqP0KHndVcbl2Y/favicon-dark.svg?fit=max\u0026auto=format\u0026n=JsnqP0KHndVcbl2Y\u0026q=85\u0026s=890ef9e453a694b505f70db674199964"},"api":{"playground":{"display":"interactive"},"examples":{"languages":["curl","python","javascript"]}},"background":{"color":{"light":"#f8f6f0","dark":"#1a1b1a"}},"navbar":{"links":[{"href":"https://platform.reflection.ai","label":"Platform"},{"href":"https://status.reflection.ai","label":"Status"}],"primary":{"type":"button","label":"Get an API key","href":"https://platform.reflection.ai/api-keys"}},"footer":{"socials":{"github":"https://github.com/reflection-oss","discord":"https://discord.gg/GyNwCVQf6U"}},"fonts":{"heading":{"family":"NaN Serf Sans","weight":600,"source":"fonts/nan-serf-sans-600.woff2","format":"woff2"},"body":{"family":"Reflection Inter","source":"fonts/inter-400.woff2","format":"woff2"}},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":{"light":"vitesse-light","dark":"vitesse-dark"}},"latex":false},"banner":{"content":"Beam 1.0 is out, with open weights, the Reflection API, and Mirror CLI (beta). [Read the announcement](https://reflection.ai/blog/beam-is-available)","dismissible":true},"errors":{"404":{"redirect":false,"title":"Page not found","description":"This page may have moved. Search the docs, or start from the [home page](/introduction), the [API quickstart](/quickstart), or the [Mirror quickstart](/coding-agents-quickstart)."}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"thumbnails":{"preset":"headline","surface":"brand","fonts":{"family":"NaN Serf Sans","source":"fonts/nan-serf-sans-600.woff","format":"woff"},"eyebrow":{"source":"tab","style":"bar","color":"#1e3207"}},"metadata":{"timestamp":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"reflection-ai","hasAudioNarration":false,"actualSubdomain":"reflection-ai","customDomains":["developers.reflection.ai"],"gitSource":{"type":"github","owner":"reflectionai","repo":"developer-docs-web","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6afe4ffa10e1e2399676d0f5","clientVersion":"0.0.4227","searchFilterCounts":[{"language":"default","tag":"API","count":17},{"language":"default","tag":"Deployment","count":14},{"language":"default","tag":"Customization","count":13},{"language":"default","tag":"Self-hosting","count":11},{"language":"default","tag":"Guides","count":10},{"language":"default","tag":"Get started","count":8},{"language":"default","tag":"Mirror","count":8},{"language":"default","tag":"Supervised fine-tuning","count":7},{"language":"default","tag":"Integration stacks","count":7},{"language":"default","tag":"Safety","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[],"googleFontsInlined":false},"customCss":[{"filePath":"fonts.css","content":"@font-face{font-family:\"Reflection Inter\";font-style:normal;font-weight:500;font-display:swap;src:url(\"/fonts/inter-500.woff2\") format(\"woff2\")}@font-face{font-family:\"Reflection Inter\";font-style:normal;font-weight:600;font-display:swap;src:url(\"/fonts/inter-600.woff2\") format(\"woff2\")}@font-face{font-family:\"NaN Serf Sans\";font-style:normal;font-weight:500;font-display:swap;src:url(\"/fonts/nan-serf-sans-500.woff2\") format(\"woff2\")}"},{"filePath":"callout-tables.css","content":"#content-area [data-component-part=\"callout-content\"]>[data-component-part=\"scroll-area\"]:first-child{margin-top:0!important;padding-top:0!important}#content-area [data-component-part=\"callout-content\"]>[data-component-part=\"scroll-area\"]:last-child{margin-bottom:0!important;padding-bottom:0!important}#content-area thead:not(:has(th:not(:empty))){display:none}"},{"filePath":"code-links.css","content":"#content-area a.link:has(>code){border-bottom-width:0!important}#content-area a.link>code{text-decoration-line:underline!important;text-decoration-thickness:1px!important;text-decoration-color:rgb(var(--primary))!important;text-underline-offset:3px!important}.dark #content-area a.link>code{text-decoration-color:rgb(var(--primary-light))!important}#content-area [data-component-part=\"callout-content\"] a.link>code{text-decoration-color:currentcolor!important}"}]}
{"page":{"pagePath":"coding-agents-quickstart","slug":"/coding-agents-quickstart","pageMetadata":{"title":"Mirror CLI quickstart","sidebarTitle":"Quickstart","tag":"Beta","description":"Set up Mirror CLI, or another coding agent, with Reflection models and complete a first coding task","href":"/coding-agents-quickstart"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Set up Mirror CLI, or another coding agent, with Reflection models and complete a first coding task\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const agent_4=`GitHub Copilot`;const agent_3=`Hermes`;const agent_2=`OpenCode`;const agent_1=`Pi`;const agent_0=`Mirror CLI`;function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,CodeBlock,CodeGroup,Frame,Heading,OptimizedImage,Step,Steps,Tab,Table,Tabs,Tip}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This quickstart takes you from an API key to a working Mirror CLI session, and ends with a small task that confirms Mirror can read files, edit code, and run tests with Reflection models.`}),`\n`,_jsx(_components.p,{children:`Mirror’s built-in Reflection provider selects its endpoint automatically, so it needs only your API key.`}),`\n`,_jsxs(_components.p,{children:[`If you’d rather use a coding agent you already have, Pi, OpenCode, Hermes Agent, and GitHub Copilot in VS Code also work with Reflection models. Choose its tab under `,_jsx(_components.a,{href:`#set-up-your-agent`,children:`Set up your agent`}),`, and configure an OpenAI-compatible Chat Completions provider with these values:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Setting`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Base URL`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`https://api.reflection.ai/openai/v1`}),`, the OpenAI-compatible endpoint`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Model ID`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Beam-1.0-501B-A23B`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`API key`}),_jsxs(_components.td,{children:[`A `,_jsx(_components.a,{href:`/authentication`,children:`Reflection API key`}),`, read from the `,_jsx(_components.code,{children:`REFLECTION_API_KEY`}),` environment variable. GitHub Copilot stores the key in VS Code instead.`]})]})]})]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Claude Code, Codex, and Cursor can use Beam through `,_jsx(_components.a,{href:`/third-party-providers#vercel-ai-gateway`,children:`Vercel AI Gateway`}),`, with an AI Gateway API key instead of a Reflection API key. Run `,_jsx(_components.code,{children:`npx vercel ai-gateway setup`}),`, then select `,_jsx(_components.code,{children:`reflection/beam`}),` as the agent’s model. Mirror can use the gateway too, with `,_jsx(_components.a,{href:`/mirror-models#vercel-ai-gateway`,children:_jsx(_components.code,{children:`--api vercel`})}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`before-you-start`,children:`Before you start`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Create an API key`,id:`create-an-api-key`,children:[_jsxs(_components.p,{children:[`Sign in to the `,_jsx(_components.a,{href:`https://platform.reflection.ai`,children:`Reflection platform`}),`, open `,_jsx(_components.strong,{children:`API Keys`}),`, and create a key. The full key is shown only once, so copy it now. Export it in the shell you start your agent from, or add the line to your shell profile:`]}),_jsx(CodeBlock,{filename:``,icon:`terminal`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1E754F`,\"--shiki-dark\":`#4D9375`},children:`export`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` REFLECTION_API_KEY=`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`\"\u003cyour API key>\"`})]}),`\n`]})})})]}),_jsxs(Step,{title:`Check the key`,id:`check-the-key`,children:[_jsx(_components.p,{children:`List the models your key can use:`}),_jsx(CodeBlock,{filename:``,icon:`terminal`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`curl`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` https://api.reflection.ai/openai/v1/models \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` -H `}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`\"Authorization: Bearer $REFLECTION_API_KEY\"`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`The response lists `,_jsx(_components.code,{children:`Beam-1.0-501B-A23B`}),`. If you get a `,_jsx(_components.code,{children:`401`}),` instead, see `,_jsx(_components.a,{href:`/coding-agents-quickstart#troubleshooting-401`,children:`401 Unauthorized`}),`.`]})]}),_jsxs(Step,{title:`Create a sample project`,id:`create-a-sample-project`,children:[_jsxs(_components.p,{children:[`Each guide uses the same first task: fixing a failing test in a small Python project. Create the project now; you need Python 3 and Git with your `,_jsx(_components.a,{href:`https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup#_your_identity`,children:`commit identity configured`}),`.`]}),_jsx(CodeBlock,{filename:`Create the sample project`,icon:`terminal`,numberOfLines:`18`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`mkdir`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` stats-demo \u0026\u0026 `}),_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`cd`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` stats-demo \u0026\u0026 `}),_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`git`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` init -q`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`cat`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` > stats.py \u003c\u003c`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`'EOF'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`def average(nums):`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1E754F`,\"--shiki-dark\":`#4D9375`},children:` return`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` sum(nums) / (len(nums) + 1)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`EOF`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`cat`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` > test_stats.py \u003c\u003c`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`'EOF'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`import unittest`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`from stats import average`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`class TestAverage(unittest.TestCase):`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` def test_average(self):`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` self.assertEqual(average([2, 4, 6]), 4)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1E754F`,\"--shiki-dark\":`#4D9375`},children:`if`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` __name__ == `}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`\"__main__\"`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` unittest.main()`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`EOF`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`printf `}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`'__pycache__/\\\\n'`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` > .gitignore`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`git`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` add . \u0026\u0026 `}),_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`git`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` commit -qm `}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`\"Add stats\"`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`python3 -m unittest`}),` fails with `,_jsx(_components.code,{children:`AssertionError: 3.0 != 4`}),`.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`set-up-your-agent`,children:`Set up your agent`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Mirror CLI`,id:`mirror`,\"data-child-heading-ids\":`[\"install-mirror-cli\",\"connect-mirror-cli-to-reflection\",\"run-a-first-task-in-mirror-cli\",\"enable-web-search-in-mirror-cli-optional\",\"sessions-and-permissions-in-mirror-cli\"]`,children:[_jsxs(_components.p,{children:[`Mirror CLI is Reflection’s coding agent for the terminal. It uses Reflection and `,_jsx(_components.code,{children:`Beam-1.0-501B-A23B`}),` by default, so connecting it takes only an API key.`]}),_jsx(Heading,{level:`3`,id:`install-mirror-cli`,children:`Install Mirror CLI`}),_jsx(_components.p,{children:`Mirror CLI runs on macOS 14 or later on Apple Silicon, and on Linux with glibc 2.28 or later on x86-64 or ARM64. Git or Jujutsu is needed for worktree management; you can start a session in a plain directory without either. Native Windows isn’t supported.`}),_jsxs(_components.p,{children:[`Install `,_jsx(_components.a,{href:`https://docs.astral.sh/uv/getting-started/installation/`,children:`uv`}),` if you don’t already have it, then install Mirror CLI:`]}),_jsx(CodeBlock,{filename:``,icon:`terminal`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`uv tool install reflection-mirror`})}),`\n`]})})}),_jsxs(_components.p,{children:[`If your shell can’t find `,_jsx(_components.code,{children:`mirror`}),` after installing, run `,_jsx(_components.code,{children:`uv tool update-shell`}),` and open a new terminal.`]}),_jsxs(_components.p,{children:[`To check for an update, run `,_jsx(_components.code,{children:`mirror update`}),` in a terminal and accept the installation prompt. You can also upgrade the installed tool with `,_jsx(_components.code,{children:`uv tool upgrade reflection-mirror`}),`.`]}),_jsx(Heading,{level:`3`,id:`connect-mirror-cli-to-reflection`,children:`Connect Mirror CLI to Reflection`}),_jsxs(Steps,{children:[_jsxs(Step,{title:`Start Mirror CLI`,id:`mirror-start`,children:[_jsxs(_components.p,{children:[`Run `,_jsx(_components.code,{children:`mirror`}),` in the sample project directory, `,_jsx(_components.code,{children:`stats-demo`}),`. The first time, Mirror CLI shows a `,_jsx(_components.strong,{children:`Using Mirror`}),` notice. In each new directory, it then asks `,_jsx(_components.code,{children:`Continue and trust this folder? [y/N]`}),`; type `,_jsx(`kbd`,{children:`y`}),` and press `,_jsx(`kbd`,{children:`Enter`}),` to continue.`]}),_jsxs(_components.p,{children:[`If you’ve used Mirror CLI with another provider, run `,_jsx(_components.code,{children:`/model reflection`}),` once it starts. Mirror CLI remembers that choice. `,_jsx(_components.code,{children:`mirror --api reflection --model Beam-1.0-501B-A23B`}),` selects Reflection for that launch only.`]}),_jsxs(_components.p,{children:[`If `,_jsx(_components.code,{children:`REFLECTION_API_KEY`}),` is set or a saved Reflection key is available, Mirror CLI opens the prompt and you can skip the next step. An environment key takes precedence over the saved key.`]})]}),_jsxs(Step,{title:`Paste your API key`,id:`mirror-paste-key`,children:[_jsxs(_components.p,{children:[`Without an environment key or a saved key, Mirror CLI opens a `,_jsx(_components.strong,{children:`Connect to Reflection`}),` screen with a link to create one:`]}),_jsx(Frame,{caption:`The Connect to Reflection screen, with a link to create an API key.`,children:_jsx(OptimizedImage,{src:`https://mintlify.s3.us-west-1.amazonaws.com/reflection-ai/images/coding-agents/mirror-connect.png`,alt:`Mirror CLI's Connect to Reflection screen, showing the model Beam-1.0-501B-A23B, a link to create an API key, and an API key prompt`})}),_jsxs(_components.p,{children:[`Paste your key at the `,_jsx(_components.code,{children:`API key ›`}),` prompt and press `,_jsx(`kbd`,{children:`Enter`}),`. The input is masked, with one `,_jsx(_components.code,{children:`*`}),` for each character. Mirror CLI saves the key to `,_jsx(_components.code,{children:`~/.mirror/reflection_api_key`}),`, readable only by your user, and uses it in later sessions. It doesn’t check the key when it saves it; if the key is wrong, requests fail with `,_jsx(_components.code,{children:`401`}),`, and `,_jsx(_components.code,{children:`/logout`}),` removes the saved key so you can paste another. Press `,_jsx(`kbd`,{children:`Ctrl`}),`+`,_jsx(`kbd`,{children:`C`}),` to cancel without saving.`]}),_jsx(_components.p,{children:`Like other local credentials, the saved key can be read by any command that runs as your user.`})]}),_jsxs(Step,{title:`Check the model`,id:`mirror-check-model`,children:[_jsxs(_components.p,{children:[`The welcome screen shows `,_jsx(_components.code,{children:`Beam-1.0-501B-A23B`}),` next to `,_jsx(_components.code,{children:`model`}),`.`]}),_jsx(Frame,{caption:`The welcome screen after connecting, with the model above the prompt.`,children:_jsx(OptimizedImage,{src:`https://mintlify.s3.us-west-1.amazonaws.com/reflection-ai/images/coding-agents/mirror-model.jpg`,alt:`Mirror CLI's welcome screen after connecting, showing the model Beam-1.0-501B-A23B above the prompt`})})]})]}),_jsx(Heading,{level:`3`,id:`run-a-first-task-in-mirror-cli`,children:`Run a first task in Mirror CLI`}),_jsx(_components.p,{children:`With Mirror open in the sample project directory, enter:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Run the tests with python3 -m unittest, find and fix the bug, then run the tests again to confirm they pass.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsxs(_components.p,{children:[`Mirror CLI asks before it runs shell commands, including ones that only read files, and before it edits files. Press `,_jsx(`kbd`,{children:`1`}),` or `,_jsx(`kbd`,{children:`Enter`}),` to approve each one. It shows tool activity as it works. When it’s done, use `,_jsx(_components.code,{children:`/quit`}),` to return to your shell.`]}),_jsxs(_components.p,{children:[`Review what `,agent_0,` reports. The intended fix replaces `,_jsx(_components.code,{children:`len(nums) + 1`}),` with `,_jsx(_components.code,{children:`len(nums)`}),` in `,_jsx(_components.code,{children:`stats.py`}),`. Confirm the result yourself:`]}),_jsx(CodeBlock,{filename:``,icon:`terminal`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`python3`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` -m unittest`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`git`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` diff`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`The expected result is passing tests and this one-line change to `,_jsx(_components.code,{children:`stats.py`}),`:`]}),_jsx(CodeBlock,{filename:`stats.py`,icon:`python`,numberOfLines:`2`,language:`diff`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`diff`,children:_jsxs(_components.code,{language:`diff`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#B31D28`,\"--shiki-dark\":`#FDAEB7`},children:`- return sum(nums) / (len(nums) + 1)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#85E89D`},children:`+ return sum(nums) / len(nums)`})}),`\n`]})})}),_jsx(_components.p,{children:`The model can take a different path to the same fix, for example by editing the file with a shell command instead of an edit tool.`}),_jsx(Heading,{level:`3`,id:`enable-web-search-in-mirror-cli-optional`,children:`Enable web search in Mirror CLI (optional)`}),_jsxs(_components.p,{children:[`Mirror uses `,_jsx(_components.a,{href:`https://you.com/`,children:`You.com`}),` for web search and page reading by default. You can choose `,_jsx(_components.a,{href:`https://tavily.com/`,children:`Tavily`}),` or `,_jsx(_components.a,{href:`https://www.firecrawl.dev/`,children:`Firecrawl`}),` instead with `,_jsx(_components.code,{children:`/web-provider`}),`. This choice is separate from your model provider.`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Web provider`}),_jsx(_components.th,{children:`Environment variable`}),_jsx(_components.th,{children:`Selection`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`You.com (default)`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`YOU_API_KEY`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`/web-provider you`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Tavily`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`TAVILY_API_KEY`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`/web-provider tavily`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Firecrawl`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`FIRECRAWL_API_KEY`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`/web-provider firecrawl`})})]})]})]}),_jsxs(Steps,{children:[_jsx(Step,{title:`Get a web provider API key`,children:_jsx(_components.p,{children:`Create an account with your chosen provider and copy its API key. You only need a key for the provider you use.`})}),_jsxs(Step,{title:`Export the key and start Mirror`,children:[_jsx(_components.p,{children:`For You.com, replace the placeholder with your API key and run these commands in the same terminal:`}),_jsx(CodeBlock,{filename:``,icon:`terminal`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1E754F`,\"--shiki-dark\":`#4D9375`},children:`export`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` YOU_API_KEY=`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`\"YOUR_API_KEY\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`mirror`})}),`\n`]})})}),_jsxs(_components.p,{children:[`For Tavily or Firecrawl, export `,_jsx(_components.code,{children:`TAVILY_API_KEY`}),` or `,_jsx(_components.code,{children:`FIRECRAWL_API_KEY`}),` instead. If Mirror is already running, exit and restart it from this terminal so it picks up the key.`]})]}),_jsxs(Step,{title:`Choose your provider`,children:[_jsxs(_components.p,{children:[`Run `,_jsx(_components.code,{children:`/web-provider`}),` to open the picker, which shows whether each provider’s key is set. Choose the provider whose key you exported. Exporting a key alone doesn’t select that provider.`]}),_jsxs(_components.p,{children:[`Mirror saves the choice as `,_jsx(_components.code,{children:`web_provider`}),` in `,_jsx(_components.code,{children:`~/.mirror/config.json`}),` and applies it to subsequent tool calls. Calls already running finish with their original provider. Without a saved choice, Mirror uses You.com.`]})]}),_jsxs(Step,{title:`Ask Mirror to search`,children:[_jsx(_components.p,{children:`Enter a prompt that asks for a web search, for example:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Search the web for the official Python asyncio TaskGroup documentation and summarize how it handles exceptions. Include links to your sources.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})]})]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Keep the key for future sessions:`}),` Add the export line to your shell profile, such as `,_jsx(_components.code,{children:`~/.zshrc`}),` for zsh. Open a new terminal before starting Mirror. Keep keys out of project files and `,_jsx(_components.code,{children:`config.json`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use the right key:`}),` Web provider keys are separate from your `,_jsx(_components.code,{children:`REFLECTION_API_KEY`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Skip search setup:`}),` You can use Mirror for coding tasks without a web provider key. Web search and page reading are available when the selected provider’s key is set. Mirror doesn’t fall back to another provider if a call fails.`]}),`\n`]}),_jsx(Heading,{level:`3`,id:`sessions-and-permissions-in-mirror-cli`,children:`Sessions and permissions in Mirror CLI`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Steer the agent.`}),` Type while it works to add instructions, and press `,_jsx(`kbd`,{children:`Escape`}),` to stop the current turn. Type `,_jsx(_components.code,{children:`/`}),` to browse commands.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Pick up earlier work.`}),` `,_jsx(_components.code,{children:`/resume`}),` reopens a saved conversation and `,_jsx(_components.code,{children:`/clear`}),` starts a fresh one. `,_jsx(_components.code,{children:`mirror --continue`}),` resumes where you left off.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Change the model.`}),` `,_jsx(_components.code,{children:`/model`}),` switches models and providers, and Mirror CLI remembers the choice. `,_jsx(_components.code,{children:`/effort`}),` sets the `,_jsx(_components.a,{href:`/reasoning`,children:`reasoning effort`}),`; the default is `,_jsx(_components.code,{children:`max`}),` unless the workspace has a saved effort.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Work in parallel.`}),` `,_jsx(_components.code,{children:`/worktree \u003cname>`}),` creates a workspace with its own agent from the remote’s default branch, preferring `,_jsx(_components.code,{children:`origin`}),` or the sole remote. If fetching fails, it uses the cached default or local committed revision. Your current edits aren’t copied. Switch workspaces with `,_jsx(`kbd`,{children:`Tab`}),` and `,_jsx(`kbd`,{children:`Shift`}),`+`,_jsx(`kbd`,{children:`Tab`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Approve tool calls.`}),` By default, Mirror CLI asks before shell commands, including ones that only read files such as `,_jsx(_components.code,{children:`ls`}),`, and before file writes and edits. Built-in file reading and searching don’t need approval. Press `,_jsx(`kbd`,{children:`1`}),` or `,_jsx(`kbd`,{children:`Enter`}),` to approve, or `,_jsx(`kbd`,{children:`2`}),` to reject. To approve routine tool calls automatically, press `,_jsx(`kbd`,{children:`F2`}),`, use `,_jsx(_components.code,{children:`/approvals`}),`, or start Mirror CLI with `,_jsx(_components.code,{children:`--approval-mode auto`}),`. Tools that require explicit confirmation still ask. Each workspace keeps its approval mode. Tools run locally with your account’s permissions; approval isn’t a sandbox.`]}),`\n`]}),_jsxs(_components.p,{children:[`The `,_jsx(_components.a,{href:`/mirror-overview`,children:`Mirror CLI overview`}),` explains how Mirror works, and the `,_jsx(_components.a,{href:`/mirror-cli-reference`,children:`reference`}),` lists every command and shortcut.`]})]}),_jsxs(Tab,{title:`Pi`,id:`pi`,\"data-child-heading-ids\":`[\"install-pi\",\"connect-pi-to-reflection\",\"run-a-first-task-in-pi\",\"sessions-and-permissions-in-pi\",\"known-issues-with-pi\"]`,children:[_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://pi.dev`,children:`Pi`}),` is an open-source coding agent for the terminal. These steps were tested with Pi 1.3.0.`]}),_jsx(Heading,{level:`3`,id:`install-pi`,children:`Install Pi`}),_jsx(_components.p,{children:`Pi runs on macOS, Linux, and Windows, and needs Node.js 22.19 or later. Install it with npm:`}),_jsx(CodeBlock,{filename:``,icon:`terminal`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`npm`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` install -g --ignore-scripts @earendil-works/pi-coding-agent`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`On macOS and Linux, you can use the install script instead: `,_jsx(_components.code,{children:`curl -fsSL https://pi.dev/install.sh | sh`}),`.`]}),_jsx(Heading,{level:`3`,id:`connect-pi-to-reflection`,children:`Connect Pi to Reflection`}),_jsxs(Steps,{children:[_jsxs(Step,{title:`Add Reflection as a provider`,id:`pi-add-provider`,children:[_jsxs(_components.p,{children:[`Save this as `,_jsx(_components.code,{children:`~/.pi/agent/models.json`}),`:`]}),_jsx(CodeBlock,{filename:`~/.pi/agent/models.json`,icon:`file-code`,numberOfLines:`18`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`18`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`providers`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`reflection`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`baseUrl`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`https://api.reflection.ai/openai/v1`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`api`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`openai-completions`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`apiKey`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`$REFLECTION_API_KEY`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`models`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`id`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`Beam-1.0-501B-A23B`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`reasoning`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#1E754F`,\"--shiki-dark\":`#4D9375`},children:` true`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`contextWindow`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#2F798A`,\"--shiki-dark\":`#4C9A91`},children:` 1048576`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`maxTokens`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#2F798A`,\"--shiki-dark\":`#4C9A91`},children:` 131072`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`thinkingLevelMap`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`off`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#1E754F`,\"--shiki-dark\":`#4D9375`},children:` null`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`minimal`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#1E754F`,\"--shiki-dark\":`#4D9375`},children:` null`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`xhigh`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`xhigh`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`max`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`max`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`}`})}),`\n`]})})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`\"$REFLECTION_API_KEY\"`}),` reads the key from your environment, so the key isn’t stored in the file. Keep the `,_jsx(_components.code,{children:`$`}),`: without it, Pi sends the text `,_jsx(_components.code,{children:`REFLECTION_API_KEY`}),` as the key.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`contextWindow`}),` and `,_jsx(_components.code,{children:`maxTokens`}),` set the `,_jsx(_components.a,{href:`/models`,children:`context window and max output`}),`. Without them, Pi assumes smaller defaults for a model it doesn’t know.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`\"reasoning\": true`}),` makes Pi send a `,_jsx(_components.a,{href:`/reasoning`,children:`reasoning effort`}),` with each request, from its thinking level. `,_jsx(_components.code,{children:`thinkingLevelMap`}),` limits Pi’s thinking levels to the ones the API accepts: `,_jsx(_components.code,{children:`low`}),`, `,_jsx(_components.code,{children:`medium`}),`, `,_jsx(_components.code,{children:`high`}),`, `,_jsx(_components.code,{children:`xhigh`}),`, and `,_jsx(_components.code,{children:`max`}),`. With this map, Pi sends `,_jsx(_components.code,{children:`low`}),` for its `,_jsx(_components.code,{children:`off`}),` and `,_jsx(_components.code,{children:`minimal`}),` levels.`]}),`\n`]})]}),_jsxs(Step,{title:`Make Reflection the default model`,id:`pi-set-default`,children:[_jsxs(_components.p,{children:[`Save this as `,_jsx(_components.code,{children:`~/.pi/agent/settings.json`}),`, or add the keys to your existing settings:`]}),_jsx(CodeBlock,{filename:`~/.pi/agent/settings.json`,icon:`file-code`,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`defaultProvider`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`reflection`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`defaultModel`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`Beam-1.0-501B-A23B`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`defaultThinkingLevel`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`high`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`To skip this step, start Pi with `,_jsx(_components.code,{children:`pi --model reflection/Beam-1.0-501B-A23B:high`}),` instead.`]})]}),_jsxs(Step,{title:`Check the model`,id:`pi-check-model`,children:[_jsx(CodeBlock,{filename:``,icon:`terminal`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`pi --list-models reflection`})}),`\n`]})})}),_jsxs(_components.p,{children:[`The list includes `,_jsx(_components.code,{children:`Beam-1.0-501B-A23B`}),`. If Pi prints `,_jsx(_components.code,{children:`No models available`}),`, `,_jsx(_components.code,{children:`REFLECTION_API_KEY`}),` isn’t set in this shell; export it and run the command again.`]})]})]}),_jsx(Heading,{level:`3`,id:`run-a-first-task-in-pi`,children:`Run a first task in Pi`}),_jsx(_components.p,{children:`From the sample project, run:`}),_jsx(CodeBlock,{filename:``,icon:`terminal`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`pi -p `}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`\"Run the tests with python3 -m unittest, find and fix the bug, then run the tests again to confirm they pass.\"`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`-p`}),` runs one prompt, prints the final answer, and exits.`]}),_jsxs(_components.p,{children:[`Review what `,agent_1,` reports. The intended fix replaces `,_jsx(_components.code,{children:`len(nums) + 1`}),` with `,_jsx(_components.code,{children:`len(nums)`}),` in `,_jsx(_components.code,{children:`stats.py`}),`. Confirm the result yourself:`]}),_jsx(CodeBlock,{filename:``,icon:`terminal`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`python3`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` -m unittest`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`git`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` diff`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`The expected result is passing tests and this one-line change to `,_jsx(_components.code,{children:`stats.py`}),`:`]}),_jsx(CodeBlock,{filename:`stats.py`,icon:`python`,numberOfLines:`2`,language:`diff`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`diff`,children:_jsxs(_components.code,{language:`diff`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#B31D28`,\"--shiki-dark\":`#FDAEB7`},children:`- return sum(nums) / (len(nums) + 1)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#85E89D`},children:`+ return sum(nums) / len(nums)`})}),`\n`]})})}),_jsx(_components.p,{children:`The model can take a different path to the same fix, for example by editing the file with a shell command instead of an edit tool.`}),_jsx(Heading,{level:`3`,id:`sessions-and-permissions-in-pi`,children:`Sessions and permissions in Pi`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Start a session.`}),` Run `,_jsx(_components.code,{children:`pi`}),` in your project to open the interactive interface. The first interactive start downloads `,_jsx(_components.code,{children:`fd`}),` and `,_jsx(_components.code,{children:`ripgrep`}),` into `,_jsx(_components.code,{children:`~/.pi/agent/bin`}),` unless they’re already on your `,_jsx(_components.code,{children:`PATH`}),`. `,_jsx(_components.code,{children:`pi -p \"\u003cprompt>\"`}),` runs one prompt and exits.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Resume.`}),` `,_jsx(_components.code,{children:`pi -c`}),` continues the most recent session in the current directory, or starts a new one without notice if there isn’t one. `,_jsx(_components.code,{children:`pi -r`}),` or `,_jsx(_components.code,{children:`/resume`}),` picks an earlier session, and `,_jsx(_components.code,{children:`/new`}),` starts a fresh one.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Choose the model and thinking level.`}),` `,_jsx(_components.code,{children:`/model`}),` switches models. `,_jsx(_components.code,{children:`/thinking`}),` or `,_jsx(_components.code,{children:`--thinking low|medium|high|xhigh|max`}),` sets the reasoning effort.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Stop.`}),` Press `,_jsx(`kbd`,{children:`Esc`}),` to stop the current task, or `,_jsx(`kbd`,{children:`Ctrl`}),`+`,_jsx(`kbd`,{children:`C`}),` twice to exit.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Permissions.`}),` Pi doesn’t ask for approval before it runs a tool. Limit the tools it can use with `,_jsx(_components.code,{children:`--tools`}),`, for example `,_jsx(_components.code,{children:`--tools read,grep`}),`, or run it in a container or VM. See Pi’s `,_jsx(_components.a,{href:`https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/security.md`,children:`security notes`}),`.`]}),`\n`]}),_jsx(Heading,{level:`3`,id:`known-issues-with-pi`,children:`Known issues with Pi`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The model sometimes calls a Pi tool without its required arguments, for example `,_jsx(_components.code,{children:`edit`}),` without `,_jsx(_components.code,{children:`path`}),`. Pi rejects the call and the model retries. Tasks still complete, but can take longer.`]}),`\n`,_jsxs(_components.li,{children:[`In scripts, `,_jsx(_components.code,{children:`pi -p`}),` can wait for input when standard input is an open pipe. Redirect it: `,_jsx(_components.code,{children:`pi -p \"\u003cprompt>\" \u003c/dev/null`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`The older package, `,_jsx(_components.code,{children:`@mariozechner/pi-coding-agent`}),`, is deprecated. If `,_jsx(_components.code,{children:`pi --version`}),` shows 0.73 or earlier, install `,_jsx(_components.code,{children:`@earendil-works/pi-coding-agent`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`If every request in a session fails with `,_jsx(_components.code,{children:`Missing required parameter: 'messages[N].reasoning_content'`}),`, start a new session with `,_jsx(_components.code,{children:`/new`}),`. See `,_jsx(_components.a,{href:`#troubleshooting-reasoning-content`,children:`Troubleshooting`}),`.`]}),`\n`]})]}),_jsxs(Tab,{title:`OpenCode`,id:`opencode`,\"data-child-heading-ids\":`[\"install-opencode\",\"connect-opencode-to-reflection\",\"run-a-first-task-in-opencode\",\"sessions-and-permissions-in-opencode\",\"known-issues-with-opencode\"]`,children:[_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://opencode.ai`,children:`OpenCode`}),` is an open-source coding agent for the terminal. These steps are for OpenCode 2 and were tested with OpenCode 2.0.30.`]}),_jsx(Heading,{level:`3`,id:`install-opencode`,children:`Install OpenCode`}),_jsxs(_components.p,{children:[`OpenCode runs on macOS, Linux, and Windows. These steps use a Unix shell; on Windows, run them in WSL. Install OpenCode 2 with any of the `,_jsx(_components.a,{href:`https://opencode.ai/v2/docs/`,children:`upstream methods`}),`:`]}),_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Install script`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`curl`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` -fsSL https://opencode.ai/v2/install | bash`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`npm`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`npm`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` install -g @opencode/cli`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Homebrew`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`brew`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` install anomalyco/tap/opencode-v2`})]}),`\n`]})})})]}),_jsxs(_components.p,{children:[`The install script adds `,_jsx(_components.code,{children:`~/.opencode/bin`}),` to `,_jsx(_components.code,{children:`PATH`}),` in your shell profile. If it prints `,_jsx(_components.code,{children:`No config file found`}),`, add that directory to `,_jsx(_components.code,{children:`PATH`}),` yourself. Open a new terminal, then run `,_jsx(_components.code,{children:`opencode --version`}),` to confirm the install. It prints the version, for example `,_jsx(_components.code,{children:`opencode v2.0.30`}),`.`]}),_jsxs(_components.p,{children:[`Recent npm versions can warn that the `,_jsx(_components.code,{children:`@opencode/cli`}),` install script isn’t covered by `,_jsx(_components.code,{children:`allowScripts`}),`. The install still works; `,_jsx(_components.code,{children:`opencode --version`}),` confirms it.`]}),_jsxs(_components.p,{children:[`OpenCode 1 and OpenCode 2 both install the `,_jsx(_components.code,{children:`opencode`}),` command. If you have OpenCode 1 from npm (`,_jsx(_components.code,{children:`opencode-ai`}),`) or Homebrew (`,_jsx(_components.code,{children:`anomalyco/tap/opencode`}),`), uninstall it first; the install script replaces an OpenCode 1 binary that the script installed. See `,_jsx(_components.a,{href:`https://opencode.ai/v2/docs/migrate-v1/`,children:`Migrate from V1`}),`.`]}),_jsx(Heading,{level:`3`,id:`connect-opencode-to-reflection`,children:`Connect OpenCode to Reflection`}),_jsxs(Steps,{children:[_jsxs(Step,{title:`Add Reflection as a provider`,id:`opencode-add-provider`,children:[_jsxs(_components.p,{children:[`Save this as `,_jsx(_components.code,{children:`opencode.json`}),` in your project root, or as `,_jsx(_components.code,{children:`~/.config/opencode/opencode.json`}),` to use it in every project:`]}),_jsx(CodeBlock,{filename:`opencode.json`,icon:`file-code`,numberOfLines:`35`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`35`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`$schema`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`https://opencode.ai/config.json`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`providers`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`reflection`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`name`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`Reflection`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`env`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` [`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`REFLECTION_API_KEY`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`package`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`@opencode/ai/providers/openai-compatible`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`settings`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`baseURL`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`https://api.reflection.ai/openai/v1`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`models`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`Beam-1.0-501B-A23B`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`name`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`Beam-1.0-501B-A23B`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`capabilities`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`tools`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#1E754F`,\"--shiki-dark\":`#4D9375`},children:` true`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`input`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` [`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`text`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`output`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` [`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`text`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`limit`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`context`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#2F798A`,\"--shiki-dark\":`#4C9A91`},children:` 1048576`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`output`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#2F798A`,\"--shiki-dark\":`#4C9A91`},children:` 131072`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`variants`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`id`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`low`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`settings`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`reasoningEffort`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`low`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` }`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`id`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`medium`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`settings`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`reasoningEffort`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`medium`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` }`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`id`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`high`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`settings`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`reasoningEffort`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`high`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` }`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`id`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`xhigh`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`settings`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`reasoningEffort`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`xhigh`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` }`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`id`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`max`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`settings`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`reasoningEffort`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`max`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` }`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`model`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`reflection/Beam-1.0-501B-A23B`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`env`}),` names the environment variable that holds your key, so the key isn’t stored in the file. `,_jsx(_components.code,{children:`model`}),` makes Reflection the default; without it, OpenCode can start on another provider’s model.`]}),_jsx(_components.p,{children:`OpenCode doesn’t read model details from the API, so the model entry describes Beam:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`capabilities`}),` declares the model as text-only, because the API accepts `,_jsx(_components.a,{href:`/openai-compatibility#input`,children:`text input only`}),`. When you attach an image or PDF, or a tool reads one, OpenCode sends the model a note that it can’t read the file instead of the file itself. Without `,_jsx(_components.code,{children:`capabilities`}),`, OpenCode assumes the model accepts images.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`limit`}),` sets the `,_jsx(_components.a,{href:`/models`,children:`context window and max output`}),`. OpenCode sends `,_jsx(_components.code,{children:`limit.output`}),` as `,_jsx(_components.code,{children:`max_completion_tokens`}),`, and compacts a session when it nears `,_jsx(_components.code,{children:`limit.context`}),`. Without `,_jsx(_components.code,{children:`limit`}),`, OpenCode assumes a 200,000-token context window and caps output at 32,000 tokens.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`variants`}),` lists the `,_jsx(_components.a,{href:`/reasoning`,children:`reasoning efforts`}),` you can choose. OpenCode offers `,_jsx(_components.code,{children:`low`}),`, `,_jsx(_components.code,{children:`medium`}),`, and `,_jsx(_components.code,{children:`high`}),` on its own, but a `,_jsx(_components.code,{children:`variants`}),` list replaces them, so the list includes all five.`]}),`\n`]}),_jsxs(_components.p,{children:[`OpenCode reads the model’s reasoning from `,_jsx(_components.code,{children:`reasoning_content`}),` and sends it back in `,_jsx(_components.a,{href:`/reasoning#reasoning-in-multi-turn-conversations`,children:`multi-turn conversations`}),` and tool calls without further configuration.`]}),_jsxs(_components.p,{children:[`If you set up OpenCode 1 with an earlier version of this guide, replace that configuration with this one. OpenCode 2 still reads the old format, but its `,_jsx(_components.code,{children:`variants`}),` hide `,_jsx(_components.code,{children:`low`}),`, `,_jsx(_components.code,{children:`medium`}),`, and `,_jsx(_components.code,{children:`high`}),`.`]})]}),_jsxs(Step,{title:`Check the model`,id:`opencode-check-model`,children:[_jsx(CodeBlock,{filename:``,icon:`terminal`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`opencode models | grep reflection`})}),`\n`]})})}),_jsxs(_components.p,{children:[`The output is `,_jsx(_components.code,{children:`reflection/Beam-1.0-501B-A23B`}),`. This confirms the configuration loaded; it doesn’t check your key.`]}),_jsxs(_components.p,{children:[`OpenCode 2 runs sessions in a background service, which the first `,_jsx(_components.code,{children:`opencode`}),` command starts. The service reads `,_jsx(_components.code,{children:`REFLECTION_API_KEY`}),` from the shell that started it. If OpenCode was already running before you exported the key, or you change the key, restart the service from a shell where the key is set:`]}),_jsx(CodeBlock,{filename:``,icon:`terminal`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`opencode service restart`})}),`\n`]})})})]})]}),_jsx(Heading,{level:`3`,id:`run-a-first-task-in-opencode`,children:`Run a first task in OpenCode`}),_jsx(_components.p,{children:`From the sample project, run:`}),_jsx(CodeBlock,{filename:``,icon:`terminal`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`opencode run `}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`\"Run the tests with python3 -m unittest, find and fix the bug, then run the tests again to confirm they pass.\"`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`The output starts with `,_jsx(_components.code,{children:`> build · Beam-1.0-501B-A23B`}),`, which confirms the model in use.`]}),_jsxs(_components.p,{children:[`Review what `,agent_2,` reports. The intended fix replaces `,_jsx(_components.code,{children:`len(nums) + 1`}),` with `,_jsx(_components.code,{children:`len(nums)`}),` in `,_jsx(_components.code,{children:`stats.py`}),`. Confirm the result yourself:`]}),_jsx(CodeBlock,{filename:``,icon:`terminal`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`python3`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` -m unittest`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`git`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` diff`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`The expected result is passing tests and this one-line change to `,_jsx(_components.code,{children:`stats.py`}),`:`]}),_jsx(CodeBlock,{filename:`stats.py`,icon:`python`,numberOfLines:`2`,language:`diff`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`diff`,children:_jsxs(_components.code,{language:`diff`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#B31D28`,\"--shiki-dark\":`#FDAEB7`},children:`- return sum(nums) / (len(nums) + 1)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#85E89D`},children:`+ return sum(nums) / len(nums)`})}),`\n`]})})}),_jsx(_components.p,{children:`The model can take a different path to the same fix, for example by editing the file with a shell command instead of an edit tool.`}),_jsx(Heading,{level:`3`,id:`sessions-and-permissions-in-opencode`,children:`Sessions and permissions in OpenCode`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Start a session.`}),` Run `,_jsx(_components.code,{children:`opencode`}),` in your project to open the interactive interface. `,_jsx(_components.code,{children:`opencode run \"\u003cprompt>\"`}),` runs one prompt and exits.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Resume.`}),` In the interface, `,_jsx(_components.code,{children:`/sessions`}),` lists earlier sessions and `,_jsx(_components.code,{children:`/new`}),` starts a fresh one. From the command line, `,_jsx(_components.code,{children:`opencode run -c \"\u003cprompt>\"`}),` continues the last session, and `,_jsx(_components.code,{children:`-s \u003csession ID>`}),` continues a specific one. `,_jsx(_components.code,{children:`opencode session list`}),` shows session IDs.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Choose the model.`}),` `,_jsx(_components.code,{children:`/models`}),` switches models in the interface; `,_jsx(_components.code,{children:`-m reflection/Beam-1.0-501B-A23B`}),` sets it for one run.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Choose a reasoning effort.`}),` Press `,_jsx(`kbd`,{children:`Ctrl`}),`+`,_jsx(`kbd`,{children:`T`}),` in the interface to cycle through `,_jsx(_components.code,{children:`low`}),`, `,_jsx(_components.code,{children:`medium`}),`, `,_jsx(_components.code,{children:`high`}),`, `,_jsx(_components.code,{children:`xhigh`}),`, and `,_jsx(_components.code,{children:`max`}),`, then back to the default, or run `,_jsx(_components.code,{children:`/effort`}),` to pick one. For one run, add the effort to the model after `,_jsx(_components.code,{children:`#`}),`: `,_jsx(_components.code,{children:`opencode run -m reflection/Beam-1.0-501B-A23B#high \"\u003cprompt>\"`}),`. Without an effort, the model uses its `,_jsx(_components.a,{href:`/reasoning#discover-supported-efforts`,children:`default effort`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Show reasoning.`}),` The model’s reasoning is kept with the session. Add `,_jsx(_components.code,{children:`--thinking`}),` to `,_jsx(_components.code,{children:`opencode run`}),` to print it.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Stop.`}),` Press `,_jsx(`kbd`,{children:`Esc`}),` twice to interrupt the current response, and use `,_jsx(_components.code,{children:`/exit`}),` to quit.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Permissions.`}),` OpenCode allows tool calls by default, including reading files outside the project directory. To require approval in the interactive interface, add a `,_jsx(_components.code,{children:`permissions`}),` list to `,_jsx(_components.code,{children:`opencode.json`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:`opencode.json`,icon:`file-code`,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`permissions`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`: `}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`[`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`action`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`shell`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`resource`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`*`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`effect`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`ask`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`action`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`edit`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`resource`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`*`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`effect`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`ask`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`action`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`execute`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`resource`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`*`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`effect`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`deny`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`action`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`external_directory`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`resource`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`*`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`effect`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`ask`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`]`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The last matching rule wins. `,_jsx(_components.code,{children:`external_directory`}),` asks before the agent reads or edits files outside the project. Deny `,_jsx(_components.code,{children:`execute`}),`: through it, the model can call OpenCode’s local server, and it can run commands and change files that way without the `,_jsx(_components.code,{children:`shell`}),` and `,_jsx(_components.code,{children:`edit`}),` rules applying. Denying `,_jsx(_components.code,{children:`edit`}),` alone doesn’t stop file changes through `,_jsx(_components.code,{children:`shell`}),`, so restrict `,_jsx(_components.code,{children:`shell`}),` too, or run OpenCode in a container.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`opencode run`}),` can’t prompt, so it rejects each tool call set to `,_jsx(_components.code,{children:`ask`}),`, and the model continues without it. The run still exits with status `,_jsx(_components.code,{children:`0`}),`, so check `,_jsx(_components.code,{children:`git diff`}),` to see what changed. Add `,_jsx(_components.code,{children:`--auto`}),` to approve everything that isn’t set to `,_jsx(_components.code,{children:`deny`}),`. See `,_jsx(_components.a,{href:`https://opencode.ai/v2/docs/permissions/`,children:`Permissions`}),`.`]}),`\n`]}),`\n`]}),_jsx(Heading,{level:`3`,id:`known-issues-with-opencode`,children:`Known issues with OpenCode`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`OpenCode lists models from other providers, including free OpenCode Zen models even with no other API keys set. Without `,_jsx(_components.code,{children:`\"model\"`}),` in the config, or if it doesn’t match `,_jsx(_components.code,{children:`reflection/Beam-1.0-501B-A23B`}),` exactly, including capitalization, OpenCode starts on one of them without an error. Check that `,_jsx(_components.code,{children:`opencode run`}),` output names `,_jsx(_components.code,{children:`Beam-1.0-501B-A23B`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`The background service keeps the environment it started with. If requests fail with `,_jsx(_components.code,{children:`Provide an API key or Playground credential in the Authorization header`}),` although `,_jsx(_components.code,{children:`REFLECTION_API_KEY`}),` is set in your shell, run `,_jsx(_components.code,{children:`opencode service restart`}),` from that shell. In scripts and CI, add `,_jsx(_components.code,{children:`--standalone`}),` to `,_jsx(_components.code,{children:`opencode run`}),` to use a private server that reads the current environment.`]}),`\n`,_jsxs(_components.li,{children:[`In scripts, `,_jsx(_components.code,{children:`opencode run`}),` waits for standard input to close when it’s an open pipe. Redirect it: `,_jsx(_components.code,{children:`opencode run \"\u003cprompt>\" \u003c/dev/null`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`With `,_jsx(_components.code,{children:`shell`}),` and `,_jsx(_components.code,{children:`edit`}),` set to `,_jsx(_components.code,{children:`ask`}),`, the model can still run commands and change files through the `,_jsx(_components.code,{children:`execute`}),` tool, which can call OpenCode’s own local server. Deny `,_jsx(_components.code,{children:`execute`}),` as shown in `,_jsx(_components.a,{href:`#sessions-and-permissions-in-opencode`,children:`Sessions and permissions`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`If a run fails with `,_jsx(_components.code,{children:`Missing required parameter: 'messages[N].reasoning_content'`}),`, the session can’t continue. Check `,_jsx(_components.code,{children:`git diff`}),`, then start a new session: `,_jsx(_components.code,{children:`opencode run`}),` without `,_jsx(_components.code,{children:`-c`}),`, or `,_jsx(_components.code,{children:`/new`}),` in the interface. See `,_jsx(_components.a,{href:`#troubleshooting-reasoning-content`,children:`Troubleshooting`}),`.`]}),`\n`]})]}),_jsxs(Tab,{title:`Hermes Agent`,id:`hermes`,\"data-child-heading-ids\":`[\"install-hermes-agent\",\"connect-hermes-to-reflection\",\"run-a-first-task-in-hermes\",\"sessions-and-permissions-in-hermes\",\"known-issues-with-hermes\"]`,children:[_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://github.com/NousResearch/hermes-agent`,children:`Hermes Agent`}),` is an open-source agent by Nous Research that runs in the terminal. These steps were tested with Hermes Agent v0.22.2; the install script installs the latest release, which can be newer.`]}),_jsx(Heading,{level:`3`,id:`install-hermes-agent`,children:`Install Hermes Agent`}),_jsx(_components.p,{children:`Hermes Agent runs on macOS, Linux, and WSL2, and upstream also provides a native Windows installer. Install it with the upstream script:`}),_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`macOS, Linux, WSL2`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`curl`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` -fsSL https://hermes-agent.nousresearch.com/install.sh | bash -s -- --skip-setup`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Windows`,numberOfLines:`1`,language:`powershell`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`powershell`,children:_jsxs(_components.code,{language:`powershell`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`iex `}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`(`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`irm https:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`//`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`hermes-agent.nousresearch.com`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`/`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`install.ps1`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`)`})]}),`\n`]})})})]}),_jsxs(_components.p,{children:[`The script installs its own Python, Node.js, and other tools (about 2.4 GB) and adds `,_jsx(_components.code,{children:`hermes`}),` to your `,_jsx(_components.code,{children:`PATH`}),` in your shell profile files. `,_jsx(_components.code,{children:`--skip-setup`}),` skips the `,_jsx(_components.code,{children:`hermes setup`}),` wizard, whose default choice signs in to a different provider, and the background gateway service that the script otherwise installs and starts on macOS without asking. The next step configures the model. Open a new terminal, or `,_jsx(_components.code,{children:`source`}),` your shell profile, so that `,_jsx(_components.code,{children:`hermes`}),` is on your `,_jsx(_components.code,{children:`PATH`}),`.`]}),_jsxs(_components.p,{children:[`The Windows installer starts the `,_jsx(_components.code,{children:`hermes setup`}),` wizard; press `,_jsx(`kbd`,{children:`Ctrl`}),`+`,_jsx(`kbd`,{children:`C`}),` to exit it. If you installed without `,_jsx(_components.code,{children:`--skip-setup`}),` on macOS, run `,_jsx(_components.code,{children:`hermes gateway uninstall`}),` to remove the background service.`]}),_jsx(Heading,{level:`3`,id:`connect-hermes-to-reflection`,children:`Connect Hermes to Reflection`}),_jsxs(Steps,{children:[_jsxs(Step,{title:`Set Reflection as the model provider`,id:`hermes-set-provider`,children:[_jsx(CodeBlock,{filename:``,icon:`terminal`,numberOfLines:`7`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`hermes config set model.provider custom`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`hermes config set model.base_url https://api.reflection.ai/openai/v1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`hermes config set model.default Beam-1.0-501B-A23B`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`hermes config set model.key_env REFLECTION_API_KEY`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`hermes config set model.reasoning_echo true`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`hermes config set auxiliary.title_generation.model_upgrade_enabled false`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`hermes config set auth.adopt_external_logins false`})}),`\n`]})})}),_jsxs(_components.p,{children:[`These update `,_jsx(_components.code,{children:`~/.hermes/config.yaml`}),` in place. The installer creates that file with many other settings, including a `,_jsx(_components.code,{children:`model`}),` section, so use the commands rather than pasting these keys into it. A second `,_jsx(_components.code,{children:`model`}),` section makes the file invalid, and Hermes then ignores all of your settings. After the commands, the file contains:`]}),_jsx(CodeBlock,{filename:`~/.hermes/config.yaml`,icon:`file-code`,numberOfLines:`11`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`model`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:` provider`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:` custom`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:` default`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:` Beam-1.0-501B-A23B`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:` base_url`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:` https://api.reflection.ai/openai/v1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:` key_env`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:` REFLECTION_API_KEY`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:` reasoning_echo`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#1E754F`,\"--shiki-dark\":`#4D9375`},children:` true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`auxiliary`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:` title_generation`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:` model_upgrade_enabled`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#1E754F`,\"--shiki-dark\":`#4D9375`},children:` false`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`auth`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:` adopt_external_logins`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#1E754F`,\"--shiki-dark\":`#4D9375`},children:` false`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`key_env`}),` makes Hermes read the key from `,_jsx(_components.code,{children:`REFLECTION_API_KEY`}),` at startup, so the key isn’t stored in the file. Hermes ignores `,_jsx(_components.code,{children:`OPENAI_BASE_URL`}),` for a custom provider, so set the base URL here.`]}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`reasoning_echo`}),` keeps a session working when the model returns a tool call without reasoning. Hermes sends each earlier assistant turn back with its `,_jsx(_components.code,{children:`reasoning_content`}),`, as described in `,_jsx(_components.a,{href:`/reasoning#reasoning-in-multi-turn-conversations`,children:`Reasoning`}),`. By default, a turn that has no reasoning goes back without that field, and every later request in the session then fails with `,_jsx(_components.code,{children:`400 missing_required_parameter`}),`. With `,_jsx(_components.code,{children:`reasoning_echo: true`}),`, Hermes sends a placeholder for that turn instead. See `,_jsx(_components.a,{href:`/coding-agents-quickstart#troubleshooting-reasoning-content`,children:`Troubleshooting`}),`.`]}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`model_upgrade_enabled: false`}),` names each session with text from your messages instead of a separate model request. Hermes sends that request with reasoning turned off, and `,_jsx(_components.code,{children:`Beam-1.0-501B-A23B`}),` always reasons, so it rejects the request, as described in `,_jsx(_components.a,{href:`/reasoning#set-reasoning-effort`,children:`Reasoning`}),`. Hermes then retries, but a one-shot run often exits before the retry finishes and prints `,_jsx(_components.code,{children:`Auxiliary title generation failed: Connection error.`})]}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`adopt_external_logins: false`}),` stops Hermes from reading sign-ins from other coding tools installed on your machine, so it uses only your Reflection key. With the default, `,_jsx(_components.code,{children:`true`}),`, each interactive start on macOS reads the `,_jsx(_components.code,{children:`Claude Code-credentials`}),` Keychain item, and Hermes can also read the Codex CLI login.`]})]}),_jsxs(Step,{title:`Check the connection`,id:`hermes-check-connection`,children:[_jsx(CodeBlock,{filename:``,icon:`terminal`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`hermes chat --oneshot -q `}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`\"Reply with exactly: pong\"`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Hermes shows the model’s reasoning, then replies `,_jsx(_components.code,{children:`pong`}),`.`]})]})]}),_jsx(Heading,{level:`3`,id:`run-a-first-task-in-hermes`,children:`Run a first task in Hermes`}),_jsx(_components.p,{children:`From the sample project, run:`}),_jsx(CodeBlock,{filename:``,icon:`terminal`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:`hermes chat --oneshot -q `}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`\"Read this repository, run the tests with python3 -m unittest, find and fix the bug, then run the tests again to confirm they pass.\"`})]}),`\n`]})})}),_jsx(_components.p,{children:`Hermes shows each tool call and an inline diff of its edit as it works.`}),_jsxs(_components.p,{children:[`Review what `,agent_3,` reports. The intended fix replaces `,_jsx(_components.code,{children:`len(nums) + 1`}),` with `,_jsx(_components.code,{children:`len(nums)`}),` in `,_jsx(_components.code,{children:`stats.py`}),`. Confirm the result yourself:`]}),_jsx(CodeBlock,{filename:``,icon:`terminal`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`python3`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` -m unittest`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`git`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` diff`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`The expected result is passing tests and this one-line change to `,_jsx(_components.code,{children:`stats.py`}),`:`]}),_jsx(CodeBlock,{filename:`stats.py`,icon:`python`,numberOfLines:`2`,language:`diff`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`diff`,children:_jsxs(_components.code,{language:`diff`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#B31D28`,\"--shiki-dark\":`#FDAEB7`},children:`- return sum(nums) / (len(nums) + 1)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#85E89D`},children:`+ return sum(nums) / len(nums)`})}),`\n`]})})}),_jsx(_components.p,{children:`The model can take a different path to the same fix, for example by editing the file with a shell command instead of an edit tool.`}),_jsx(Heading,{level:`3`,id:`sessions-and-permissions-in-hermes`,children:`Sessions and permissions in Hermes`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Start a session.`}),` Run `,_jsx(_components.code,{children:`hermes`}),` to open the interactive interface. `,_jsx(_components.code,{children:`hermes chat --oneshot -q \"\u003cprompt>\"`}),` runs one prompt and exits. Without `,_jsx(_components.code,{children:`--oneshot`}),`, `,_jsx(_components.code,{children:`-q`}),` in a terminal starts an interactive session with that prompt.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Resume.`}),` Hermes prints resume commands when a session ends, such as `,_jsx(_components.code,{children:`hermes -c \"\u003csession title>\"`}),`. `,_jsx(_components.code,{children:`hermes --resume latest`}),` continues the last session, and `,_jsx(_components.code,{children:`hermes --resume \u003csession ID>`}),` continues a specific one.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Stop.`}),` Press `,_jsx(`kbd`,{children:`Ctrl`}),`+`,_jsx(`kbd`,{children:`C`}),` to interrupt the current turn. At an idle prompt, `,_jsx(`kbd`,{children:`Ctrl`}),`+`,_jsx(`kbd`,{children:`C`}),` clears your draft, or exits if the draft is empty. `,_jsx(_components.code,{children:`/stop`}),` doesn’t stop the turn; it stops background processes that the agent started. `,_jsx(_components.code,{children:`/quit`}),` exits.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Show reasoning.`}),` Hermes shows the model’s reasoning by default. Use `,_jsx(_components.code,{children:`/reasoning hide`}),` to turn it off and `,_jsx(_components.code,{children:`/reasoning show`}),` to turn it back on; Hermes saves the setting in `,_jsx(_components.code,{children:`config.yaml`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Approvals.`}),` Hermes asks before running commands it considers risky. `,_jsx(_components.code,{children:`approvals.mode`}),` in `,_jsx(_components.code,{children:`config.yaml`}),` sets this to `,_jsx(_components.code,{children:`smart`}),` (the default), `,_jsx(_components.code,{children:`manual`}),`, or `,_jsx(_components.code,{children:`off`}),`. In `,_jsx(_components.code,{children:`smart`}),` mode, a model request decides whether to approve a flagged command, block it, or ask you, so flagged commands can run without asking, including destructive ones such as `,_jsx(_components.code,{children:`rm -rf .git`}),`. To review every flagged command yourself, run `,_jsx(_components.code,{children:`hermes config set approvals.mode manual`}),`. One-shot runs, with `,_jsx(_components.code,{children:`--oneshot`}),` or outside a terminal, deny risky commands instead of asking, but this isn’t a sandbox: the model can reach the same result another way, for example by writing and running a script. See the `,_jsx(_components.a,{href:`https://hermes-agent.nousresearch.com/docs`,children:`Hermes Agent documentation`}),` for details.`]}),`\n`]}),_jsx(Heading,{level:`3`,id:`known-issues-with-hermes`,children:`Known issues with Hermes`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Hermes uses a secondary model for tasks such as risk scoring for approvals and summarizing long conversations. By default it uses your main model, so these requests also go to Reflection.`}),`\n`,_jsxs(_components.li,{children:[`Background review is on by default. Every 10 turns by default, Hermes sends the conversation to the model again in the background and can save skills and memories from it. To turn it off, run `,_jsx(_components.code,{children:`hermes config set auxiliary.background_review.enabled false`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Requests that include an image, such as Hermes’s image analysis, fail with `,_jsx(_components.code,{children:`400 invalid_value`}),`, because the API accepts `,_jsx(_components.a,{href:`/openai-compatibility#input`,children:`text input only`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`If Hermes prints `,_jsx(_components.code,{children:`Auxiliary title generation failed`}),`, check that `,_jsx(_components.code,{children:`hermes config get auxiliary.title_generation.model_upgrade_enabled`}),` prints `,_jsx(_components.code,{children:`false`}),`. The warning doesn’t affect the task.`]}),`\n`,_jsxs(_components.li,{children:[`Occasionally a turn ends with raw tool-call text in place of an answer, and the requested change isn’t made. Check `,_jsx(_components.code,{children:`git diff`}),`, and run the prompt again.`]}),`\n`,_jsxs(_components.li,{children:[`On first use, Hermes downloads some of its own tools, such as language servers. This needs access to GitHub, PyPI, and npm, but doesn’t send your conversation anywhere. At startup, Hermes also contacts `,_jsx(_components.code,{children:`models.dev`}),` for model details, and checks GitHub (`,_jsx(_components.code,{children:`api.github.com`}),` and `,_jsx(_components.code,{children:`github.com`}),`) for updates once a day, using `,_jsx(_components.code,{children:`GITHUB_TOKEN`}),`, `,_jsx(_components.code,{children:`GH_TOKEN`}),`, or your GitHub CLI login if you have one. To turn the update check off, run `,_jsx(_components.code,{children:`hermes config set updates.check false`}),`.`]}),`\n`]})]}),_jsxs(Tab,{title:`GitHub Copilot`,id:`copilot`,\"data-child-heading-ids\":`[\"connect-github-copilot-to-reflection\",\"run-a-first-task-in-github-copilot\",\"known-issues-with-github-copilot\"]`,children:[_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://code.visualstudio.com/docs/copilot/overview`,children:`GitHub Copilot`}),` in Visual Studio Code can use your own model provider for its chat and agent. These steps were tested with VS Code 1.146.`]}),_jsx(_components.p,{children:`You need:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`VS Code 1.146 or later, signed in to GitHub Copilot. There’s nothing else to install.`}),`\n`,_jsx(_components.li,{children:`A Copilot account that’s allowed to add custom models with your own API key. On Copilot Business and Copilot Enterprise, organization admins can turn this off.`}),`\n`]}),_jsx(Heading,{level:`3`,id:`connect-github-copilot-to-reflection`,children:`Connect GitHub Copilot to Reflection`}),_jsxs(Steps,{children:[_jsxs(Step,{title:`Add Reflection as a model provider`,id:`copilot-add-provider`,children:[_jsxs(_components.p,{children:[`In VS Code, open the Command Palette and run `,_jsx(_components.strong,{children:`Chat: Manage Language Models`}),`. Select `,_jsx(_components.strong,{children:`Add Models`}),`, then `,_jsx(_components.strong,{children:`Custom Endpoint`}),`, and answer the prompts:`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Prompt`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Group Name`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Reflection`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`API Key`}),_jsxs(_components.td,{children:[`Your `,_jsx(_components.a,{href:`/authentication`,children:`Reflection API key`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`API Type`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Chat Completions`})})]})]})]}),_jsxs(_components.p,{children:[`VS Code stores the key in its secret storage, then opens `,_jsx(_components.code,{children:`chatLanguageModels.json`}),` with a new model entry in the `,_jsx(_components.code,{children:`Reflection`}),` group.`]})]}),_jsxs(Step,{title:`Add the Beam model`,id:`copilot-add-model`,children:[_jsx(_components.p,{children:`Fill in the model entry so that the group reads:`}),_jsx(CodeBlock,{filename:`chatLanguageModels.json`,icon:`file-code`,numberOfLines:`19`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`19`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`[`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`name`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`Reflection`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`vendor`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`customendpoint`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`apiType`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`chat-completions`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`models`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`id`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`Beam-1.0-501B-A23B`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`name`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`Beam-1.0-501B-A23B`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`url`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:` \"`}),_jsx(_components.span,{style:{color:`#B56959`,\"--shiki-dark\":`#C98A7D`},children:`https://api.reflection.ai/openai/v1`}),_jsx(_components.span,{style:{color:`#B5695977`,\"--shiki-dark\":`#C98A7D77`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`toolCalling`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#1E754F`,\"--shiki-dark\":`#4D9375`},children:` true`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`vision`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#1E754F`,\"--shiki-dark\":`#4D9375`},children:` false`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`thinking`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#1E754F`,\"--shiki-dark\":`#4D9375`},children:` true`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`maxInputTokens`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#2F798A`,\"--shiki-dark\":`#4C9A91`},children:` 917504`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:` \"`}),_jsx(_components.span,{style:{color:`#998418`,\"--shiki-dark\":`#B8A965`},children:`maxOutputTokens`}),_jsx(_components.span,{style:{color:`#99841877`,\"--shiki-dark\":`#B8A96577`},children:`\"`}),_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`:`}),_jsx(_components.span,{style:{color:`#2F798A`,\"--shiki-dark\":`#4C9A91`},children:` 131072`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#999999`,\"--shiki-dark\":`#666666`},children:`]`})}),`\n`]})})}),_jsxs(_components.p,{children:[`The group in your file also has an `,_jsx(_components.code,{children:`apiKey`}),` line, which VS Code added and which refers to the stored key. Leave it as it is, and don’t type the key into the file. Copilot can’t read the key from an environment variable, so it doesn’t use `,_jsx(_components.code,{children:`REFLECTION_API_KEY`}),`. To change the key later, use `,_jsx(_components.strong,{children:`Update API Key`}),` on the `,_jsx(_components.code,{children:`Reflection`}),` group in `,_jsx(_components.strong,{children:`Chat: Manage Language Models`}),`.`]}),_jsx(_components.p,{children:`Copilot doesn’t read model details from the API, so the model entry describes Beam:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`url`}),` is the OpenAI-compatible base URL. Copilot adds `,_jsx(_components.code,{children:`/chat/completions`}),` itself.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`toolCalling`}),` lets Copilot’s agent read files, edit code, and run commands with the model.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`vision`}),` is `,_jsx(_components.code,{children:`false`}),` because the API accepts `,_jsx(_components.a,{href:`/openai-compatibility#input`,children:`text input only`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`thinking`}),` is required. With it, Copilot sends the model’s reasoning back with each earlier assistant turn, as described in `,_jsx(_components.a,{href:`/reasoning#reasoning-in-multi-turn-conversations`,children:`Reasoning`}),`. Without it, the request after the model’s first tool call fails with `,_jsx(_components.code,{children:`400 missing_required_parameter`}),`. See `,_jsx(_components.a,{href:`/coding-agents-quickstart#troubleshooting-reasoning-content`,children:`Troubleshooting`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`maxOutputTokens`}),` is the `,_jsx(_components.a,{href:`/models`,children:`max output`}),`, 128K tokens. `,_jsx(_components.code,{children:`maxInputTokens`}),` is the 1M-token context window minus that, because the context window counts the prompt and the output together.`]}),`\n`]})]})]}),_jsx(Heading,{level:`3`,id:`run-a-first-task-in-github-copilot`,children:`Run a first task in GitHub Copilot`}),_jsxs(_components.p,{children:[`Open the sample project folder in VS Code. In the Chat view, choose `,_jsx(_components.code,{children:`Beam-1.0-501B-A23B`}),` in the model picker and `,_jsx(_components.strong,{children:`Agent`}),` in the mode picker, then enter:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Run the tests with python3 -m unittest, find and fix the bug, then run the tests again to confirm they pass.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsxs(_components.p,{children:[`Review what `,agent_4,` reports. The intended fix replaces `,_jsx(_components.code,{children:`len(nums) + 1`}),` with `,_jsx(_components.code,{children:`len(nums)`}),` in `,_jsx(_components.code,{children:`stats.py`}),`. Confirm the result yourself:`]}),_jsx(CodeBlock,{filename:``,icon:`terminal`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`python3`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` -m unittest`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#59873A`,\"--shiki-dark\":`#80A665`},children:`git`}),_jsx(_components.span,{style:{color:`#393A34`,\"--shiki-dark\":`#DBD7CAEE`},children:` diff`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`The expected result is passing tests and this one-line change to `,_jsx(_components.code,{children:`stats.py`}),`:`]}),_jsx(CodeBlock,{filename:`stats.py`,icon:`python`,numberOfLines:`2`,language:`diff`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`diff`,children:_jsxs(_components.code,{language:`diff`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#B31D28`,\"--shiki-dark\":`#FDAEB7`},children:`- return sum(nums) / (len(nums) + 1)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#85E89D`},children:`+ return sum(nums) / len(nums)`})}),`\n`]})})}),_jsx(_components.p,{children:`The model can take a different path to the same fix, for example by editing the file with a shell command instead of an edit tool.`}),_jsx(Heading,{level:`3`,id:`known-issues-with-github-copilot`,children:`Known issues with GitHub Copilot`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`If `,_jsx(_components.code,{children:`thinking`}),` isn’t `,_jsx(_components.code,{children:`true`}),` for the model, the session fails after the first tool call with `,_jsx(_components.code,{children:`Missing required parameter: 'messages[N].reasoning_content'`}),`, and Copilot shows “Sorry, your request failed”, saying it retried 5 times. Set `,_jsx(_components.code,{children:`\"thinking\": true`}),` in `,_jsx(_components.code,{children:`chatLanguageModels.json`}),`, then start a new chat. See `,_jsx(_components.a,{href:`#troubleshooting-reasoning-content`,children:`Troubleshooting`}),`.`]}),`\n`,_jsx(_components.li,{children:`Copilot sends some extra fields of its own with each request. The API ignores them, and they don’t affect the task.`}),`\n`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`limits`,children:`Limits`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`For Pi, OpenCode, Hermes, and GitHub Copilot, configure an OpenAI-compatible Chat Completions provider. The public API supports Chat Completions and Models, not the OpenAI Responses API. Mirror uses its built-in Reflection provider. See `,_jsx(_components.a,{href:`/openai-compatibility`,children:`OpenAI compatibility`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Coding agents can send many model requests while completing a task. These count toward your organization’s `,_jsx(_components.a,{href:`/rate-limits`,children:`rate limits`}),` like any other request.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`troubleshooting`,children:`Troubleshooting`}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`401 Unauthorized`,id:`troubleshooting-401`,children:[_jsxs(_components.p,{children:[`The API key is missing, malformed, or not valid. Check that `,_jsx(_components.code,{children:`REFLECTION_API_KEY`}),` is exported in the shell you started the agent from: run the `,_jsx(_components.a,{href:`#check-the-key`,children:`key check`}),` in that shell. If you added the export to your shell profile, open a new terminal or `,_jsx(_components.code,{children:`source`}),` the profile. See `,_jsx(_components.a,{href:`/authentication`,children:`Authentication`}),`.`]}),_jsxs(_components.p,{children:[`If Mirror uses a saved key that’s wrong, run `,_jsx(_components.code,{children:`/logout`}),` and paste a new key. If Pi prints `,_jsx(_components.code,{children:`No models available`}),` or `,_jsx(_components.code,{children:`No API key found`}),`, or OpenCode prints `,_jsx(_components.code,{children:`Provide an API key or Playground credential in the Authorization header`}),`, `,_jsx(_components.code,{children:`REFLECTION_API_KEY`}),` isn’t set in that shell. For OpenCode, it can instead be missing from the background service: run `,_jsx(_components.code,{children:`opencode service restart`}),` from a shell where the key is set. OpenCode reports a wrong key as `,_jsx(_components.code,{children:`Incorrect API key provided`}),`, without the status code. Hermes shows the same message when the key is unset, and suggests `,_jsx(_components.code,{children:`hermes setup`}),`; ignore that, because the `,_jsx(_components.a,{href:`#hermes`,children:`Hermes guide`}),` reads the key through `,_jsx(_components.code,{children:`key_env`}),` instead. `,_jsx(_components.code,{children:`~/.hermes/logs/errors.log`}),` says when `,_jsx(_components.code,{children:`REFLECTION_API_KEY`}),` is empty or unset. In GitHub Copilot, re-enter the key with `,_jsx(_components.strong,{children:`Update API Key`}),` in `,_jsx(_components.strong,{children:`Chat: Manage Language Models`}),`; Copilot doesn’t read `,_jsx(_components.code,{children:`REFLECTION_API_KEY`}),`.`]})]}),_jsx(Accordion,{title:`404 or model not found`,id:`troubleshooting-404`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Check that the model ID is exactly `,_jsx(_components.code,{children:`Beam-1.0-501B-A23B`}),`, including capitalization. OpenCode reports a wrong ID as `,_jsx(_components.code,{children:`The model [\u003cID>] you requested is unavailable`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`In Pi, OpenCode, Hermes, or GitHub Copilot, check that the base URL is `,_jsx(_components.code,{children:`https://api.reflection.ai/openai/v1`}),`, ending in `,_jsx(_components.code,{children:`/openai/v1`}),` with no trailing path such as `,_jsx(_components.code,{children:`/chat/completions`}),`. The agent adds that path itself. With a trailing path, OpenCode prints `,_jsx(_components.code,{children:`Provider request failed with HTTP 404: 404 page not found`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`In Mirror, run `,_jsx(_components.code,{children:`/model`}),` and select `,_jsx(_components.strong,{children:`Reflection API`}),`, its built-in Reflection provider, or run `,_jsx(_components.code,{children:`/model reflection`}),`. You do not set a base URL for that provider.`]}),`\n`]})}),_jsx(Accordion,{title:`429 Too Many Requests`,id:`troubleshooting-429`,children:_jsxs(_components.p,{children:[`A rate limit was exceeded. Wait and retry the task, or run fewer agent sessions at once. See `,_jsx(_components.a,{href:`/rate-limits`,children:`Rate limits`}),`.`]})}),_jsx(Accordion,{title:`Timeouts or 502 and 503 errors`,id:`troubleshooting-timeouts`,children:_jsxs(_components.p,{children:[`Reasoning on a large task can take a while before the first output appears. If requests fail with `,_jsx(_components.code,{children:`502`}),` or `,_jsx(_components.code,{children:`503`}),`, or time out repeatedly, retry the task. See `,_jsx(_components.a,{href:`/errors#retrying`,children:`Errors`}),`.`]})}),_jsxs(Accordion,{title:`400: Missing required parameter reasoning_content`,id:`troubleshooting-reasoning-content`,children:[_jsxs(_components.p,{children:[`Every request in a session fails with `,_jsx(_components.code,{children:`400 missing_required_parameter`}),`:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes vitesse-light vitesse-dark`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#121212`,color:`#393a34`,\"--shiki-dark\":`#dbd7caee`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Missing required parameter: 'messages[N].reasoning_content'. This model needs the reasoning of every earlier assistant message: send back the 'reasoning_content' returned with that message. If 'reasoning_content' is not available, consider starting a new session or conversation history.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsxs(_components.p,{children:[`The model sometimes returns a tool-call step without reasoning. An agent that sends that step back without `,_jsx(_components.code,{children:`reasoning_content`}),` gets this error on every later request in the session. If the agent can send custom request headers, set `,_jsx(_components.a,{href:`/reasoning#assistant-messages-without-reasoning`,children:_jsx(_components.code,{children:`Reflection-Missing-Reasoning-Strategy: auto`})}),` to have the API accept such steps. Otherwise, start a new session: `,_jsx(_components.code,{children:`/clear`}),` in Mirror, `,_jsx(_components.code,{children:`/new`}),` in Pi, or `,_jsx(_components.code,{children:`opencode run`}),` without `,_jsx(_components.code,{children:`-c`}),` in OpenCode. In Hermes, check that `,_jsx(_components.code,{children:`hermes config get model.reasoning_echo`}),` prints `,_jsx(_components.code,{children:`true`}),`. In GitHub Copilot, check that `,_jsx(_components.code,{children:`thinking`}),` is `,_jsx(_components.code,{children:`true`}),` for the model in `,_jsx(_components.code,{children:`chatLanguageModels.json`}),`, then start a new chat.`]})]}),_jsx(Accordion,{title:`The agent uses a different model`,id:`troubleshooting-other-model`,children:_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Check the model name the agent prints when it starts.`}),`\n`,_jsxs(_components.li,{children:[`In Mirror, use `,_jsx(_components.code,{children:`/model reflection`}),` to change the saved model selection. Launching with `,_jsx(_components.code,{children:`mirror --api reflection --model Beam-1.0-501B-A23B`}),` uses it for that launch only.`]}),`\n`,_jsx(_components.li,{children:`In Pi, OpenCode, or Hermes, check the default provider and model in the configuration shown in its guide.`}),`\n`,_jsx(_components.li,{children:`In GitHub Copilot, check the model picker in the Chat view.`}),`\n`]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`share-feedback`,children:`Share feedback`}),`\n`,_jsxs(_components.p,{children:[`For Mirror CLI, open the `,_jsx(_components.a,{href:`https://github.com/reflection-oss/mirror/issues/new/choose`,children:`GitHub feedback form`}),`. Review your report before submitting and remove private information from any attached logs. See `,_jsx(_components.a,{href:`/mirror-cli-reference#report-a-bug`,children:`reporting a bug`}),`.`]}),`\n`,_jsx(_components.p,{children:`If a guide on this page doesn’t work for you, keep a note of the agent and its version, your operating system, the command you ran, and the error message. Leave out your API key.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{agent_4,agent_3,agent_2,agent_1,agent_0,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"vitesse-light","dark":"vitesse-dark"}},"config":{},"pageMetadata":{"title":"Mirror CLI quickstart","sidebarTitle":"Quickstart","tag":"Beta","description":"Set up Mirror CLI, or another coding agent, with Reflection models and complete a first coding task","href":"/coding-agents-quickstart"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[18545,18560,"`Mirror CLI`,` repor"],[48808,48831,"`Pi`,` reports. The "],[90481,90498,"`OpenCode`,` reports"],[124572,124591,"`Hermes`,` reports. "],[147683,147694,"`GitHub Copilot`,` r"]]},"mdxExtracts":{"tableOfContents":[{"title":"Before you start","slug":"before-you-start","depth":2,"children":[]},{"title":"Set up your agent","slug":"set-up-your-agent","depth":2,"children":[{"title":"Install Mirror CLI","slug":"install-mirror-cli","depth":3,"children":[],"tabId":"mirror"},{"title":"Connect Mirror CLI to Reflection","slug":"connect-mirror-cli-to-reflection","depth":3,"children":[],"tabId":"mirror"},{"title":"Run a first task in Mirror CLI","slug":"run-a-first-task-in-mirror-cli","depth":3,"children":[],"tabId":"mirror"},{"title":"Enable web search in Mirror CLI (optional)","slug":"enable-web-search-in-mirror-cli-optional","depth":3,"children":[],"tabId":"mirror"},{"title":"Sessions and permissions in Mirror CLI","slug":"sessions-and-permissions-in-mirror-cli","depth":3,"children":[],"tabId":"mirror"},{"title":"Install Pi","slug":"install-pi","depth":3,"children":[],"tabId":"pi"},{"title":"Connect Pi to Reflection","slug":"connect-pi-to-reflection","depth":3,"children":[],"tabId":"pi"},{"title":"Run a first task in Pi","slug":"run-a-first-task-in-pi","depth":3,"children":[],"tabId":"pi"},{"title":"Sessions and permissions in Pi","slug":"sessions-and-permissions-in-pi","depth":3,"children":[],"tabId":"pi"},{"title":"Known issues with Pi","slug":"known-issues-with-pi","depth":3,"children":[],"tabId":"pi"},{"title":"Install OpenCode","slug":"install-opencode","depth":3,"children":[],"tabId":"opencode"},{"title":"Connect OpenCode to Reflection","slug":"connect-opencode-to-reflection","depth":3,"children":[],"tabId":"opencode"},{"title":"Run a first task in OpenCode","slug":"run-a-first-task-in-opencode","depth":3,"children":[],"tabId":"opencode"},{"title":"Sessions and permissions in OpenCode","slug":"sessions-and-permissions-in-opencode","depth":3,"children":[],"tabId":"opencode"},{"title":"Known issues with OpenCode","slug":"known-issues-with-opencode","depth":3,"children":[],"tabId":"opencode"},{"title":"Install Hermes Agent","slug":"install-hermes-agent","depth":3,"children":[],"tabId":"hermes"},{"title":"Connect Hermes to Reflection","slug":"connect-hermes-to-reflection","depth":3,"children":[],"tabId":"hermes"},{"title":"Run a first task in Hermes","slug":"run-a-first-task-in-hermes","depth":3,"children":[],"tabId":"hermes"},{"title":"Sessions and permissions in Hermes","slug":"sessions-and-permissions-in-hermes","depth":3,"children":[],"tabId":"hermes"},{"title":"Known issues with Hermes","slug":"known-issues-with-hermes","depth":3,"children":[],"tabId":"hermes"},{"title":"Connect GitHub Copilot to Reflection","slug":"connect-github-copilot-to-reflection","depth":3,"children":[],"tabId":"copilot"},{"title":"Run a first task in GitHub Copilot","slug":"run-a-first-task-in-github-copilot","depth":3,"children":[],"tabId":"copilot"},{"title":"Known issues with GitHub Copilot","slug":"known-issues-with-github-copilot","depth":3,"children":[],"tabId":"copilot"}]},{"title":"Limits","slug":"limits","depth":2,"children":[]},{"title":"Troubleshooting","slug":"troubleshooting","depth":2,"children":[]},{"title":"Share feedback","slug":"share-feedback","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"reflection-ai","siteName":"Reflection Developer Docs","title":"Mirror CLI quickstart - Reflection Developer Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-19T01:25:22.021Z","gitLastModified":"2026-11-19T01:25:10.000Z","originalFileLocation":"coding-agents-quickstart.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Set up Mirror CLI, or another coding agent, with Reflection models and complete a first coding task\">\u003cmeta data-mint-head name=\"application-name\" content=\"Reflection Developer Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/reflection-ai/jwXyL2gkH91EW3EL/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/reflection-ai/jwXyL2gkH91EW3EL/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/reflection-ai/jwXyL2gkH91EW3EL/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/reflection-ai/jwXyL2gkH91EW3EL/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/reflection-ai/jwXyL2gkH91EW3EL/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/reflection-ai/jwXyL2gkH91EW3EL/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/reflection-ai/jwXyL2gkH91EW3EL/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/reflection-ai/jwXyL2gkH91EW3EL/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/reflection-ai/jwXyL2gkH91EW3EL/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Mirror CLI quickstart - Reflection Developer Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Set up Mirror CLI, or another coding agent, with Reflection models and complete a first coding task\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Reflection Developer Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developers.reflection.ai/coding-agents-quickstart\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://reflection-ai.mintlify.site/_mintlify/api/og/v2?division=Mirror\u0026amp;title=Mirror+CLI+quickstart\u0026amp;description=Set+up+Mirror+CLI%2C+or+another+coding+agent%2C+with+Reflection+models+and+complete+a+first+coding+task\u0026amp;theme=042e12ebdcff97fefb737062\u0026amp;signature=850c3838a1a6917b3a65c9b50bcfc32cdd0e4d271f74df9f0cfb7728edac6014\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Mirror CLI quickstart - Reflection Developer Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Set up Mirror CLI, or another coding agent, with Reflection models and complete a first coding task\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://reflection-ai.mintlify.site/_mintlify/api/og/v2?division=Mirror\u0026amp;title=Mirror+CLI+quickstart\u0026amp;description=Set+up+Mirror+CLI%2C+or+another+coding+agent%2C+with+Reflection+models+and+complete+a+first+coding+task\u0026amp;theme=042e12ebdcff97fefb737062\u0026amp;signature=850c3838a1a6917b3a65c9b50bcfc32cdd0e4d271f74df9f0cfb7728edac6014\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/reflection-ai/jwXyL2gkH91EW3EL/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Reflection Developer Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1e3207\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developers.reflection.ai/coding-agents-quickstart\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/coding-agents-quickstart.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developers.reflection.ai/#organization\",\"name\":\"Reflection Developer Docs\",\"url\":\"https://developers.reflection.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/reflection-ai/QTuxzl6PxhZZjLhq/logo/light.svg?fit=max\u0026auto=format\u0026n=QTuxzl6PxhZZjLhq\u0026q=85\u0026s=58c942f905cb3bd4c0a14b113a3aee89\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developers.reflection.ai#website\",\"name\":\"Reflection Developer Docs\",\"url\":\"https://developers.reflection.ai\",\"publisher\":{\"@id\":\"https://developers.reflection.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.reflection.ai/coding-agents-quickstart#webpage\",\"url\":\"https://developers.reflection.ai/coding-agents-quickstart\",\"name\":\"Mirror CLI quickstart\",\"description\":\"Set up Mirror CLI, or another coding agent, with Reflection models and complete a first coding task\",\"dateModified\":\"2026-11-19T01:25:10.000Z\",\"isPartOf\":{\"@id\":\"https://developers.reflection.ai#website\"},\"breadcrumb\":{\"@id\":\"https://developers.reflection.ai/coding-agents-quickstart#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.reflection.ai/coding-agents-quickstart#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Get started\",\"item\":\"https://developers.reflection.ai/mirror-overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mirror CLI quickstart\",\"item\":\"https://developers.reflection.ai/coding-agents-quickstart\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://developers.reflection.ai/coding-agents-quickstart#article\",\"headline\":\"Mirror CLI quickstart\",\"name\":\"Mirror CLI quickstart\",\"description\":\"Set up Mirror CLI, or another coding agent, with Reflection models and complete a first coding task\",\"url\":\"https://developers.reflection.ai/coding-agents-quickstart\",\"mainEntityOfPage\":{\"@id\":\"https://developers.reflection.ai/coding-agents-quickstart#webpage\"},\"dateModified\":\"2026-11-19T01:25:10.000Z\",\"publisher\":{\"@id\":\"https://developers.reflection.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://developers.reflection.ai#website\"}}]}\u003c/script>","agentPointerHref":"/coding-agents-quickstart.md","siteName":"Reflection Developer Docs","nav":{"global":null,"tabs":[{"tab":"Home","icon":"house","pages":[{"title":"Home","href":"/introduction"}]},{"tab":"API","icon":"code","pages":[{"title":"API","href":"/api-overview"}]},{"tab":"Mirror","icon":"terminal","groups":[{"group":"Get started","pages":[{"title":"Mirror CLI overview","sidebarTitle":"Overview","tag":"Beta","description":"How Mirror CLI is organized, what's on screen, and how to steer and review the agent's work","href":"/mirror-overview"},{"title":"Mirror CLI quickstart","sidebarTitle":"Quickstart","tag":"Beta","href":"/coding-agents-quickstart"}]},{"group":"Guides","pages":[{"title":"Mirror workspaces","sidebarTitle":"Workspaces","description":"Run several Mirror CLI agents in parallel, each in its own checkout, then review and merge their work","href":"/mirror-workspaces"},{"title":"Mirror models and providers","sidebarTitle":"Models and providers","href":"/mirror-models"},{"title":"Mirror instructions and skills","sidebarTitle":"Instructions and skills","href":"/mirror-instructions-and-skills"},{"title":"Mirror connections and MCP servers","sidebarTitle":"Connections","href":"/mirror-mcp"},{"title":"Mirror extensions","sidebarTitle":"Extensions","href":"/mirror-extensions"}]},{"group":"Reference","pages":[{"title":"Mirror CLI reference","sidebarTitle":"CLI reference","href":"/mirror-cli-reference"}]}]},{"tab":"Deployment","icon":"server","pages":[{"title":"Deployment","href":"/deployment-overview"}]},{"tab":"Customization","icon":"sliders","pages":[{"title":"Customization","href":"/customization-overview"}]},{"tab":"Safety","icon":"shield-check","pages":[{"title":"Safety","href":"/laser-overview"}]},{"tab":"Gallery","icon":"images","pages":[{"title":"Gallery","href":"/gallery"}]}]},"basePath":"","title":"Mirror CLI quickstart - Reflection Developer Docs","deploymentId":"dpl_vSEmv961Ncyvz1psVwgUnTXQMSYk","buildId":"dpl_vSEmv961Ncyvz1psVwgUnTXQMSYk","dynamics":["10e4515597","07c022d89b","a74be98ba7"],"chunks":["BannerMarkdown-DnSAhvaM.js","dist-DIfYWxfm.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js","Frame-BRsfsIIG.js","DynamicMarkdown-NFqqduU7.js","zoom-image-lightbox-BguUeq2N.js","lightbox-handle-r17bVUz3.js"]}