feat(prompting): Phase C — make tool-backends config-driven (MI50-ready flip)

Enabling MI50 function-calling is now a config flip, not a code change:
cfg.tool_backends (env TOOL_BACKENDS, default "cloud") drives which backends get
tool specs. Once the MI50 llama.cpp server runs with --jinja + a tool-capable
model, set TOOL_BACKENDS="cloud,mi50" and MI50 chat drives the same tool contract
as cloud. Default unchanged (cloud-only), so this is safe with the MI50 down/
unverified — no live flip made (server is currently offline; --jinja unconfirmed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-05 03:29:34 +00:00
parent e482ad591c
commit 800cab8d36
2 changed files with 12 additions and 6 deletions
+5
View File
@@ -46,6 +46,10 @@ class Config:
# External input feed (her #1: react to the world). Comma-separated RSS/Atom URLs.
feeds: tuple[str, ...]
feed_react_prob: float # chance a would-be new thread reacts to a feed item instead
# Backends allowed to receive function-calling tools. Default cloud-only. Add
# "mi50" ONLY once its llama.cpp server runs with --jinja + a tool-capable model,
# else it 500s on the tools param (Phase C). Env: TOOL_BACKENDS="cloud,mi50".
tool_backends: tuple[str, ...]
def _csv(name: str, default: str) -> tuple[str, ...]:
@@ -90,4 +94,5 @@ def load() -> Config:
mouth_model=os.getenv("MOUTH_MODEL") or None,
feeds=_csv("LYRA_FEEDS", "https://hnrss.org/frontpage,https://www.pokernews.com/rss.php"),
feed_react_prob=float(os.getenv("FEED_REACT_PROB", "0.5")),
tool_backends=_csv("TOOL_BACKENDS", "cloud"),
)