Skip to content

Commit 8f83f8f

Browse files
GitHub Copilot CLICopilot
andcommitted
Fix OpenChamber /plan planner model compatibility
Set planner agent model at startup via OPENCODE_PLANNER_MODEL (default sonnet) so /plan runs with a broadly available model profile. Update env template accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent a885c6e commit 8f83f8f

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

.devcontainer/startup.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,18 @@ else
177177
echo "⚠️ OpenCode ECC設定修正スクリプトまたはagentsディレクトリが見つかりません"
178178
fi
179179

180+
# /plan は planner agent を利用するため、使用可能性の高いモデルへ固定する
181+
PLANNER_MODEL=${OPENCODE_PLANNER_MODEL:-sonnet}
182+
PLANNER_AGENT_FILE="/home/vscode/.opencode/agents/planner.md"
183+
if [ -f "$PLANNER_AGENT_FILE" ]; then
184+
if grep -q '^model:\s*' "$PLANNER_AGENT_FILE"; then
185+
sed -i -E "s/^model:\s*.*/model: $PLANNER_MODEL/" "$PLANNER_AGENT_FILE"
186+
else
187+
sed -i -E "/^tools:/a model: $PLANNER_MODEL" "$PLANNER_AGENT_FILE"
188+
fi
189+
echo "✅ planner agent モデルを設定: $PLANNER_MODEL"
190+
fi
191+
180192
OPENCODE_LOG=/tmp/opencode-serve.log
181193
OPENCHAMBER_LOG=/tmp/openchamber.log
182194

.env.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ OPENCODE_HOST=0.0.0.0
2121
OPENCODE_PORT=4095
2222
OPENCHAMBER_HOST=0.0.0.0
2323
OPENCHAMBER_PORT=3000
24+
# /plan 用 planner agent のモデル(互換性重視で sonnet 推奨)
25+
OPENCODE_PLANNER_MODEL=sonnet
2426

2527
# 📁 OpenChamber の初期プロジェクトルート(オプション)
2628
# 指定ディレクトリ配下のフォルダを初期プロジェクトとして追加

0 commit comments

Comments
 (0)