Skip to content

[Bug]: maxOutputTokens must be >= 1 error when using custom provider with oh-my-openagent plugin #3410

@cdyjavadev

Description

@cdyjavadev

Prerequisites

  • I will write this issue in English (see our Language Policy)
  • I have searched existing issues to avoid duplicates
  • I am using the latest version of oh-my-opencode
  • I have read the documentation or asked an AI coding agent with this project's GitHub URL loaded and couldn't find the answer

Bug Description

When using oh-my-openagent plugin with a custom OpenAI-compatible provider (local Qwen model), the following error occurs:
Invalid argument for parameter maxOutputTokens: maxOutputTokens must be >= 1
Without the oh-my-openagent plugin, the same custom provider works correctly.

Steps to Reproduce

When I install this plugin, OpenCode stops working properly.
If I remove this plugin from opencode.json, OpenCode works normally again.
I used the same large language model in both scenarios.
This issue only occurs with custom models.
Everything works fine when using OpenCode's built-in free model.
The OpenCode client also works normally; the problem only happens in the command-line environment.

Expected Behavior

Image

opencode should be work when I install oh-my-openagent plugin!

Actual Behavior

Image

Invalid argument for parameter maxOutputTokens: maxOutputTokens must be >= 1

Doctor Output

- OpenCode version: 1.4.3
- oh-my-openagent version: 3.17.2
- OS: Windows 11
- Provider: Custom OpenAI-compatible (@ai-sdk/openai-compatible)
- Model: Local Qwen3.6Plus via http://127.0.0.1:8317/v1

Error Logs

Configuration

Additional Context

No response

Operating System

Windows

OpenCode Version

1.4.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions