opencode-content-filterOpenCode plugin that surfaces provider content-filter finish reasons instead of leaving silent empty turns
0
21
近 7 天 2
24.6
生态多维模型
2 个月前
2026-06-08
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-content-filter@0.1.1"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-content-filter@0.1.1"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D opencode-content-filteropencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
OpenCode plugin that makes provider content-filter finishes visible instead of leaving an apparently silent empty assistant turn.
Install
opencode plugin opencode-content-filter -g
This installs the package globally and updates your opencode.json and tui.json automatically.
Or manually:
npm install -g opencode-content-filter
Then add "opencode-content-filter" to the plugin array in both opencode.json and tui.json.
For opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-content-filter"]
}
For tui.json:
{
"$schema": "https://opencode.ai/tui.json",
"plugin": ["opencode-content-filter"]
}
Usage
The plugin watches assistant messages for finish: "content-filter" without visible text.
In the TUI, it shows an error toast naming the model that was blocked.
In opencode run ..., it writes a clear warning to stderr and sets a non-zero exit code.
Limitations
The plugin reports content-filter finishes but cannot mutate persisted assistant message.error. For SDK and persistent transcript behavior, OpenCode core should still surface content-filter finish reasons as errors.
License
MIT