What's New
A public plugin/hook system plus the schema scaffolding for 20+ ecosystem integrations. Soup is now extensible.
- Plugin / hook system.
soup_cli.plugins.register_plugin(name, version, plugin, templates=[], model_groups=[])lets third-party Python modules ship their own pre-train / post-train / pre-step / post-step hooks plus chat templates and model groups. Idempotent on identical specs; rejects re-registration with conflicting(version, plugin object, templates, model_groups, description). Drop a file undersoup_cli/plugins/and the loader picks it up at startup. Newsoup plugins list / install / enable / disableCLI. - Anthropic Messages API converter.
to_anthropic/from_anthropictranslate between OpenAI chat-completions and Anthropic Messages payload shapes. Multiplesystemmessages join with\n\n;toolrole surfaces astool_resultcontent blocks (list content concatenated, never silently dropped);max_tokenscapped at 16384;temperaturebounded[0.0, 2.0]. Live/v1/messagesendpoint deferred to v0.45.1. - Server-side tools allowlist. Closed
{python, bash, web_search}set withWebSearchConfig— domain allowlist (leading-dot subdomain pattern, port-strip on the host, IPv6 literal deny),rate_limit_per_minute ∈ [1, 600].pythonandbashreuse the v0.25.0 RLVR sandbox; live HTTP endpoints deferred to v0.45.1. - External integrations catalog. 15-entry frozen
MappingProxyTypeof ecosystem targets —lm-studio,comfyui,stable-diffusion-cpp,open-webui,ollama,tei,pgvector,faiss,weaviate,sentence-transformers,claude-code,cursor,continue,cline,sillytavern. Auto-detect + launch wiring lands with v0.46.0 Deploy Autopilot. - Advanced trainer-plugin allowlist. 6-entry catalog (
grokfast/spectrum/llmcompressor/sonicmoe/cce_plugin/math_verify) withvalidate_trainer_plugin_list(dedup, allowlist match, ≤8 entries). Live callbacks land in v0.45.1. soup data recipe <recipe.yaml>. Validates a Seed → LLM Text → Code → Judge → Validator → Sampler graph DAG: closed node-kind allowlist, Kahn's topological sort withcollections.deque(deterministic, O(N+E)), self-loop / cycle / dangling-edge / duplicate rejection, cwd containment +os.lstat + S_ISLNKsymlink rejection on the recipe file. Live offline runner against a local model in v0.45.1.
Install / Upgrade
```bash
pip install --upgrade soup-cli
```
Full upgrade matrix: ubuntu / windows / macOS × Python 3.9 / 3.11 / 3.12, all green on this tag.
Security
- Plugin name kebab-case regex (
^[a-z0-9][a-z0-9-]{0,39}$);_MAX_PLUGINS=64,_MAX_TEMPLATES_PER_PLUGIN=32,_MAX_MODEL_GROUPS_PER_PLUGIN=32,_MAX_NAME_ENTRY_LEN=128. Re-registering with a different(version, plugin object, templates, model_groups, description)is rejected (review fix HIGH — first-cut omitteddescriptionfrom the conflict check). is_domain_allowedstrips:portsuffix before matching and rejects IPv6 literals (review fix MEDIUM — without the port-strip,Host: api.example.com:443would silently fail to match a bareapi.example.comallowlist entry; without the IPv6 deny, an IPv6 literal could accidentally satisfy aendswithcheck).to_anthropictoolrole with structured (list) content concatenates text blocks instead of silently emitting""(review fix MEDIUM).- Recipe DAG
load_recipe_yamlenforcesis_under_cwdcontainment ANDos.lstat + S_ISLNKsymlink rejection (review fix MEDIUM — TOCTOU defence; mirrors v0.33.0 #22 / v0.43.0 Part C / v0.44.0 Part B policy). - Kahn's topological sort migrated to
collections.deque+ sorted-on-arrival (review fix HIGH — first-cut had O(N² log N)queue.sort()inside the BFS body). boolrejection on every numeric input across the new modules (matches the v0.30.0 / v0.34.0 / v0.42.0 project policy —boolis a subclass ofint).RecipeNode.configisMappingProxyType-wrapped so post-parse caller mutation cannot affect the validated topology.
Known Limitations
- Plugin trainer-callback wiring deferred to v0.45.1.
register_pluginaccepts hook objects anddiscover_hookslists implementations, but no HF Trainer callback emitspre_train/post_train/pre_step/post_stepyet. Plugins can register but their hooks are inert this release. - Anthropic
/v1/messagesendpoint deferred to v0.45.1. Schema converters land butsoup servedoes not yet expose a/v1/messagesroute alongside/v1/chat/completions. - Server-side tool HTTP endpoints deferred to v0.45.1.
python/bash/web_searchallowlist +WebSearchConfigschema land; HTTP endpoints + RLVR sandbox wiring land next. - n-gram speculative decoding live wiring deferred to v0.45.1.
NgramSpecConfigvalidator schema lands; engine integration next. - External integrations are a catalog, not launchers.
IntegrationSpecdescribes 15 ecosystem targets but nosoup deploy <target>command yet auto-detects + invokes their CLIs. Tracked for v0.46.0 Deploy Autopilot. - Advanced trainer plugins are an allowlist, not callbacks.
validate_trainer_plugin_listaccepts[grokfast, spectrum, ...]at schema validation, but no trainer wraps the actual upstream callbacks yet. - Data Recipe DAG runner deferred to v0.45.1.
parse_recipevalidates topology and computes topological order;soup data recipeprints the planned order. The actual node-by-node execution against a local model is the v0.45.1 deliverable.
Stats
- 5820 → 5989 tests (+169) across 165 test files.
- ~1100 LOC + 169 tests; ruff clean across all new modules.
- All 5 Parts shipped in a single commit per phase (
feat(v0.45.0)).
🤖 Generated with Claude Code