Last active
August 13, 2025 01:39
-
-
Save svkozak/2ddde197abc2d5cc3945c32611b23f65 to your computer and use it in GitHub Desktop.
opencode plugin to remove / modify ProviderTransform options
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // place file in ~/.config/opencode/plugin | |
| import type { Plugin } from "@opencode-ai/plugin" | |
| export const ProviderTransformPrune: Plugin = async () => { | |
| return { | |
| "chat.params": async ({ model, provider }, out) => { | |
| const opt = { ...(out.options ?? {}) } | |
| // Remove ProviderTransform.options() additions only as needed | |
| delete opt.promptCacheKey | |
| if (model.id.includes("gpt-5")) { | |
| delete opt.reasoningEffort | |
| delete opt.textVerbosity | |
| } | |
| opt['reasoning_effort'] = "low" // Or set any additional params | |
| out.options = opt | |
| }, | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment