Skip to content

fix(opencode-config): parse all model capabilities from schema - #917

Open
mihado wants to merge 5 commits into
dohooo:mainfrom
mihado:bug/opencode-custom-provider
Open

fix(opencode-config): parse all model capabilities from schema#917
mihado wants to merge 5 commits into
dohooo:mainfrom
mihado:bug/opencode-custom-provider

Conversation

@mihado

@mihado mihado commented Jul 2, 2026

Copy link
Copy Markdown

I was using Helmor with a custom OpenAI compatible server and found out that Helmor does not preserve the capabilities provided from the server. The opencode config got replaced with the default values as defined in the source code.

I'm making this draft PR for early feedback (working extensively with Minimax & GPT-5.4 and using CI for tests). If this is the right direction I'll setup proper toolchain and test locally.

This change:

  • expands CustomProviderModel to carry OpenCode capability fields through the provider pipeline
  • teaches the shared /v1/models parser to read those fields
  • maps fetched values into OpenCode config writes
  • keeps current fallback defaults only when the API omits the four boolean capability flags

Behavior

  • If the provider returns a capability field, Helmor now writes that value through to OpenCode config.
  • If the provider omits:
    • reasoning → fallback true
    • tool_call → fallback false
    • temperature → fallback false
    • attachment → fallback false
  • Existing on-disk model fields are not preserved or merged; a fetch rewrites from provider data plus the fallback defaults above.

@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

@mihado is attempting to deploy a commit to the Caspian's Team Team on Vercel.

A member of the Team first needs to authorize it.

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