Files
hanzo.ai/hooks/useEnso.ts
zooqueenandHanzo Dev a10c549d0b Enso's line is its runs' tokens at today's list prices, and no page names what Enso routes to
Every run on the GPQA Diamond and LiveCodeBench boards is priced by one rule:
its recorded input and output tokens at the rate GET /v1/pricing states for the
model id its system bills under, the router's included (enso at enso's rate).
The cost a run files is enso-bench's own table and is no longer read. The
landing tile, /benchmarks, /enso and /home2 draw the multiple from lib/enso
alone, labelled with the list's own date, and draw none without the list.

The boards drop the router's arms and the run notes; the copy beside them says
the rows are single models from other labs; the client brand filter that listed
Zen's bases is gone (the research API withholds those runs). A gate reads every
text file in out/ and fails on a model, vendor or router id said to be inside
Enso, Zen or Kai, and absorbs the Laya gate.

The setup prompt ends with `hanzo dev`, and /home2 runs Claude Code on Hanzo
with `hanzo dev --claude --cloud`; `hanzo up` boots a local Kubernetes and
`hanzo code claude` is refused by the CLI hanzo.sh installs.


Co-authored-by: Hanzo Dev <[email protected]>
2026-10-16 11:11:57 -07:00

26 lines
1.1 KiB
TypeScript

'use client'
import { useMemo } from 'react'
import { Unreachable } from '@/lib/api/read'
import { RESEARCH, runs } from '@/lib/api/research'
import { usePricing, useReading, type Reading } from '@/lib/api/use'
import { derive, type Enso } from '@/lib/enso'
/**
* Enso's boards and lead lines, derived from the research API's `enso.*` runs
* and the price list as the page reads them (one read of each a page load):
* loading until both have answered or failed, then ready, or unreachable when
* the runs are. Without the price list the boards keep their scores and draw no
* cost, line or frontier (lib/enso `derive`).
*/
export function useEnso(): Reading<Enso> {
const reading = useReading(runs)
const prices = usePricing()
return useMemo((): Reading<Enso> => {
if (reading.state !== 'ready') return reading
if (prices.state === 'loading') return prices
const enso = derive(reading.data, prices.state === 'ready' ? prices.data : null)
return enso ? { state: 'ready', data: enso } : { state: 'unreachable', error: new Unreachable(RESEARCH, 'no Enso run on GPQA Diamond') }
}, [reading, prices])
}