mirror of
https://github.com/sst/opencode.git
synced 2025-07-07 16:14:59 +00:00
allow setting options in global provider store
This commit is contained in:
parent
b8bbee4718
commit
ebe51534a1
2 changed files with 4 additions and 3 deletions
|
@ -83,6 +83,9 @@ Start with a `provider.toml` file in `~/.config/opencode/providers`
|
|||
name = "OpenRouter"
|
||||
env = ["OPENROUTER_API_KEY"]
|
||||
npm = "@openrouter/ai-sdk-provider"
|
||||
|
||||
[options]
|
||||
baseURL = "https://api.openrouter.ai" # optional settings
|
||||
```
|
||||
|
||||
And models in `~/.config/opencode/providers/openrouter/models/[model-id]`
|
||||
|
|
|
@ -203,9 +203,7 @@ export namespace Provider {
|
|||
}
|
||||
|
||||
// load config
|
||||
for (const [providerID, provider] of Object.entries(
|
||||
config.provider ?? {},
|
||||
)) {
|
||||
for (const [providerID, provider] of configProviders) {
|
||||
mergeProvider(providerID, provider.options ?? {}, "config")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue