Skip to content

[BUG] Schema.ref 'QuestionInfo' was set alongside unsupported fields in v1.1.x #7791

Closed

Description

@boyan250422-code

Description

Body:

Description

When using opencode v1.1.12 or v1.1.13, running any command with a custom provider configuration fails with a schema validation error related to QuestionInfo.

Reproduction Steps

  1. Install opencode v1.1.13
  2. Configure any custom provider in opencode.json
  3. Run opencode run "hello"
  4. Error occurs immediately

Error Message

Error: Schema.ref 'QuestionInfo' was set alongside unsupported fields.
If a schema node has Schema.ref set, then only description and default
can be set alongside it; other fields they would be replaced by the
expanded reference.

Environment

  • OS: Windows 11
  • opencode version: v1.1.13 (also affects v1.1.12)
  • oh-my-opencode version: v2.14.0

Root Cause

In opencode v1.1.x, the JSON schema definition has issues. The QuestionInfo schema node sets $ref along with other unsupported fields simultaneously, causing schema validation to fail.

Workaround

Downgrade to v1.0.150:

# Download v1.0.150 binary
curl -sL -o opencode.zip "https://github.com/anomalyco/opencode/releases/download/v1.0.150/opencode-windows-x64.zip"
unzip opencode.zip -d ~/.local/bin/

Expected Behavior

The custom provider should initialize correctly without schema validation errors in v1.1.x.

Additional Notes

This bug makes v1.1.x versions completely unusable for anyone using custom providers. Users need to downgrade to v1.0.150 as a workaround.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Jan 11, 2026

    @github-actions
    Contributor

    This issue appears to be related to other configuration schema validation problems reported in v1.1.x. Please check these related issues to see if they might address your case or if they share a common root cause:

    These issues all point to a potential broader schema validation/configuration parsing regression introduced in v1.1.x that may be interconnected.

  2. oyange commented on Jan 16, 2026

    @oyange

    I also encountered the same problem, even updating to 1.23 didn't solve it, have you solved this problem?

  3. Ano-u commented on Jan 22, 2026

    @Ano-u

    I have already updated to 1.1.31, but this problem still exists.

  4. fanenr commented on Jan 23, 2026

    @fanenr

    opencode v1.1.34, The same issue occurs.

  5. LikeYui375 commented on Jan 23, 2026

    @LikeYui375

    I solved the problem by changing .opencode.json to below:

    {
    "$schema": "https://opencode.ai/config.json",
    "provider": {
    "your-provider-id": {
    "npm": "@ai-sdk/openai",
    "name": "Provider Display Name",
    "options": {
    "baseURL": "your-api-base-url/v1",
    "setCacheKey": true
    },
    "models": {
    "model-id": {
    "name": "Model Display Name",
    "limit": {
    "context": 154840,
    "output": 16384
    }
    }
    }
    }
    },
    "model": "your-provider-id/model-id"
    }

  6. github-actions commented on Mar 26, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions