You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Custom provider initialization fails with "fn3 is not a function #7792
Attempting to use a custom provider configuration results in a TypeError: fn3 is not a function during provider initialization. The custom provider feature appears to be incomplete or has compatibility issues.
opencode attempts to dynamically load a custom provider module but cannot find the corresponding create* function. The custom provider functionality is either incomplete or has compatibility issues.
These issues all relate to custom provider configuration failures, particularly with @ai-sdk/openai-compatible and other providers. Some report similar 'fnX is not a function' errors during provider initialization, while others report related configuration issues with custom providers.
Feel free to ignore if none of these address your specific case.
{ast login: Mon Apr 27 20:49:18 on console
"name": "UnknownError",ir ~ % opencode
"data": {
"message": "TypeError: fn3 is not a function. (In 'fn3(input)', 'fn3' is an instance of Object)\n at <anonymous> (src/plugin/index.ts:87:28)\n at processTicksAndRejections (native:7:39)"
}
}
same error on most recent version as of posting this with no custom model config afaik, running on void linux:
{
"name": "UnknownError",
"data": {
"message": "TypeError: fn3 is not a function. (In 'fn3(input)', 'fn3' is an instance of Object)\n at <anonymous> (src/plugin/index.ts:87:28)\n at processTicksAndRejections (native:7:39)"
}
}
I forgot to post why it was happening for me. I had custom plugin which was exporting some objects along with main plugin function.
I looked at their plugin implementation and figured out.
I forgot to post why it was happening for me. I had custom plugin which was exporting some objects along with main plugin function. I looked at their plugin implementation and figured out.
The only plugin I have is an old version of ohmyopencode back when it had to be installed via npm/npx, could you please provide a sort of "guide" on where to find plugins, what to search for inside a plugin, and what to do to fix the issue if what you did fixed the fn issue
remove "oh-my-opencode" plugin config work for me ,
vim ~/.config/opencode/opencode.json,
"plugin": ["oh-my-opencode", "opencode-antigravity-auth@1.3.1"],
Activity
github-actions commentedon Jan 11, 2026
This issue might be a duplicate of existing issues. Please check:
These issues all relate to custom provider configuration failures, particularly with @ai-sdk/openai-compatible and other providers. Some report similar 'fnX is not a function' errors during provider initialization, while others report related configuration issues with custom providers.
Feel free to ignore if none of these address your specific case.
adilovcode commentedon Jan 12, 2026
Any updates on this ?
thdxr commentedon Mar 25, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.
yuhuoji commentedon Apr 27, 2026
same error
viper968 commentedon Apr 30, 2026
same error on most recent version as of posting this with no custom model config afaik, running on void linux:
adilovcode commentedon Apr 30, 2026
I forgot to post why it was happening for me. I had custom plugin which was exporting some objects along with main plugin function.
I looked at their plugin implementation and figured out.
viper968 commentedon May 6, 2026
The only plugin I have is an old version of ohmyopencode back when it had to be installed via npm/npx, could you please provide a sort of "guide" on where to find plugins, what to search for inside a plugin, and what to do to fix the issue if what you did fixed the fn issue
Jayzhang1995 commentedon Jun 9, 2026
remove "oh-my-opencode" plugin config work for me ,
vim ~/.config/opencode/opencode.json,
"plugin": ["oh-my-opencode", "opencode-antigravity-auth@1.3.1"],