Skip to content

Problem: 6MB request body size limit blocks legitimate image inputs on Qwen3.7Plus (OpenCode Go) #35112

Description

@AkariSam

Description

Problem: 6MB request body size limit blocks legitimate image inputs on Qwen3.7Plus (OpenCode Go)

Description

When using OpenCode Go with Qwen3.7Plus, requests that include image attachments fail with:

Bad Request: {"error":{"message":"Error from provider (Alibaba): Exceeded limit on max bytes to request body : 6291456","type":"BadRequest.TooLarge","param":null,"code":null}}

The provider (Alibaba / Tongyi Qianwen API Gateway) enforces a 6 MB maximum request body size. However, base64-encoded images expand by ~33%, meaning even 3 modest ~1.5 MB photos already consume ~6 MB just for image data — leaving no room for conversation history, system prompt, or tool definitions. This effectively makes the image input feature unusable in practice for any real-world scenario.

Root Cause

The 6 MB limit is at the API Gateway layer, not a model-level context limit. Qwen3.7Plus supports image input, but the gateway rejects the request before it ever reaches the model.

Expected Behavior

Request body size limits should be aligned with the model's actual capabilities. If a model advertises image support, the gateway should accept payloads large enough to accommodate reasonable image inputs alongside normal conversation context.

Suggested Fix

Increase the request body size limit on the Alibaba/Tongyi Qianwen API Gateway endpoint used by OpenCode Go (e.g., to 20 MB or higher, matching common practice on other providers like OpenAI).

Environment

  • OpenCode Go provider: Qwen3.7Plus
  • Upstream: Alibaba Cloud / Tongyi Qianwen

Plugins

No response

OpenCode version

1.17.13

Steps to reproduce

  1. Run OpenCode Go with Qwen3.7Plus selected as the model
  2. Attach 3 images (each ~1.5 MB, e.g. screenshots or photos) to a chat message
  3. Send the message and observe the error:

Bad Request: {"error":{"message":"Error from provider (Alibaba): Exceeded limit on max bytes to request body : 6291456","type":"BadRequest.TooLarge","param":null,"code":null}}

Screenshot and/or share link

No response

Operating System

Window 11

Terminal

Tabby

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions