Skip to content

fix(opencode): default custom provider capabilities to true for image…#26422

Open
RheagalFire wants to merge 2 commits intoanomalyco:devfrom
RheagalFire:fix/custom-provider-capabilities
Open

fix(opencode): default custom provider capabilities to true for image…#26422
RheagalFire wants to merge 2 commits intoanomalyco:devfrom
RheagalFire:fix/custom-provider-capabilities

Conversation

@RheagalFire
Copy link
Copy Markdown

Issue for this PR

Closes #22673

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Custom models added via config get restrictive capability defaults — reasoning, attachment, temperature, and image input all default to false. This means models behind a LiteLLM proxy are classified as
text-only even when they support images and reasoning.

The fix changes the fallback defaults in provider.ts for config-provided models:

  • temperature: falsetrue
  • reasoning: falsetrue
  • attachment: falsetrue
  • input.image: falsetrue

These only apply when no explicit value is set by the user or inherited from models.dev. Users can still set false explicitly in their config.

How did you verify your code works?

  • bun turbo typecheck passes (12/12 packages)
  • Husky pre-push hook passes

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found one potentially related PR that addresses similar custom provider capability issues:

Related PR:

The current PR (#26422) is a more comprehensive fix that addresses multiple capability defaults (temperature, reasoning, attachment, image) for all custom config-provided models, building on the targeted fix in #25919.

These are related efforts but #25919 appears to be a narrower predecessor fix that handles temperature specifically, while the current PR provides a broader solution.

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.

Custom OpenAI-compatible provider via LiteLLM is incorrectly classified as text-only / no-reasoning and blocks image input

1 participant