github MakazhanAlpamys/Soup v0.45.0
v0.45.0 — Plugin System & Ecosystem Wins

latest releases: v0.76.1, v0.76.0, v0.75.2...
5 months ago

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 under soup_cli/plugins/ and the loader picks it up at startup. New soup plugins list / install / enable / disable CLI.
  • Anthropic Messages API converter. to_anthropic / from_anthropic translate between OpenAI chat-completions and Anthropic Messages payload shapes. Multiple system messages join with \n\n; tool role surfaces as tool_result content blocks (list content concatenated, never silently dropped); max_tokens capped at 16384; temperature bounded [0.0, 2.0]. Live /v1/messages endpoint deferred to v0.45.1.
  • Server-side tools allowlist. Closed {python, bash, web_search} set with WebSearchConfig — domain allowlist (leading-dot subdomain pattern, port-strip on the host, IPv6 literal deny), rate_limit_per_minute ∈ [1, 600]. python and bash reuse the v0.25.0 RLVR sandbox; live HTTP endpoints deferred to v0.45.1.
  • External integrations catalog. 15-entry frozen MappingProxyType of 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) with validate_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 with collections.deque (deterministic, O(N+E)), self-loop / cycle / dangling-edge / duplicate rejection, cwd containment + os.lstat + S_ISLNK symlink 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 omitted description from the conflict check).
  • is_domain_allowed strips :port suffix before matching and rejects IPv6 literals (review fix MEDIUM — without the port-strip, Host: api.example.com:443 would silently fail to match a bare api.example.com allowlist entry; without the IPv6 deny, an IPv6 literal could accidentally satisfy a endswith check).
  • to_anthropic tool role with structured (list) content concatenates text blocks instead of silently emitting "" (review fix MEDIUM).
  • Recipe DAG load_recipe_yaml enforces is_under_cwd containment AND os.lstat + S_ISLNK symlink 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).
  • bool rejection on every numeric input across the new modules (matches the v0.30.0 / v0.34.0 / v0.42.0 project policy — bool is a subclass of int).
  • RecipeNode.config is MappingProxyType-wrapped so post-parse caller mutation cannot affect the validated topology.

Known Limitations

  • Plugin trainer-callback wiring deferred to v0.45.1. register_plugin accepts hook objects and discover_hooks lists implementations, but no HF Trainer callback emits pre_train / post_train / pre_step / post_step yet. Plugins can register but their hooks are inert this release.
  • Anthropic /v1/messages endpoint deferred to v0.45.1. Schema converters land but soup serve does not yet expose a /v1/messages route alongside /v1/chat/completions.
  • Server-side tool HTTP endpoints deferred to v0.45.1. python / bash / web_search allowlist + WebSearchConfig schema land; HTTP endpoints + RLVR sandbox wiring land next.
  • n-gram speculative decoding live wiring deferred to v0.45.1. NgramSpecConfig validator schema lands; engine integration next.
  • External integrations are a catalog, not launchers. IntegrationSpec describes 15 ecosystem targets but no soup 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_list accepts [grokfast, spectrum, ...] at schema validation, but no trainer wraps the actual upstream callbacks yet.
  • Data Recipe DAG runner deferred to v0.45.1. parse_recipe validates topology and computes topological order; soup data recipe prints 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

Don't miss a new Soup release

NewReleases is sending notifications on new releases.