Custom model options are not forwarded correctly when provider are using @ai-sdk\openai-compatible.
This can be mitigated by explicitly indicating "name" value in the provider config. E.g:
"openrouter": {
"options": {
"name": "OpenRouter" // models.options is not forwarded without this
},
"models": {
"qwen/qwen3-235b-a22b": {
"name": "Qwen3",
"tool_call": false,
"options": {
"OpenRouter": {
"provider": {
"order": [
"cerebras"
],
"allow_fallbacks": false
}
}
}
}
}
}
This is due to @ai-sdk\openai-compatible searching for providerOptions based on the provideerOptionsName attribute, which is not set by opencode by default. ai-sdk code responsible for option selection.
Custom model options are not forwarded correctly when provider are using @ai-sdk\openai-compatible.
This can be mitigated by explicitly indicating "name" value in the provider config. E.g:
This is due to @ai-sdk\openai-compatible searching for providerOptions based on the provideerOptionsName attribute, which is not set by opencode by default. ai-sdk code responsible for option selection.