diff options
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 15 |
1 files changed, 7 insertions, 8 deletions
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). |
