You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
Hanzo
committed
models: bare enso is the default, and one place decides it
CTO call, reversing the cost-led pin to enso-flash: a Hanzo session opens on
the rung that picks best. DEFAULT_MODEL = "enso".
The default was previously restated in three places that disagreed with each
other and with the constant, so changing the constant alone changed nothing a
user could see:
- lib/providers.ts said enso-flash
- app/playground/page.tsx hardcoded "enso" plus a whole hand-written model
list, and that list had drifted onto upstream vendor names — "DeepSeek V4
Pro" (DeepSeek), "Llama 4 Maverick" (Meta), "Gemma 4" (Google) — shipped
live in the /playground chunk, which is the one picker a signed-out human
can open
- app/chat/page.tsx hardcoded "enso" labelled "Enso (auto)" plus its own
parallel SelectItem list
Both pages now read useModels() + DEFAULT_MODEL. The hand-written lists are
gone, which also closes the brand leak: buildModelsFrom only ever admits
zen/enso/claude/gpt, so an upstream name cannot re-enter the picker.
The fourth restatement was subtler and was why a fresh SIGNED-IN session never
displayed the default at all. resolveSmartRouting(null, null) returned
enabled:true, so /v1/routing-defaults {present:false} put every new session on
the `auto` sentinel and the popover read "Auto · smart routing" — DEFAULT_MODEL
was dead text on that path. With no org policy a new session now opens on
DEFAULT_MODEL. `auto` is NOT a second spelling of Enso: it is ai's own
cross-family cheapest-capable router (controllers/auto_route.go), a different
mechanism at a different layer, so it survives as an explicit pick and as an
org policy (defaultSessionRouting) — it just no longer wins the default slot.
Its row stopped borrowing Enso's name in the hint.
FALLBACK_MODELS now leads with enso and carries the three rungs the family
actually serves. Measured at the family service itself — enso.enso.svc:8080
GET /v1/models, the catalog api.hanzo.ai proxies:
enso min_tier trial $4/$20 per Mtok
enso-flash (free) $2/$4
enso-ultra min_tier paid $5/$25
So the accepted cost delta is 2x in / 5x out, and the default clears its own
tier gate: commerce maps the starter plan to `trial`, and familyTierAllowed
fails open when commerce cannot name a tier.
enso-pro is deliberately NOT listed. ai synthesizes a listing entry for it from
a pin (controllers/zen_client.go ensoFam.pins) so it appears in an authenticated
/v1/models, but the family catalog has no such SKU and a pick would pass through
verbatim and fail at generation. A picker entry that cannot serve is worse than
an absent one; list it when the family serves it.
Tests updated — they encoded the old decision. 47 suites / 395 tests green,
tsc --noEmit clean, next build clean.
Co-authored-by: Hanzo Dev <dev@hanzo.ai>
@@ -83,12 +85,12 @@ export default function ChatPage() {
83
85
role: "assistant",
84
86
content: "Here are key strategies for optimizing React performance:\n\n1. **Code Splitting & Lazy Loading**\n - Use React.lazy() and Suspense for route-based splitting\n - Implement dynamic imports for heavy components\n\n2. **Memoization Techniques**\n - Use React.memo() for expensive components\n - Apply useMemo() for costly computations\n - Utilize useCallback() for function references\n\n3. **Virtual List Rendering**\n - Implement react-window or react-virtualized for long lists\n - Only render visible items in viewport\n\n4. **State Management**\n - Keep state as local as possible\n - Use context API judiciously\n - Consider state management libraries for complex apps\n\n5. **Bundle Optimization**\n - Tree shaking and dead code elimination\n - Minimize bundle size with tools like webpack-bundle-analyzer\n\nWould you like me to elaborate on any of these techniques?",
85
87
timestamp: newDate(Date.now()-3500000),
86
-
model: "enso"
88
+
model: DEFAULT_MODEL
87
89
}
88
90
],
89
91
createdAt: newDate(Date.now()-86400000),
90
92
updatedAt: newDate(Date.now()-3500000),
91
-
model: "enso"
93
+
model: DEFAULT_MODEL
92
94
},
93
95
{
94
96
id: "2",
@@ -104,7 +106,7 @@ export default function ChatPage() {
104
106
messages: [],
105
107
createdAt: newDate(Date.now()-259200000),
106
108
updatedAt: newDate(Date.now()-259200000),
107
-
model: "enso"
109
+
model: DEFAULT_MODEL
108
110
}
109
111
]);
110
112
@@ -114,7 +116,9 @@ export default function ChatPage() {
0 commit comments