Skip to content

feat(providers): add Qwen Code CLI provider#892

Open
ntheanh201 wants to merge 3 commits intonextlevelbuilder:devfrom
ntheanh201:feat/qwen-code-cli
Open

feat(providers): add Qwen Code CLI provider#892
ntheanh201 wants to merge 3 commits intonextlevelbuilder:devfrom
ntheanh201:feat/qwen-code-cli

Conversation

@ntheanh201
Copy link
Copy Markdown

Summary

Add qwen_cli provider type that shells out to the local qwen binary,
mirroring the Claude CLI integration pattern.

  • Provider implementation with streaming support and session resumption
  • Session file detection at ~/.qwen/projects//chats/.jsonl
  • OAuth auth status endpoint at /v1/providers/qwen-cli/auth-status
  • UI support: provider form, auth status section, i18n (en/vi/zh)
  • Container support: qwen binary pre-installed, credential sync in entrypoint

Type

  • Feature
  • Bug fix
  • Hotfix (targeting main)
  • Refactor
  • Docs
  • CI/CD

Target Branch

dev

Checklist

  • go build ./... passes
  • go build -tags sqliteonly ./... passes (if Go changes)
  • go vet ./... passes
  • Tests pass: go test -race ./...
  • Web UI builds: cd ui/web && pnpm build (if UI changes)
  • No hardcoded secrets or credentials
  • SQL queries use parameterized $1, $2 (no string concat)
  • New user-facing strings added to all 3 locales (en/vi/zh)
  • Migration version bumped in internal/upgrade/version.go (if new migration)

Test Plan

  1. Add qwen_cli provider via UI
  2. Restart goclaw to register provider
  3. Create/update agent to use qwen provider
  4. Send chat message — verify first message succeeds
  5. Send second message — verify session resumes (no "Session Id already in use" error)
  6. Check auth status at GET /v1/providers/qwen-cli/auth-status

Signed-off-by: The Anh Nguyen <ntheanh201@gmail.com>
@ntheanh201 ntheanh201 marked this pull request as draft April 14, 2026 04:13
Signed-off-by: The Anh Nguyen <ntheanh201@gmail.com>
@ntheanh201 ntheanh201 marked this pull request as ready for review April 14, 2026 04:27
@ntheanh201 ntheanh201 marked this pull request as draft April 14, 2026 04:45
Qwen CLI requires the -p/--prompt flag for non-interactive execution.
Previously, prompts were passed via stdin which caused the CLI to hang
waiting for interactive input. Also adds conditional check to skip -p
flag when prompt is empty (e.g., during agent summoning).

Fixes "No input provided via stdin" error on agent summon.

Signed-off-by: The Anh Nguyen <ntheanh201@gmail.com>
@ntheanh201 ntheanh201 marked this pull request as ready for review April 14, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant