Commit d7751e2
committed
refactor: remove unused qwen-integration feature and dead code
Architectural cleanup based on codebase analysis that revealed qwen-integration
feature flag gates completely unused code. Qwen models work perfectly via
Ollama and LM Studio providers without any special compilation flags.
Removed:
- qwen-integration feature flag from Cargo.toml
- 7 unused module files (~3,800 LOC):
- cache.rs (18K) - Qwen response caching
- context_optimizer.rs (11K) - Qwen context optimization
- performance.rs (7.4K) - Qwen performance monitoring
- pattern_detector.rs (23K) - Pattern detection
- qwen.rs (8.7K) - QwenClient implementation
- qwen_prompts.rs (12K) - Qwen-specific prompts
- tools_schema.rs - Qwen tool schemas
- Module gates from lib.rs
- QwenClient field and methods from official_server.rs:
- qwen_client field declaration and initialization
- initialize_qwen() method (never called)
- get_qwen_client() method (never called)
- initialize_qwen() call from bin/codegraph.rs
Updated:
- install-codegraph.sh - removed qwen-integration from FEATURES
- install-codegraph-local-speed-osx.sh - removed qwen-integration from FEATURES
Why This Is Safe:
1. None of the gated modules were actually instantiated or used
2. get_qwen_client() method was defined but never called
3. Qwen models work via existing Ollama/LM Studio providers:
- CODEGRAPH_LLM_PROVIDER=ollama (runs Qwen via Ollama)
- CODEGRAPH_LLM_PROVIDER=lmstudio (runs Qwen via LM Studio)
4. The qwen_simple.rs provider in codegraph-ai is always available
5. Build succeeds with all tests passing
Impact:
- ~3,800 lines of dead code removed
- Simplified architecture (one less feature flag to maintain)
- No functional changes - Qwen models still work
- Cleaner codebase with less technical debt
The qwen-integration flag was a relic of an earlier architecture where
Qwen had special first-class integration. Modern CodeGraph uses generic
LLM providers, making this special-casing unnecessary.1 parent 6bb48f5 commit d7751e2
13 files changed
Lines changed: 2 additions & 2773 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | 94 | | |
96 | 95 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
892 | 892 | | |
893 | 893 | | |
894 | 894 | | |
895 | | - | |
896 | 895 | | |
897 | 896 | | |
898 | 897 | | |
| |||
0 commit comments