Skip to content

feat: Enhance Qwen provider support and documentation#1083

Closed
LoneWolf36 wants to merge 12 commits intocoleam00:mainfrom
LoneWolf36:feat/enhance-qwen-support-and-docs
Closed

feat: Enhance Qwen provider support and documentation#1083
LoneWolf36 wants to merge 12 commits intocoleam00:mainfrom
LoneWolf36:feat/enhance-qwen-support-and-docs

Conversation

@LoneWolf36
Copy link
Copy Markdown

Summary

Problem: Archon binary v0.3.5 had incomplete Qwen support despite source code being fully ready for Qwen integration.

Why it matters: Qwen users couldn't use Archon binary releases effectively - they had to build from source to get proper Qwen support.

What changed:

  • ✅ Enhanced model recognition for all Qwen variants (qwen-coder, qwen-max, qwen-turbo, qwen-plus, qwq-*, qvq-*, coder-model)
  • ✅ Added 15 comprehensive test cases for Qwen model validation (25 tests total, 100% passing, 100% coverage on model-validation.ts)
  • ✅ Created detailed Qwen setup guide (docs/qwen-setup.md) with authentication, configuration, and troubleshooting
  • ✅ Updated README to highlight Qwen as first-class AI assistant alongside Claude and Codex
  • ✅ Added migration guide for binary v0.3.5 users experiencing Qwen issues

What did not change: Core QwenClient implementation (already complete and production-ready in source)

Changes

1. Enhanced Model Recognition (packages/workflows/src/model-validation.ts)

Extended isQwenModel() to recognize all common Qwen model naming patterns:

  • qwen-* prefix (qwen-coder, qwen-max, qwen-turbo, qwen-plus)
  • qwq-* prefix (Qwen reasoning models)
  • qvq-* prefix (Qwen vision models)
  • *-coder-model suffix
  • coder-model exact match

This ensures provider inference works correctly when workflows specify Qwen models.

2. Comprehensive Test Coverage (packages/workflows/src/model-validation.test.ts)

Added 15 new test cases covering:

  • Qwen model recognition with various prefixes and patterns
  • Case-insensitive matching
  • Whitespace handling
  • Provider inference for all Qwen models
  • Cross-provider compatibility checks
  • Rejection of non-Qwen models

Results: 25 tests passing, 100% code coverage on model-validation.ts

3. Documentation (docs/qwen-setup.md)

Created comprehensive 300+ line setup guide including:

  • Prerequisites and installation steps
  • Three authentication methods (OAuth, DashScope API, Bailian API)
  • Configuration examples (basic, advanced, per-workflow)
  • Complete list of supported Qwen models
  • Features and capabilities
  • Troubleshooting guide
  • Migration guide from binary v0.3.5
  • Environment variables reference

4. README Updates (README.md)

Added "Supported AI Assistants" section:

  • Highlights all three providers (Claude, Codex, Qwen) as first-class citizens
  • Feature comparison table
  • Mixed-provider workflow example showing Qwen integration
  • Quick reference to detailed Qwen setup guide

Testing

All tests pass:

bun test packages/workflows/src/model-validation.test.ts
# 25 tests passing
# 100% coverage on model-validation.ts

Manual testing with Qwen provider:

cd /path/to/project
bun run cli workflow run feature-dev "Add health check endpoint"
# ✅ Provider resolves to: qwen
# ✅ Model resolves to: qwen-coder
# ✅ Title generation: succeeds
# ✅ Workflow execution: completes successfully

Checklist

  • Code follows project conventions
  • Tests added/updated for changes
  • All tests passing locally
  • Documentation updated/created
  • No breaking changes
  • Backward compatible

Related Issues

Addresses user reports of Qwen provider not working in binary releases despite source code supporting it.


Note: The core Qwen implementation was already complete in the source code. This PR focuses on enhancing model recognition, adding comprehensive tests, and creating documentation to make Qwen a truly first-class citizen in Archon.

github-actions Bot and others added 12 commits April 10, 2026 13:32
…m00#1023)

* feat: make artifact file paths clickable in chat messages (coleam00#1016)

Artifact paths in AI responses (e.g. `artifacts/runs/{uuid}/report.md`) were
rendered as plain inline code. Now they render as clickable buttons (.md opens
ArtifactViewerModal) or links (other types open in new tab).

Changes:
- Add artifact path detection via regex in MessageBubble code renderer
- Convert MARKDOWN_COMPONENTS to factory function for modal state access
- Add ArtifactViewerModal integration in chat view
- Add 'workflow_artifact' to WORKFLOW_EVENT_TYPES in store.ts

Fixes coleam00#1016

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor(web): improve MessageBubble type clarity and code comments

- Replace opaque `ComponentPropsWithoutRef<never>` return type on
  `makeMarkdownComponents` with the idiomatic `Components` type from
  react-markdown, which is the actual contract the prop expects
- Add explanatory comment on `ARTIFACT_PATH_RE` describing group
  semantics and cross-platform path handling intent
- Add comment on `useMemo` empty dep array explaining that
  `setArtifactViewer` is a stable React state setter

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* simplify: merge duplicate lucide-react imports in MessageBubble

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web): harden extractArtifactInfo UUID regex and path traversal check

Make ARTIFACT_PATH_RE case-insensitive for hex digits ([a-fA-F0-9-]+) so
uppercase UUID characters are matched correctly. Also reject filenames
containing '..' path segments to prevent path traversal.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web): add artifact path detection to WorkflowResultCard markdown

The artifact-aware code component was only in MessageBubble.tsx but
WorkflowResultCard in MessageList.tsx used its own static markdown
components without artifact detection. Artifact paths in workflow
results were rendering as plain code spans instead of clickable links.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(server,web): artifact route uses codebase name for owner/repo + bright link styling

The artifact route derived owner/repo from the working_path, which fails
for worktree-based runs (worktrees use local filesystem username, not
GitHub username). Now looks up the codebase record by codebase_id to get
the correct owner/repo from the codebase name.

Also fixes artifact link styling in WorkflowResultCard — uses
text-accent-bright instead of text-[inherit] which was inheriting the
dim text-text-secondary color from the parent container.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: resolve merge conflict markers in api.ts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* style(web): brighter artifact link color in workflow result cards

Bumped artifact link color from accent-bright (0.72) to a brighter
oklch(0.78 0.18 250) with font-medium for better readability against
the dark text-text-secondary card background.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* style(web): use inline styles for artifact links to guarantee visibility

Tailwind classes were being overridden by parent text-text-secondary.
Inline styles ensure the bright blue color and pointer cursor always
apply regardless of CSS cascade.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(web): use <a> tags for all artifact links with !text-accent-bright

Replaced <button> with <a> for .md artifacts (pointer cursor by default),
unified styling using !text-accent-bright to override parent
text-text-secondary, hover brightens to oklch(0.85). All artifact links
now consistently bright and clickable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(web,server): restore missing import, fix artifact link colors and cursor

- Restore getArchonWorkspacesPath import removed by prior commit (still
  used in 3 other places in api.ts, breaking the build)
- Use text-accent-bright instead of dark text-accent for artifact links
  in MessageBubble (was nearly invisible on dark background)
- Add cursor-pointer to .md artifact buttons in MessageBubble
- Replace arbitrary oklch hover value with hover:!text-primary in
  MessageList artifact links

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fix(server): use BUNDLED_VERSION for app version in binary mode
Integrate Qwen as a first-class assistant across config, workflows, CLI setup, API schemas, and the web UI. Add a Qwen smoke test and tighten the docs so the remaining provider-specific limits are explicit.

This keeps Archon aligned with the new Qwen path while documenting where behavior still differs from Claude and Codex.

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
Preserve existing Qwen settings when assistant config is updated so the web settings flow no longer drops qwen entries from global config.

Stop forcing OpenAI auth in the Qwen client and allow the SDK to follow its native auth resolution unless Archon is configured explicitly. Also pass through OpenAI-compatible env vars and wire the Qwen smoke test into the package test script so the reviewed behavior stays covered.

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
Prevent duplicate tool-call emission when partial Qwen streaming emits a tool start before the final assistant message, and pass native Qwen auth environment variables through the subprocess allowlist.

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
- Config persistence: unconditionally preserve qwen in updateGlobalConfig()
- CLI setup: filter default assistant options by actually configured assistants
- Add mode: read hasQwen and defaultAssistant from existing config instead of hardcoding
- Missing env vars: inject config.envVars into Qwen node options in dag-executor
- Provider misrouting: return undefined instead of 'codex' for unknown models
- Streaming dedup: track sawPartialText separately from tool_use partials
- Security: scope Qwen credentials to QwenClient only, remove from shared allowlist
- UI robustness: add optional chaining for config.assistants.qwen?.model in SettingsPage

Co-Authored-By: Codex GPT-5 <noreply@openai.com>

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
…ator warnings

- Schema: make qwen optional+nullable in safeConfigSchema for unset state
- Docstring: fix authType docstring to reflect SDK-resolved default (not 'openai')
- Validator: add Qwen warnings for MCP, skills, hooks, and tool restrictions
  (previously only warned for Codex; now warns for both non-Claude providers)

Co-Authored-By: Codex GPT-5 <noreply@openai.com>

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Improve model recognition for Qwen variants (qwen-coder, qwen-max, qwen-turbo, qwen-plus, qwq-*, qvq-*)
- Add comprehensive test coverage for Qwen model validation and provider inference
- Create detailed Qwen setup guide in docs/qwen-setup.md
- Update README.md to highlight Qwen as first-class AI assistant
- Add configuration examples and migration guide for binary v0.3.5 users
- Ensure all Qwen model patterns are properly recognized in isQwenModel()
- Add tests for provider inference with various Qwen model names
- Document Qwen-specific workflow configuration patterns

Closes: Qwen support gap between source code and binary v0.3.5

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 11, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1ed038ee-272c-4f6a-a975-bb95b393e020

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Wirasm
Copy link
Copy Markdown
Collaborator

Wirasm commented Apr 17, 2026

This PR looks similar to #1085, which was closed on April 11, 2026. You may want to read the discussion there before pushing further.

@Wirasm
Copy link
Copy Markdown
Collaborator

Wirasm commented Apr 20, 2026

Closing this for the same reason as the Qwen implementation

please follow the community registry pattern and resolve conflicts

@Wirasm Wirasm closed this Apr 20, 2026
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.

3 participants