fix: resolve n8n package workspace dependency issue (v0.4.1)#64
Merged
saschabuehrle merged 5 commits intomainfrom Nov 7, 2025
Merged
fix: resolve n8n package workspace dependency issue (v0.4.1)#64saschabuehrle merged 5 commits intomainfrom
saschabuehrle merged 5 commits intomainfrom
Conversation
Add comprehensive documentation and examples for running draft and verifier models on separate Ollama or vLLM instances. This enables optimal GPU utilization in multi-GPU systems and distributed deployments. Changes: - Update .env.example with multi-instance configuration sections - OLLAMA_DRAFT_URL and OLLAMA_VERIFIER_URL - VLLM_DRAFT_URL and VLLM_VERIFIER_URL - References to TypeScript, Python, and Docker examples - Add TypeScript examples - multi-instance-ollama.ts: Three configuration scenarios with health checks - multi-instance-vllm.ts: vLLM-specific features and API key support - Add Python examples - multi_instance_ollama.py: Async implementation with health checks - multi_instance_vllm.py: Includes PagedAttention and batching notes - Add Docker Compose setup for multi-GPU deployment - GPU device assignment (draft on GPU 0, verifier on GPU 1) - Separate ports (11434 and 11435) - Health checks and volume isolation - Comprehensive README with troubleshooting Note: Multi-instance support already exists via ModelConfig.baseUrl. This commit adds documentation and examples for the existing feature.
- Add Multi-Instance Ollama and vLLM to advanced examples tables in main README - Python advanced examples section (lines 402-403) - TypeScript advanced examples section (lines 439-440) - Update examples/README.md with comprehensive documentation - Add examples to 'Find by Feature' quick reference - Update table of contents (3 examples instead of 1) - Add detailed sections for both multi-instance examples - Include Docker Compose guide references - Document use cases, hardware requirements, and performance benefits All documentation now consistently references the new multi-instance examples.
- Remove invalid quality_threshold parameter from CascadeAgent - Add quality_threshold to ModelConfig (0.7 for draft, 0.95 for verifier) - Remove non-existent usage attribute access - Match cascade setup from basic_usage.py
BREAKING BUG FIX: VLLMProvider and other providers now respect ModelConfig.base_url for multi-instance deployments. Problem: - Providers were instantiated once per provider type, ignoring ModelConfig.base_url and api_key parameters - Multi-instance setups (draft on GPU 0, verifier on GPU 1) failed because both models tried to use the same provider instance - Examples: multi_instance_vllm.py and multi_instance_ollama.py couldn't connect to separate instance URLs Solution: - CascadeAgent._init_providers() now creates separate provider instances for each model with model-specific base_url/api_key - Added model_providers dict mapping model.name → provider instance - WholeResponseCascade and CascadeAgent use _get_provider() helper to look up model-specific providers (with backwards compat fallback) - Maintains full backwards compatibility for single-instance setups Backwards Compatibility: ✅ Tested with basic_usage.py (OpenAI standard setup) ✅ All existing functionality preserved ✅ Only activates when ModelConfig.base_url is set ✅ Falls back to provider-type lookup for existing code Files Changed: - cascadeflow/agent.py: _init_providers(), _get_provider(), all direct routing methods (_execute_direct_with_timing, etc.) - cascadeflow/core/cascade.py: __init__(), _get_provider(), _call_drafter(), _call_verifier() Tested: - ✅ multi_instance_vllm.py with DeepSeek-R1-7B and R1-32B on separate instances (192.168.0.199:8000 and :8001) - ✅ basic_usage.py with OpenAI (standard single-instance) - ✅ Cascade routing works correctly - ✅ Direct routing works correctly - ✅ Health checks pass for both instances
- Update n8n package version from 0.4.0 to 0.4.1 - Fix GitHub workflow to use pnpm publish for n8n package - pnpm automatically converts workspace:* to actual version during publish - Resolves npm EUNSUPPORTEDPROTOCOL error when installing the package Fixes the issue where npm couldn't install @cascadeflow/n8n-nodes-cascadeflow because it contained workspace:* protocol in dependencies.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes the
EUNSUPPORTEDPROTOCOLerror that prevented users from installing@cascadeflow/n8n-nodes-cascadeflowfrom npm.Changes
npm publishtopnpm publishfor n8n packageworkspace:*dependencies to actual versions during publishProblem
The n8n package had
"@cascadeflow/core": "workspace:*"in its dependencies. When published withnpm publish, this workspace protocol was included in the published package, causing npm to fail when users tried to install it:Solution
Using
pnpm publishinstead ofnpm publishautomatically converts workspace dependencies to their actual versions (e.g.,workspace:*→^0.4.0) during the publish process.Verification
The package has been published to npm and verified:
@cascadeflow/core: ^0.4.0(notworkspace:*)Impact
workspace:*)