feat: forward provider options from model config#202
Merged
thdxr merged 3 commits intoanomalyco:devanomalyco/opencode:devfrom Jun 20, 2025
0ximjosh:feat/provider-options0ximjosh/opencode:feat/provider-optionsCopy head branch name to clipboard
Merged
feat: forward provider options from model config#202thdxr merged 3 commits intoanomalyco:devanomalyco/opencode:devfrom 0ximjosh:feat/provider-options0ximjosh/opencode:feat/provider-optionsCopy head branch name to clipboard
thdxr merged 3 commits intoanomalyco:devanomalyco/opencode:devfrom
0ximjosh:feat/provider-options0ximjosh/opencode:feat/provider-optionsCopy head branch name to clipboard
Conversation
Contributor
|
nice - should we just call this |
Contributor
Author
|
that makes sense to me. I'll update it accordingly. |
Contributor
Author
|
this should be ready to go |
Contributor
|
models.dev is tracking tool_call now so i matched the field - let the option field be simplified |
achembarpu
pushed a commit
to achembarpu/opencode
that referenced
this pull request
Aug 4, 2025
Co-authored-by: Dax Raad <d@ironbay.co>
m-pa
pushed a commit
to m-pa/opencode
that referenced
this pull request
Dec 4, 2025
…lyco#202) Added an ErrorBoundary component that displays the error stack trace instead of a black screen <img width="1146" height="488" alt="Screenshot 2025-10-06 at 13 33 17" src="https://github.com/user-attachments/assets/648acae3-fca3-4677-bd93-9519465b3f75" />
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows users to forward
providerOptionsto Vercel'saipackage. This isparticularly useful for
openrouterwhen needing to select specific providers.This allows the user to follow the documentation on
providerOptions1:1 with agiven providers sdk.
Example
Following this documentation for adding
provideroptions to the body of a request, we can usethe following
opencode.jsonto select a specific provider{ "$schema": "https://opencode.ai/config.json", "provider": { "openrouter": { "npm": "@openrouter/ai-sdk-provider", "name": "OpenRouter", "options": {}, "models": { "deepseek/deepseek-r1:free": { "tools": false, "id": "deepseek/deepseek-r1:free", "name": "DeepSeek: R1 (free)", "providerOptions": { "openrouter": { "provider": { "allow_fallbacks": false, "only": [ "targon" ] } } } } } } } }Notes
I added the
toolsfield to the model info as an optional bool, sinceopenrouter providers may or may not support tools (in my case, Targon does not
yet support tool calling), so this needs to be dynamic per model. Maybe it makes
sense to name this something closer to
disableTools?Closes #186