Tabbit
ResourcesBlogModels
Tabbit LogoTabbit

Tabbit — The AI Browser that Works for You

Topics

  • Best Browsers 2026: Rankings and Top Lists
  • AI Browser Guides and Resources
  • Browser Comparisons: Head-to-Head Guides
  • Browser Reviews and Explainers
  • Browser Alternatives
  • Browser Directory: Guides by Browser
  • Agentic Browser Resources
  • Browser Downloads and Install Guides
  • Browser Productivity Resources
  • SillyTavern Model Guides and Presets

Popular Guides

  • Best Browsers 2026: Top 10 Ranked & Compared
  • Best Free AI Browsers 2026: Plans & Prices Compared
  • Rabbit Browser: What It Is & Why Tabbit Is Better
  • Firefox vs Chrome 2026: Privacy, RAM & Speed Compared
  • Best Lightweight Browsers 2026: 7 Tested for RAM & Speed
  • AI Browser List 2026: 10 Browsers Compared
  • Neobrowser: Norton Neo, Download & Alternatives
  • Edge vs Chrome 2026: Speed, RAM & Battery Tested
  • Best Internet Browser for Android 2026
  • Best AI Browser 2026: Top 9 Tested & Ranked

Events

  • Tabbit Skill Competition
  • KPOP SBTI Fandom Personality Test
  • Tabbit Campus Creator Program
  • fifi's Picks: AI Skills for Research Papers
  • User Survey

About

  • Tabbit Blog
  • Press & Media
English
简体中文English
Showcases & prompts
MediaQwen4-Max

QwenCloud: Configure the Output Limit for GA Qwen4-Max in OpenCode

Original source

Official QwenCloud and OpenCode documentation

AuthorNot specified

Tabbit curation2026-11-17

Read original

One-sentence takeaway

QwenCloud's official OpenCode documentation sets a default per-response output limit of 32,000 tokens for the GA model qwen4-max (not qwen4-max-preview). To request longer responses, set OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX when launching OpenCode and set the client-side limit.output in the OpenCode model definition within the model's allowed range.

Use cases

  • Suitable tasks: Connecting QwenCloud Token Plan to OpenCode and generating long-form text or longer code outputs

  • Unsuitable tasks: Mistaking the OpenCode client-side limit for the model service's generation limit, or mixing the Individual Token Plan endpoint with keys from other billing plans

  • Applicable model version: GA model qwen4-max; excludes qwen4-max-preview

  • Applicable client, agent, or API: OpenCode and the QwenCloud Token Plan Individual Anthropic-compatible endpoint

  • Recommended reasoning tier and parameters: Official defaults are reasoning_effort=high and thinking_budget=131072; this article does not cover additional reasoning parameters

Ready-to-use content

Save the following configuration to ~/.config/opencode/opencode.json on macOS/Linux (Windows: %USERPROFILE%\.config\opencode\opencode.json). It reads the API key through OpenCode's environment-variable substitution, so the key is not written to the file:

{
  "$schema": "https://opencode.ai/config.json",
  "model": "qwencloud-token-plan-personal/qwen4-max",
  "provider": {
    "qwencloud-token-plan-personal": {
      "npm": "@ai-sdk/anthropic",
      "name": "QwenCloud Token Plan Individual",
      "options": {
        "baseURL": "https://token-plan.maas.qwencloudapi.com/apps/anthropic/v1",
        "apiKey": "{env:QWENCLOUD_API_KEY}"
      },
      "models": {
        "qwen4-max": {
          "name": "Qwen4 Max",
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          },
          "limit": {
            "context": 1000000,
            "output": 262144
          }
        }
      }
    }
  }
}

Securely set the Individual Token Plan API key in the current terminal, then launch OpenCode with a client-side limit of 262,144 tokens:

read -s QWENCLOUD_API_KEY
export QWENCLOUD_API_KEY
OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX=262144 opencode

After OpenCode starts, run /models and select Qwen4 Max under QwenCloud Token Plan Individual. Use the following command to make a test request:

OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX=262144 opencode run "用简明中文解释缓存,并列出三个常见失效场景。"

limit.output declares the model's output limit in the OpenCode configuration. OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX overrides the 32,000-token default per-response limit described in the OpenCode documentation. Neither can exceed the model service's limit.

Test or workflow steps

  1. Create or view an API key for QwenCloud Token Plan Individual; do not substitute a key from the pay-as-you-go or Team plan.

  2. Save the configuration to the user-level opencode.json, then securely set QWENCLOUD_API_KEY in the current shell.

  3. Launch OpenCode with OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX=262144 opencode, run /models, and select Qwen4 Max.

  4. Make a short request containing only non-sensitive content and confirm the connection succeeds. A long output limit sets the maximum allowed for a request; it does not require the model to generate that many tokens every time.

Raw evidence and data

  • QwenCloud's OpenCode documentation gives the Individual configuration's provider ID qwencloud-token-plan-personal, @ai-sdk/anthropic, and the Anthropic-compatible endpoint https://token-plan.maas.qwencloudapi.com/apps/anthropic/v1, and lists qwen4-max.

  • The same page states that the GA qwen4-max has a default per-response output limit of 32,000 tokens; setting OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX allows longer outputs.

  • The same page lists a context window of 1,000,000 tokens and a maximum output of 131,072 tokens in non-thinking mode; thinking content and the final answer together can total up to 262,144 tokens. Defaults are reasoning_effort=high and thinking_budget=131072.

  • The OpenCode configuration example on the same page gives limit.output=262144 in the qwen4-max model metadata. The OpenCode configuration documentation says model uses the provider/model format and supports environment-variable references in the form {env:VARIABLE_NAME}.

Limitations

  • This configuration uses the QwenCloud Token Plan Individual endpoint and key. For Team and pay-as-you-go configurations, use the corresponding provider, endpoint, and key specified in their respective official documentation.

  • limit.output=262144 defines the client-side model limit; changing it alone does not remove the 32,000-token default per-response limit stated in QwenCloud's documentation. The environment variable also cannot raise the server-side model limit.

  • The server-side limit in non-thinking mode is 131,072 tokens; the combined limit for thinking content and the final answer is 262,144 tokens. Actual available output for a request is also constrained by input length and server-side rules.

  • The environment variable name includes EXPERIMENTAL and is the OpenCode configuration method documented by QwenCloud. This article did not make an online request with a real key; confirm account plan, quota, and service availability in the QwenCloud account.

Reproduction notes

On 2026-11-17, the QwenCloud integration documentation was checked through Tabbit, along with OpenCode's configuration path, provider/model format, and environment-variable syntax. The example uses the Individual Token Plan and was not tested with a real API key. OpenCode configuration documentation

Curated by Tabbit

Prompts and showcases are summarized from public sources and Tabbit editorial notes. Check the original licensing and intended use before copying it.

Qwen4-Max

Use in Tabbit

Qwen4-Max

Related showcases & prompts

MediaOfficial Alibaba Cloud Model Studio documentation2026-11-16

Alibaba Cloud Model Studio: Qwen4-Max OpenAI Chat Completions Configuration

MediaQwenCloud official documentation

QwenCloud Token Plan: Qwen4-Max Codex Configuration

MediaQwenCloud official documentation

QwenCloud: Configure Claude Code to Use the GA Version of Qwen4-Max

MediaOfficial QwenCloud documentation

QwenCloud: Explicit Cache Reuse Configuration for Qwen4-Max

Qwen4-Max

Related reviews

MediaQwen official blog2026-11-16

Qwen4-Max: Official Launch Benchmarks and Work360

MediaAtomic Agent Blog2026-11-16

Atomic Agent: Qwen 4 Max Reasoning Levels Tested on a Single-Agent Task

MediaPlotly Blog2026-11-16

Plotly: Qwen4 Max Data Analytics Benchmark and Chart Evaluation

MediaVals AI2026-11-15

Vals AI: Qwen4 Max Industry Task Index, Component Scores, and Cost