docs: correct AUTO probe order, extras, saved-bundle note, and stale API references#110
docs: correct AUTO probe order, extras, saved-bundle note, and stale API references#110elyasmnvidian wants to merge 1 commit into
Conversation
|
WalkthroughChangesProfile API and routing updates
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
…API references Signed-off-by: Elyas Mehtabuddin <emehtabuddin@nvidia.com> (cherry picked from commit 72f448e) Signed-off-by: Elyas Mehtabuddin <emehtabuddin@nvidia.com>
fcf1a85 to
0ba243a
Compare
Live before/after — the shipped example loads, and the extras match pyproject
The Extras —
The AUTO probe-order correction and the |
Docs and examples had several claims that no longer match the shipped package, so a new user copying from the README, INSTALLATION, or
examples/would hit an ImportError or a config that won't load. This PR corrects them.What changed:
examples/route.yamlnow loads. Thetype: deterministic(LLM-classifier) route was missingfallback_target_on_evict, which the route-bundle builder requires. Before this, building the table raisedRouteBundleConfigError: llm-classifier.fallback_target_on_evict must be a non-empty string. Addedfallback_target_on_evict: strong.examples/minimal.pyand the INSTALLATION library snippet use the current API.SwitchyardRecipes.passthrough_recipe(...)was removed from the package, so the old example fails at import. Replaced withProfileSwitchyard(PassthroughProfileConfig(...).build()).switchyard.call()now returns the response body directly, so the example readsresponse['choices'][0]['message']['content']instead ofresponse.body[...].ProfileSwitchyardand the typed profile configs (PassthroughProfileConfig,RandomRoutingProfileConfig,StageRouterProfileConfig) instead of the removedSwitchyardRecipes.switchyard/lib/profiles/instead of the deletedrecipes.py.[all]extra described correctly in README and INSTALLATION: it pulls inserver, cli, tracing, intake, affinity-redis(was "server, cli" / "tracing extras").docs/cli_reference.mdfixed to match the resolver: probe/v1/chat/completionsfirst (useopenai), then/v1/messages(anthropic), then/v1/responses(responses), then fall back toopenai.docs/cli_reference.mdnow notes that a saved routing-profile bundle keeps${VAR}references literal — the env vars must be present atserve/launchtime, or Switchyard aborts withmissing environment variable(s): NAME.How to try it:
python examples/minimal.pywithOPENAI_API_KEYset now imports and runs; against the current package the old file raisedImportError: cannot import name 'SwitchyardRecipes'.examples/route.yamlthrough the route-bundle builder no longer raises on thellm-classifierroute.Audit follow-up in this push: the CHANGELOG packaging line listed a
[gpu]extra that pyproject.toml does not define and omitted[tracing]/[intake]/[affinity-redis]; the README[all]comment namedredis-affinity(the real extra isaffinity-redis); and CONTRIBUTING.md still pointed at the removedswitchyard/lib/recipes.py(nowswitchyard/lib/profiles/).