[PR #15900] cmd/launch: add Qwen code integration #77643

Open
opened 2026-05-05 10:19:12 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15900
Author: @hoyyeva
Created: 4/30/2026
Status: 🔄 Open

Base: mainHead: hoyyeva/qwen


📝 Commits (10+)

  • 29e47df Fix Qwen launch: correct repo URL, use model id for provider id, remove OLLAMA_THINK
  • b28ef71 Add launch flags and LaunchConfigurator interface for Qwen integration
  • d0898dc Add tests for LaunchConfigurator interface and launch flags
  • 160983e refactor(qwen): remove interface changes, make qwen.go self-contained
  • 596fcb8 test(qwen): add integration, findPath, models, and paths tests
  • ced5b4a adding qwen
  • ec52e54 clean up
  • c13c0ef cmd/launch: add Qwen Code integration
  • cd661b6 add helper text on helper function
  • 3d7687f fix test

📊 Changes

9 files changed (+1386 additions, -16 deletions)

View changed files

📝 cmd/launch/launch.go (+38 -10)
📝 cmd/launch/launch_test.go (+134 -2)
cmd/launch/qwen.go (+455 -0)
cmd/launch/qwen_test.go (+641 -0)
📝 cmd/launch/registry.go (+16 -1)
📝 cmd/tui/tui_test.go (+6 -3)
📝 docs/docs.json (+1 -0)
📝 docs/integrations/index.mdx (+1 -0)
docs/integrations/qwen.mdx (+94 -0)

📄 Description

Summary

Adds ollama launch qwen support for Qwen Code.

This wires Qwen into the launcher, adds npm-based auto-install support, writes Qwen config to ~/.qwen/settings.json, and configures Qwen to use Ollama through its OpenAI-compatible endpoint.

Details

  • adds qwen to launcher registry and help text
  • supports auto-install with npm install -g @qwen-code/qwen-code@latest
  • supports ollama launch qwen --config without requiring Qwen to already be installed
  • writes Qwen config with:
    • security.auth.selectedType = "openai"
    • Ollama-backed modelProviders.openai[]
    • OLLAMA_API_KEY=ollama
  • forces runtime OPENAI_API_KEY, OPENAI_BASE_URL, and OPENAI_MODEL when launching Qwen
  • manages config in ~/.qwen/settings.json
  • supports selecting multiple Ollama models from ollama launch qwen
  • rewrites the Ollama-managed Qwen provider list to match the launcher selection
  • reuses recommended model descriptions when available, and omits description otherwise
  • repairs missing editor config by regenerating ~/.qwen/settings.json from the launcher’s saved model selection

Testing plan

  • Run ollama launch qwen --config on a machine without Qwen installed and verify it writes ~/.qwen/settings.json without prompting for install.
  • Run ollama launch qwen, accept install if Qwen is missing, and verify Qwen launches with Ollama using the selected model.
  • Configure multiple models in ollama launch qwen and verify ~/.qwen/settings.json contains the same Ollama-managed model list.
  • Delete ~/.qwen/settings.json, run ollama launch qwen again, and verify the launcher regenerates the file from saved launcher state.
  • Verify existing unrelated non-Ollama OpenAI-compatible Qwen providers remain intact after reconfiguration.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/15900 **Author:** [@hoyyeva](https://github.com/hoyyeva) **Created:** 4/30/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `hoyyeva/qwen` --- ### 📝 Commits (10+) - [`29e47df`](https://github.com/ollama/ollama/commit/29e47dfd349539e450f5e5565235bea95fd166b7) Fix Qwen launch: correct repo URL, use model id for provider id, remove OLLAMA_THINK - [`b28ef71`](https://github.com/ollama/ollama/commit/b28ef71b19d4f3fb37a937487d7304322fd9df88) Add launch flags and LaunchConfigurator interface for Qwen integration - [`d0898dc`](https://github.com/ollama/ollama/commit/d0898dc0c797b950bb590c19a1d70680ad66850b) Add tests for LaunchConfigurator interface and launch flags - [`160983e`](https://github.com/ollama/ollama/commit/160983e7bcf458d42c441c5583c5c4cad060477f) refactor(qwen): remove interface changes, make qwen.go self-contained - [`596fcb8`](https://github.com/ollama/ollama/commit/596fcb84aea405186f069fd09ba2b8839bc53d45) test(qwen): add integration, findPath, models, and paths tests - [`ced5b4a`](https://github.com/ollama/ollama/commit/ced5b4acb8e66174f00ec2248cf2f64debf5d371) adding qwen - [`ec52e54`](https://github.com/ollama/ollama/commit/ec52e54ced219de2abb1a8768c984fda082ce106) clean up - [`c13c0ef`](https://github.com/ollama/ollama/commit/c13c0ef8bf620056d2a8bc490eb1db02131cf224) cmd/launch: add Qwen Code integration - [`cd661b6`](https://github.com/ollama/ollama/commit/cd661b6b0afdec50efca847bc338694c9c95144a) add helper text on helper function - [`3d7687f`](https://github.com/ollama/ollama/commit/3d7687ff11816721001bfbfac8dc2cdd4a63a29b) fix test ### 📊 Changes **9 files changed** (+1386 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `cmd/launch/launch.go` (+38 -10) 📝 `cmd/launch/launch_test.go` (+134 -2) ➕ `cmd/launch/qwen.go` (+455 -0) ➕ `cmd/launch/qwen_test.go` (+641 -0) 📝 `cmd/launch/registry.go` (+16 -1) 📝 `cmd/tui/tui_test.go` (+6 -3) 📝 `docs/docs.json` (+1 -0) 📝 `docs/integrations/index.mdx` (+1 -0) ➕ `docs/integrations/qwen.mdx` (+94 -0) </details> ### 📄 Description ## Summary Adds `ollama launch qwen` support for Qwen Code. This wires Qwen into the launcher, adds npm-based auto-install support, writes Qwen config to `~/.qwen/settings.json`, and configures Qwen to use Ollama through its OpenAI-compatible endpoint. ## Details - adds `qwen` to launcher registry and help text - supports auto-install with `npm install -g @qwen-code/qwen-code@latest` - supports `ollama launch qwen --config` without requiring Qwen to already be installed - writes Qwen config with: - `security.auth.selectedType = "openai"` - Ollama-backed `modelProviders.openai[]` - `OLLAMA_API_KEY=ollama` - forces runtime `OPENAI_API_KEY`, `OPENAI_BASE_URL`, and `OPENAI_MODEL` when launching Qwen - manages config in `~/.qwen/settings.json` - supports selecting multiple Ollama models from `ollama launch qwen` - rewrites the Ollama-managed Qwen provider list to match the launcher selection - reuses recommended model descriptions when available, and omits `description` otherwise - repairs missing editor config by regenerating `~/.qwen/settings.json` from the launcher’s saved model selection ## Testing plan - Run `ollama launch qwen --config` on a machine without Qwen installed and verify it writes ~/.qwen/settings.json without prompting for install. - Run `ollama launch qwen`, accept install if Qwen is missing, and verify Qwen launches with Ollama using the selected model. - Configure multiple models in `ollama launch qwen` and verify `~/.qwen/settings.json` contains the same Ollama-managed model list. - Delete `~/.qwen/settings.json`, run `ollama launch qwen` again, and verify the launcher regenerates the file from saved launcher state. - Verify existing unrelated non-Ollama OpenAI-compatible Qwen providers remain intact after reconfiguration. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-05 10:19:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#77643