エージェント

コーディングエージェントの設定

エージェントとオプションを選ぶと、インストールコマンド、設定ファイル、エージェントが実際にBeamを使っているか確認する方法が表示されます。Reflectionのコーディングエージェント向けクイックスタートに基づいています。

OpenCode
エージェント
デフォルトの推論の強さ
設定の保存先
ReflectionがOpenCode 1.18.34でテストしたオープンソースのターミナルエージェントです。interleaved.fieldは、reasoning_contentを送り返すよう指示します。設定に"model"を残してください。そうしないと、OpenCodeが別のプロバイダーのモデルで起動する場合があります。
  1. インストール

    bash
    curl -fsSL https://opencode.ai/install | bash
    # or: npm install -g opencode-ai
  2. 設定

    ターミナル
    export REFLECTION_API_KEY="<your API key>"
    
    # Check the key: the list should include Beam-501B-A23B
    curl https://api.reflection.ai/openai/v1/models -H "Authorization: Bearer $REFLECTION_API_KEY"
    opencode.json
    {
      "$schema": "https://opencode.ai/config.json",
      "provider": {
        "reflection": {
          "npm": "@ai-sdk/openai-compatible",
          "name": "Reflection",
          "options": {
            "baseURL": "https://api.reflection.ai/openai/v1",
            "apiKey": "{env:REFLECTION_API_KEY}"
          },
          "models": {
            "Beam-501B-A23B": {
              "name": "Beam-501B-A23B",
              "modalities": {
                "input": [
                  "text"
                ],
                "output": [
                  "text"
                ]
              },
              "limit": {
                "context": 262144,
                "output": 131072
              },
              "reasoning": true,
              "interleaved": {
                "field": "reasoning_content"
              },
              "variants": {
                "xhigh": {
                  "reasoningEffort": "xhigh"
                },
                "max": {
                  "reasoningEffort": "max"
                }
              }
            }
          }
        }
      },
      "model": "reflection/Beam-501B-A23B",
      "permission": {
        "bash": "ask",
        "edit": "ask"
      }
    }
  3. モデルを確認

    bash
    opencode models reflection
    # prints: reflection/Beam-501B-A23B
  4. 実行

    bash
    cd your-project
    opencode
    # one-shot: opencode run --variant high "<prompt>" </dev/null

既知の問題

400: 必須パラメーターreasoning_contentがありません

セッションからreasoningのないassistantステップが返されました。新しいセッションを開始してください(/new、または-cを付けずにopencode run)。Hermesでは、model.reasoning_echoがtrueになっていることを確認してください。

エージェントが別のモデルを使用している

エージェントが起動時に表示するモデル名を確認してください。Mirrorでは /model reflection を実行し、PiとOpenCodeでは設定ファイルでデフォルトのプロバイダーとモデルを確認してください。

404 またはモデルが見つからない

ベースURLは末尾が /openai/v1 で、その後に何も続かないようにしてください。モデルIDは正確に Beam-501B-A23B にしてください。

出力までに長い時間がかかる

Beamは回答の前に推論するため、大きなタスクでは時間がかかることがあります。502または503エラーが繰り返し発生する場合は、タスクを再試行してください。

ソース: developers.reflection.ai/coding-agents-quickstart