From d9d4131cb321a9ce29b000cd7aed8ced9a18efc1 Mon Sep 17 00:00:00 2001 From: t Date: Mon, 15 Jun 2026 16:14:55 -0600 Subject: model registry sync via models.dev --- src/main.zig | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/main.zig') diff --git a/src/main.zig b/src/main.zig index 8ac5e8b..dbaa4d8 100644 --- a/src/main.zig +++ b/src/main.zig @@ -209,16 +209,15 @@ pub fn main(init: std.process.Init) !void { }; defer app_config.deinit(); - // Load models.toml — model aliases (wire name + knobs) and pricing. - // A missing file is fine (empty registries); cost lookups return - // null, formatted as "unknown" by the display layer. - const models_toml_path = try models_toml.configPath(alloc, init.environ_map); - defer alloc.free(models_toml_path); - var models = try models_toml.loadFromPath(alloc, io, models_toml_path); + // Load models.toml — model aliases (wire name + knobs) and pricing — + // merged across the base/user/project/local layers. Missing files are + // fine (empty registries); cost lookups return null, formatted as + // "unknown" by the display layer. + var models = try models_toml.load(alloc, io, init.environ_map, cwd); defer models.deinit(); std.log.debug( - "models.toml: {d} model def(s), {d} price entr(ies) from {s}", - .{ models.defs.count(), models.pricing.count(), models_toml_path }, + "models.toml: {d} model def(s), {d} price entr(ies) from merged layers", + .{ models.defs.count(), models.pricing.count() }, ); // `models.pricing` is parsed and ready; the print-based CLI doesn't // surface per-turn cost yet (that lands with the TUI frontend). -- cgit v1.3