From 2fbec025f6f8583737e89d8f62ac2a177c646dc1 Mon Sep 17 00:00:00 2001 From: flujo-app <300233937+flujo-app@users.noreply.github.com> Date: Thu, 12 Nov 2026 07:17:18 -0500 Subject: [PATCH] Self-hosted models with remote code: code and tokenizer from the weights' pinned revision; release 0.7.3 --- package-lock.json | 4 ++-- package.json | 2 +- selfhost/modal/settings.py | 4 +++- selfhost/modal/test_settings.py | 4 ++++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index e686ac0..3f0054a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "flujo-factory", - "version": "0.7.2", + "version": "0.7.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "flujo-factory", - "version": "0.7.2", + "version": "0.7.3", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "1.32.1" diff --git a/package.json b/package.json index 7fb1cb5..6c7c9bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flujo-factory", - "version": "0.7.2", + "version": "0.7.3", "description": "Durable FLUJO swarm engine and Factory SDK, CLI, and MCP server", "license": "MIT", "repository": { diff --git a/selfhost/modal/settings.py b/selfhost/modal/settings.py index bcdc915..49b5549 100644 --- a/selfhost/modal/settings.py +++ b/selfhost/modal/settings.py @@ -167,7 +167,9 @@ def vllm_command(self): '--reasoning-parser', self.reasoning_parser, '--default-chat-template-kwargs', json.dumps(self.chat_template_kwargs())] if self.trust_remote_code: - command += ['--trust-remote-code'] + # The model's own code and tokenizer come from the same pinned revision as its weights; without these flags + # the Hub serves the default branch's code files (transformers warns "A new version ... was downloaded"). + command += ['--trust-remote-code', '--code-revision', self.revision, '--tokenizer-revision', self.revision] if self.gpu_count > 1: command += ['--tensor-parallel-size', str(self.gpu_count)] return command + list(self.extra_args) + self.variant_args() diff --git a/selfhost/modal/test_settings.py b/selfhost/modal/test_settings.py index cc26bf9..ebd003b 100644 --- a/selfhost/modal/test_settings.py +++ b/selfhost/modal/test_settings.py @@ -52,6 +52,10 @@ def test_nemotron_command_uses_the_release_image_mtp_and_hybrid_prefix_caching(s self.assertEqual(command[command.index(pair[0]) + 1], pair[1]) for flag in ('--trust-remote-code', '--language-model-only', '--async-scheduling', '--enable-mamba-shared-prefix-checkpoint'): self.assertIn(flag, command) + # remote code and tokenizer from the same pinned revision as the weights + for flag in ('--revision', '--code-revision', '--tokenizer-revision'): + self.assertEqual(command[command.index(flag) + 1], s.revision, flag) + self.assertNotIn('--code-revision', resolve(QWEN, 'qwen').vllm_command(), 'no remote code, nothing to pin') self.assertEqual(json.loads(command[command.index('--speculative-config') + 1]), {'method': 'mtp', 'num_speculative_tokens': 1}) self.assertEqual(s.env, {'OMP_NUM_THREADS': '1'}) self.assertEqual(s.input_modalities, ('text',))