Skip to content

Instantly share code, notes, and snippets.

@svkozak
Last active August 13, 2025 01:39
Show Gist options
  • Select an option

  • Save svkozak/2ddde197abc2d5cc3945c32611b23f65 to your computer and use it in GitHub Desktop.

Select an option

Save svkozak/2ddde197abc2d5cc3945c32611b23f65 to your computer and use it in GitHub Desktop.
opencode plugin to remove / modify ProviderTransform options
// 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