Skip to content

feat: add Smart Route starters that come with rules - #10

Open
ashokgelal wants to merge 1 commit into
mainfrom
feat/smart-route-rule-starters
Open

ashokgelal wants to merge 1 commit into
mainfrom
feat/smart-route-rule-starters

Conversation

@ashokgelal

Copy link
Copy Markdown
Contributor

Adds three Smart Route starters that come with a rule. This pairs with cloudstack-llc/msty-nexus#633, which teaches the Runtime and the console to read them.

  • Budget-aware: a $100 monthly budget and the rule "Over 80% of the budget → a model on this Mac".
  • Private by default: "Private data found includes health, payment, ID, or passwords → a model on this Mac". Its notice says Data Protection must be on.
  • Try a new model: "One chat in ten → the model you want to try".

A rule names no model. It sends to fallback or router, or gives a target_hint that the person picks a model for in the template step, as they do for each choice.

Older Runtimes

The new starters sit in a new rule_starters list. A Runtime that predates starter rules reads only starters, so it never offers one of these without its rule. Collections already skip a starter they cannot find, so these Runtimes also drop the new "Starters with rules" collection. schema_version stays 1.

Checks

  • node --test scripts/smart-route-starters.test.mjs: 8 pass, with new tests for rule starters.
  • node scripts/smart-route-starters-verify.mjs: ok, 25 starters, 3 with rules.
  • The Runtime from msty-nexus#633 parsed this file and read all three rules.

Merge once msty-nexus#633 ships. Merging earlier is harmless, because older Runtimes ignore the new list.

Three starters come with a rule: Budget-aware, Private by default, and
Try a new model. A rule names no model. It sends to the fallback or the
router model, or gives a hint the person picks a model for, as they do
for each choice.

They sit in a new rule_starters list. Runtimes that predate starter
rules read only starters, so they never offer one without its rules,
and they skip the new collection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant