Skip to content

fix: align model capabilities schema with OpenCode v2 root properties…#26

Open
ganimalqudhaifi wants to merge 5 commits into
anthonyhaussman:mainfrom
ganimalqudhaifi:fix/align-model-capabilities
Open

fix: align model capabilities schema with OpenCode v2 root properties…#26
ganimalqudhaifi wants to merge 5 commits into
anthonyhaussman:mainfrom
ganimalqudhaifi:fix/align-model-capabilities

Conversation

@ganimalqudhaifi

@ganimalqudhaifi ganimalqudhaifi commented Jul 23, 2026

Copy link
Copy Markdown

Based on the dev branch, added root properties (reasoning, attachment, tool_call, modalities) for OpenCode v2 compatibility.

Summary by CodeRabbit

  • Bug Fixes
    • Improved compatibility with OpenCode v2 model caching.
    • Preserved model-specific settings, including reasoning, attachments, tool calls, temperature, modalities, and input/output capabilities.
    • Prevented model configuration changes from unintentionally affecting shared defaults.

@ganimalqudhaifi

Copy link
Copy Markdown
Author

you can check this different with 'opencode models google-agy --verbose'

Repository owner deleted a comment from coderabbitai Bot Jul 24, 2026
@anthonyhaussman
anthonyhaussman force-pushed the fix/align-model-capabilities branch from 0a20c9f to 123b483 Compare July 24, 2026 05:06
Repository owner deleted a comment from coderabbitai Bot Jul 24, 2026
Comment thread src/plugin.ts
@ganimalqudhaifi

Copy link
Copy Markdown
Author

I've pushed a fix to this branch. The actual root cause wasn't the spread order in getModelsList, but rather the config hook forcefully assigning JSON.parse(JSON.stringify(STATIC_MODELS)) to config.provider[AGY_PROVIDER_ID].models. This wiped out all custom capabilities specified in the user's opencode.json before getModelsList was even executed. I've updated the config hook to invoke getModelsList() directly so it deep-merges properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants