forked from bchanot/claude
fix(router): haiku maps to claude-haiku-5-5, not Haiku 4.5
The native haiku alias moved to claude-haiku-5-5, so haiku sessions were unknown to the table and never routed. The 200K window entry was Haiku 4.5's; 5.5 is 1M like the rest.
This commit is contained in:
1 parent
20c66238fc
commit
2c39524473
3 files changed
+54
-4
No files matched your search
@@ -5,7 +5,7 @@ import type { On, TurnStepInput } from 'claude-code'
|
||||
const FABLE = 'claude-fable-5-1'
|
||||
const OPUS = 'claude-opus-5-5'
|
||||
const SONNET = 'claude-sonnet-5-5'
|
||||
const HAIKU = 'claude-haiku-4-5-20251001'
|
||||
const HAIKU = 'claude-haiku-5-5'
|
||||
|
||||
type Rec = Record<string, unknown>
|
||||
type Asked = { text: string; options: string[]; header: string }
|
||||
@@ -925,6 +925,15 @@ test('unknown: a session model absent from the table is never switched', async (
|
||||
expect((await stepOn($, rig, 'claude-zz-9')).model).toBe('claude-zz-9')
|
||||
})
|
||||
|
||||
test('unknown: the haiku alias id is in the table, a route moves it', async (
|
||||
$, on) => {
|
||||
const logs = recordLogs(on)
|
||||
const rig = await bootRig($, on, HAIKU)
|
||||
await planRoute($)
|
||||
expect((await stepOn($, rig, HAIKU)).model).toBe(FABLE)
|
||||
expect(logsWith(logs, 'unknown to the models table')).toBe(0)
|
||||
})
|
||||
|
||||
test('spawn: Explore goes to opus while sonnet is down', async ($, on) => {
|
||||
const rig = await bootRig($, on)
|
||||
await $.agent.spawn(spawnInput())
|
||||
@@ -5253,7 +5262,8 @@ test('cap: a smaller context than the record is cold', async ($, on) => {
|
||||
test('window: haiku outgrown returns main to the session model', async (
|
||||
$, on) => {
|
||||
const logs = recordLogs(on)
|
||||
const { rig, usage } = await bootRigVar($, on, FABLE, 1000)
|
||||
const world = newWorld({ home: { windows: { [HAIKU]: 200000 } } })
|
||||
const { rig, usage } = await bootRigVar($, on, FABLE, 1000, world)
|
||||
expect(await routedStep($, rig, 'mechanical')).toBe(HAIKU)
|
||||
usage.set(250000)
|
||||
expect((await stepOn($, rig, FABLE)).model).toBe(FABLE)
|
||||
|
||||
Reference in new issue
Block a user