fix: align model capabilities schema with OpenCode v2 root properties…#26
Open
ganimalqudhaifi wants to merge 2 commits into
Open
fix: align model capabilities schema with OpenCode v2 root properties…#26ganimalqudhaifi wants to merge 2 commits into
ganimalqudhaifi wants to merge 2 commits into
Conversation
Author
|
you can check this different with 'opencode models google-agy --verbose' |
… (reasoning, attachment, tool_call, modalities)
anthonyhaussman
force-pushed
the
fix/align-model-capabilities
branch
from
July 24, 2026 05:06
0a20c9f to
123b483
Compare
Comment on lines
+340
to
+355
| temperature: (existing as any).temperature ?? (modelDetails as any).temperature, | ||
| modalities: { | ||
| ...((existing as any).modalities || {}), | ||
| ...((modelDetails as any).modalities || {}) | ||
| }, | ||
| capabilities: { | ||
| ...(existing.capabilities || {}), | ||
| ...(modelDetails.capabilities || {}), | ||
| input: { | ||
| ...(existing.capabilities?.input || {}), | ||
| ...(modelDetails.capabilities?.input || {}) | ||
| }, | ||
| output: { | ||
| ...(existing.capabilities?.output || {}), | ||
| ...(modelDetails.capabilities?.output || {}) | ||
| } |
Owner
There was a problem hiding this comment.
The static defaults (modelDetails) are being spread after the custom configurations (existing) for modalities and capabilities. This causes the static defaults to silently overwrite any custom model configurations provided by the user/provider.
Suggested change
| temperature: (existing as any).temperature ?? (modelDetails as any).temperature, | |
| modalities: { | |
| ...((existing as any).modalities || {}), | |
| ...((modelDetails as any).modalities || {}) | |
| }, | |
| capabilities: { | |
| ...(existing.capabilities || {}), | |
| ...(modelDetails.capabilities || {}), | |
| input: { | |
| ...(existing.capabilities?.input || {}), | |
| ...(modelDetails.capabilities?.input || {}) | |
| }, | |
| output: { | |
| ...(existing.capabilities?.output || {}), | |
| ...(modelDetails.capabilities?.output || {}) | |
| } | |
| modalities: { | |
| ...((modelDetails as any).modalities || {}), | |
| ...((existing as any).modalities || {}) | |
| }, | |
| capabilities: { | |
| ...(modelDetails.capabilities || {}), | |
| ...(existing.capabilities || {}), | |
| input: { | |
| ...(modelDetails.capabilities?.input || {}), | |
| ...(existing.capabilities?.input || {}) | |
| }, | |
| output: { | |
| ...(modelDetails.capabilities?.output || {}), | |
| ...(existing.capabilities?.output || {}) | |
| } | |
| } |
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.
Based on the dev branch, added root properties (reasoning, attachment, tool_call, modalities) for OpenCode v2 compatibility.
Summary by CodeRabbit