Skip to content

fix(qwen): allow qwen3.6-plus opt-in on Coding Plan #63654#63987

Closed
jepson-liu wants to merge 2 commits into
openclaw:mainfrom
jepson-liu:fix/63654-qwen-coding-plan-vision-optin
Closed

fix(qwen): allow qwen3.6-plus opt-in on Coding Plan #63654#63987
jepson-liu wants to merge 2 commits into
openclaw:mainfrom
jepson-liu:fix/63654-qwen-coding-plan-vision-optin

Conversation

@jepson-liu

Copy link
Copy Markdown
Contributor

Summary

  • Problem: The bundled qwen provider drops qwen3.6-plus from user config when baseUrl points at the Qwen Coding Plan endpoint, which makes vision/image flows fail with Unknown model.
  • Why it matters: Coding Plan users cannot opt-in to try qwen3.6-plus for image understanding even when they explicitly configure it.
  • What changed: Removed the qwen provider normalizeConfig filter that stripped qwen3.6-plus on Coding Plan endpoints. Built-in catalog suppression behavior remains unchanged.
  • What did NOT change (scope boundary): The bundled catalog still does not advertise qwen3.6-plus for Coding Plan endpoints by default, and the existing suppression hint remains.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

User-visible / Behavior Changes

Users can now explicitly configure models.providers.qwen.models: [{ id: "qwen3.6-plus", input: ["text","image"], ... }] on Coding Plan endpoints without OpenClaw removing it during provider config normalization.

Security Impact (required)

  • New permissions/capabilities? (No)
  • Secrets/tokens handling changed? (No)
  • New/changed network calls? (No)
  • Command/tool execution surface changed? (No)
  • Data access scope changed? (No)

Repro + Verification

Environment

  • OS: Linux
  • Model/provider: Qwen (qwen)
  • Endpoint: https://coding.dashscope.aliyuncs.com/v1

Steps

  1. Configure models.providers.qwen.baseUrl to a Coding Plan endpoint and explicitly include qwen3.6-plus in models.providers.qwen.models.
  2. Run a vision flow (e.g. image tool / media-understanding pipeline) using qwen/qwen3.6-plus.

Expected

  • The explicitly configured model remains available for runtime lookup.

Actual (before)

  • Provider config normalization removed qwen3.6-plus, leading to Unknown model at runtime.

Evidence

  • Added test coverage to ensure explicit config is not mutated on Coding Plan endpoints.

Human Verification (required)

  • Verified scenarios:
    • pnpm test extensions/qwen/provider-catalog.test.ts
    • pnpm test extensions/qwen/index.test.ts
  • Edge cases checked:
    • Built-in catalog behavior unchanged for Coding Plan endpoints.
  • What I did not verify:
    • Live calls against DashScope/Coding Plan with real credentials.

Compatibility / Migration

  • Backward compatible? (Yes)
  • Config/env changes? (No)
  • Migration needed? (No)

Risks and Mitigations

  • Risk: Users may opt-in to a model that the Coding Plan endpoint still rejects at runtime.
    • Mitigation: Built-in catalog suppression/default docs remain conservative; this only changes explicit user opt-in behavior.

@greptile-apps

greptile-apps Bot commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes the normalizeConfig hook from the bundled qwen provider that was silently stripping qwen3.6-plus from user-configured model lists whenever the baseUrl pointed at a Coding Plan endpoint. The suppressBuiltInModel hook — which hides qwen3.6-plus from the built-in catalog on those endpoints — is unchanged, so default behavior is unaffected and only explicit opt-in configs benefit from the fix.

Confidence Score: 5/5

Safe to merge; the production fix is surgical and correct, with only a minor test-quality concern.

The code change is a one-hook deletion with a clear, well-scoped intent and no side-effects on the remaining suppressBuiltInModel path. The single P2 finding is a test quality issue (vacuous assertion) that does not affect correctness or runtime behavior.

extensions/qwen/index.test.ts — the new test is vacuous and should be strengthened.

Prompt To Fix All With AI
This is a comment left during a code review.
Path: extensions/qwen/index.test.ts
Line: 10-31

Comment:
**Vacuous test — always passes trivially**

Because `normalizeConfig` was removed entirely from the plugin definition, `provider.normalizeConfig` is `undefined`, so the optional-chain expression `provider.normalizeConfig?.({...})` always evaluates to `undefined` without executing any logic. The assertion `toBeUndefined()` therefore passes unconditionally regardless of the provider's implementation. The test would equally "pass" if `normalizeConfig` were re-added as a no-op that returns `undefined` for all inputs, silently missing the regression.

A stronger approach is to explicitly assert that the hook is absent, and then add a second case that verifies the built-in suppression (`suppressBuiltInModel`) still fires for Coding Plan endpoints — that guards the half of the contract that remains:

```ts
it("does not have a normalizeConfig hook (no user-config mutation)", () => {
  const provider = await registerSingleProviderPlugin(qwenPlugin);
  expect(provider.normalizeConfig).toBeUndefined();
});

it("still suppresses qwen3.6-plus from built-in catalog on Coding Plan endpoints", async () => {
  const provider = await registerSingleProviderPlugin(qwenPlugin);
  const result = provider.suppressBuiltInModel?.({
    provider: "qwen",
    modelId: QWEN_36_PLUS_MODEL_ID,
    baseUrl: QWEN_CN_BASE_URL,
    config: undefined,
  } as never);
  expect(result?.suppress).toBe(true);
});
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "fix(qwen): allow qwen3.6-plus opt-in on ..." | Re-trigger Greptile

Comment thread extensions/qwen/index.test.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: faf8fde06f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread extensions/qwen/index.test.ts Outdated
@vincentkoc

Copy link
Copy Markdown
Member

ProjectClownfish could not safely update this branch, so it opened a narrow replacement PR instead.

Replacement PR: #72664
Source PR: #63987
Contributor credit is preserved in the replacement PR body and changelog plan.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Qwen: qwen3.6-plus image understanding blocked on Coding Plan endpoint despite model supporting vision

2 participants