mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-17 15:34:54 +00:00
feat(models): add enso 1M-token model to bundled catalog
Codex resolved any unknown slug (incl. enso*) to the 272k unknown-model fallback, silently capping Hanzo's flagship and triggering auto-compaction at ~245k instead of ~900k. Add an explicit `enso` entry (context_window + max_context_window = 1,000,000); longest-prefix match covers enso-1m/-ultra. Verified: enso resolves to cw=1000000, auto_compact@900000.
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -72,3 +72,22 @@ fn model_context_window_uses_model_value_without_override() {
|
||||
|
||||
assert_eq!(updated, model);
|
||||
}
|
||||
|
||||
/// The bundled catalog ships an `enso` entry with a full 1M-token window so the
|
||||
/// Hanzo flagship is NOT silently capped at the unknown-slug fallback (272k).
|
||||
/// Prefix matching means `enso`, `enso-1m`, etc. all resolve to this entry.
|
||||
#[test]
|
||||
fn bundled_enso_declares_one_million_token_window() {
|
||||
let catalog = crate::bundled_models_response().expect("bundled models.json parses");
|
||||
let enso = catalog
|
||||
.models
|
||||
.iter()
|
||||
.find(|m| m.slug == "enso")
|
||||
.expect("bundled catalog must contain the `enso` model");
|
||||
|
||||
assert_eq!(enso.context_window, Some(1_000_000));
|
||||
assert_eq!(enso.max_context_window, Some(1_000_000));
|
||||
assert_eq!(enso.resolved_context_window(), Some(1_000_000));
|
||||
// Auto-compaction must key off the true window (90% of 1M), not the 272k floor.
|
||||
assert_eq!(enso.auto_compact_token_limit(), Some(900_000));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user