Feature hasn't been suggested before.
Describe the enhancement you want to request
I defined a custom provider in my opencode.jsonc file (see below example).
If I start opencode and use the /provider command, I would expect my custom provider "fhgenie" to be shown in the list of providers. Howerver, it is not shown.
I would like to connect to my custom provider similar to github copilot provider, specifying some credentials in the command line.... that are stored as secret.
Currently I hard code my api key in opencode.jsonc. I am able to connect to the models using /models command.
=> Could you please support custom providers for the /provider and /connect command and clarify how to fully specify custom providers, including authentication?
Expected behavior: an improved config could support a syntax like
"Authorization": "Bearer ${secret.fhgenie}"
If the cutom secret does not yet exist, opencode asks for it and saves it as a secret.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"fhgenie": {
"npm": "@ai-sdk/openai-compatible",
"name": "FhGenie",
"options": {
"baseURL": "https://fhgenie.foo.de/v1",
"headers": {
"Authorization": "Bearer ***"
}
},
"models": {
"Kimi-K2-Thinking": {
"name": "Kimi-K2-Thinking"
},
}
}
}
}
Feature hasn't been suggested before.
Describe the enhancement you want to request
I defined a custom provider in my opencode.jsonc file (see below example).
If I start opencode and use the
/providercommand, I would expect my custom provider "fhgenie" to be shown in the list of providers. Howerver, it is not shown.I would like to connect to my custom provider similar to github copilot provider, specifying some credentials in the command line.... that are stored as secret.
Currently I hard code my api key in opencode.jsonc. I am able to connect to the models using /models command.
=> Could you please support custom providers for the /provider and /connect command and clarify how to fully specify custom providers, including authentication?
Expected behavior: an improved config could support a syntax like
"Authorization": "Bearer ${secret.fhgenie}"If the cutom secret does not yet exist, opencode asks for it and saves it as a secret.