Skip to content

feat: add Qwen Code (Qwen3) ACP agent support#56

Open
thepagent wants to merge 1 commit intomainfrom
feat/qwen-support
Open

feat: add Qwen Code (Qwen3) ACP agent support#56
thepagent wants to merge 1 commit intomainfrom
feat/qwen-support

Conversation

@thepagent
Copy link
Copy Markdown
Collaborator

Summary

Add support for Qwen Code as an ACP-compatible agent backend.

Closes #55

Changes

  • Dockerfile.qwen — multi-stage build with @qwen-code/qwen-code npm package (follows Dockerfile.gemini pattern)
  • config.toml.example — added Qwen agent config block (qwen --experimental-acp --trust-all-tools, QWEN_API_KEY)
  • Helm chart _helpers.tpl — added qwen preset: image → agent-broker-qwen, command → qwen, args → ["--experimental-acp", "--trust-all-tools"]
  • Helm chart NOTES.txt — added Qwen auth instructions (set QWEN_API_KEY via helm upgrade)
  • Helm chart values.yaml — updated preset comment to list qwen
  • README.md — added Qwen to: description, features, backends table, Helm install examples, pod auth instructions, manual config.toml, Install with Your Coding CLI section

Testing

  • helm template with --set agent.preset=qwen renders correct image/command/args
  • docker build -f Dockerfile.qwen . succeeds
  • Qwen Code --experimental-acp works with broker's ACP protocol

Add Qwen Code as a supported ACP-compatible agent backend.

- Add Dockerfile.qwen with @qwen-code/qwen-code npm package
- Add qwen config example to config.toml.example
- Add qwen Helm preset (image, command, args) to _helpers.tpl
- Add Qwen auth instructions (QWEN_API_KEY) to NOTES.txt
- Update values.yaml preset comment to include qwen
- Update README.md: backends table, Helm install, manual config,
  pod auth, Install with Your Coding CLI section

Closes #55
Copy link
Copy Markdown
Collaborator

@chaodu-agent chaodu-agent left a comment

Choose a reason for hiding this comment

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

Great work on the Qwen Code integration! The Dockerfile and config changes look solid.

However, since the repo has migrated from thepagent/agent-brokeropenabdev/openab, a few references in this PR need updating:

🔴 Critical: Image registry path

In charts/agent-broker/templates/_helpers.tpl:

ghcr.io/thepagent/agent-broker-qwen

Should be updated to the new org/repo (e.g. ghcr.io/openabdev/openab-qwen). Without this, helm install with --set agent.preset=qwen will fail to pull the image.

Note: the existing presets (codex, claude, gemini) have the same issue — they all still reference ghcr.io/thepagent/agent-broker-*. Might be worth fixing all of them in this PR or opening a separate migration issue.

🟡 README: Helm repo URL

The "Install with Your Coding CLI" section still references:

https://thepagent.github.io/agent-broker

This should point to the new GitHub Pages URL for openabdev/openab.

🟡 Suggestion: chart rename?

The chart directory is still charts/agent-broker/. Renaming to match the new repo name (openab) could be a separate issue to avoid scope creep here.


Everything else (Dockerfile.qwen, config.toml.example, NOTES.txt, values.yaml) looks good 👍

@masami-agent
Copy link
Copy Markdown
Contributor

Hi @thepagent, this PR overlaps with #149 which also adds Qwen Code ACP support. Would you be okay closing one of these to avoid duplication? Thanks 🙏

Copy link
Copy Markdown
Collaborator

@chaodu-agent chaodu-agent left a comment

Choose a reason for hiding this comment

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

🔴 Changes Requested — Stale branch with wrong chart path, wrong binary name, and incomplete Dockerfile. Needs full rebase + rework.

Baseline Check (Step 0)
Field Value
State OPEN
Mergeable CONFLICTING
Created 2026-04-05 (26 days ago)
Last commit 2026-04-05
Author @nicholasgasior
Labels closing-soon

Main has: Zero Qwen support — no Dockerfile.qwen, no Helm preset, no config block. Only a passing mention of "qwen3-coder-next" in docs/opencode.md. All content is net-new.

Key staleness: The project was renamed from agent-broker to openab since this PR was opened. Chart path moved from charts/agent-broker/ to charts/openab/, binary renamed from agent-broker to openab.

四問框架

1. 解決什麼問題

Adds Qwen Code (Qwen3) as a new ACP-compatible agent backend, expanding the supported agent ecosystem.

2. 怎麼解決

Adds Dockerfile.qwen, config.toml.example block, Helm chart preset (_helpers.tpl, values.yaml, NOTES.txt), and README updates.

3. 考慮過什麼

Follows the existing preset pattern in _helpers.tpl. Uses @qwen-code/qwen-code npm package.

4. 最佳方案嗎

The approach is correct but the implementation is based on a pre-rename state and missing critical Dockerfile patterns.

🟢 INFO

  • Good coverage across all touchpoints (Dockerfile, README, config, Helm chart).
  • Follows the existing preset pattern in _helpers.tpl.
  • NOTES.txt auth instructions are clear and consistent with other presets.

🟡 NIT

  1. --trust-all-tools flag — Consider documenting security implications in README or NOTES.txt.
  2. Qwen auth is API-key-only — The commented-out helm upgrade in README auth section could be uncommented since it's the primary method (no device flow like codex/claude).

🔴 SUGGESTED CHANGES

  1. Wrong chart path — Diff targets charts/agent-broker/ but main has charts/openab/. Root cause of CONFLICTING status. Must rebase onto current main.

  2. Wrong binary name — Dockerfile.qwen copies agent-broker (COPY --from=builder /build/target/release/agent-broker) but the binary on main is openab. ENTRYPOINT/CMD also reference agent-broker.

  3. Incomplete Dockerfile — Compared to Dockerfile.gemini (and all other Dockerfile.*), Dockerfile.qwen is missing:

    • procps, ripgrep, tini packages
    • gh CLI installation
    • USER node directive (security: container runs as root)
    • HEALTHCHECK instruction
    • tini as PID 1 init (ENTRYPOINT ["tini", "--"])
    • Proper CMD ["openab", "run", "-c", "/etc/openab/config.toml"] format
  4. No pinned versionnpm install -g @qwen-code/qwen-code has no version pin. All other Dockerfiles pin versions (e.g., @google/gemini-cli@${GEMINI_CLI_VERSION}). Add ARG QWEN_CODE_VERSION=x.y.z.

  5. README helm examples — Still say agent-broker/agent-broker — should be openab/openab.

@chaodu-agent
Copy link
Copy Markdown
Collaborator

超渡法師 Review — PR #56

1. What problem does it solve?

Adds Qwen Code (Alibaba's Qwen3-based coding CLI) as a new ACP-compatible agent backend, expanding the supported ecosystem beyond Kiro CLI, Claude Code, Codex, and Gemini.

2. How does it solve it?

Follows the established preset pattern:

  • Dockerfile.qwen — Multi-stage build: Rust builder + Node.js runtime with @qwen-code/qwen-code npm package.
  • Helm chart _helpers.tplqwen preset mapping: image, command, args with --experimental-acp and --trust-all-tools.
  • Helm chart NOTES.txt — Auth instructions for QWEN_API_KEY.
  • config.toml.example — Commented-out Qwen agent block.
  • README.md — Qwen added to description, features, backends table, Helm examples, pod auth, manual config.

3. What was considered?

  • Follows Dockerfile.gemini pattern (Node.js base + npm global install).
  • API-key-only auth model (simpler than device flow).
  • PR Add Qwen Code ACP backend support #149 was a competing implementation (now closed).

4. Is this the best approach?

The approach is correct — mirrors the established pattern. However, the PR is stale (opened before the agent-brokeropenab rename) and the Dockerfile is incomplete compared to current standards.


Traffic Light

🟢 INFO

  • Complete coverage — all touchpoints addressed (Dockerfile, Helm preset, config example, README, NOTES.txt).
  • Consistent preset pattern in _helpers.tpl.
  • API-key-only auth is well-documented.

🔴 SUGGESTED CHANGES

  1. Wrong chart path — Diff targets charts/agent-broker/ but main uses charts/openab/. Root cause of CONFLICTING merge status. Must rebase onto current main.

  2. Wrong binary name (Dockerfile.qwen:20) — References agent-broker instead of openab. ENTRYPOINT/CMD also wrong:

    - COPY --from=builder /build/target/release/agent-broker /usr/local/bin/agent-broker
    - ENTRYPOINT ["agent-broker"]
    + COPY --from=builder /build/target/release/openab /usr/local/bin/openab
    + ENTRYPOINT ["tini", "--"]
    + CMD ["openab", "run", "-c", "/etc/openab/config.toml"]
  3. Incomplete Dockerfile — Compared to Dockerfile.gemini on main, missing:

    • procps, ripgrep, tini apt packages
    • gh CLI installation
    • USER node directive — container runs as root (security issue)
    • HEALTHCHECK instruction
    • tini as PID 1 init process (zombie reaping)
  4. No version pin (Dockerfile.qwen:14) — npm install -g @qwen-code/qwen-code has no version pin. All other Dockerfiles pin versions. Should be:

    ARG QWEN_CODE_VERSION=x.y.z
    RUN npm install -g @qwen-code/qwen-code@${QWEN_CODE_VERSION}
  5. README Helm examples use old nameagent-broker/agent-broker should be openab/openab.

🟡 NIT

  • --trust-all-tools security implications — Consider adding a one-line note about what this flag means and when users might want to remove it.

Verdict

🔴 Changes requested — The approach and coverage are correct, but the PR needs a full rebase onto current main (post-rename) plus Dockerfile rework to match established patterns (security, version pinning, missing tooling). Use Dockerfile.gemini as the reference template.

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

Labels

closing-soon PR missing Discord Discussion URL — will auto-close in 3 days needs-rebase pending-contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add Qwen Code (Qwen3) ACP agent support

3 participants