summaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authort <t@tjp.lol>2026-06-15 16:14:55 -0600
committert <t@tjp.lol>2026-06-15 16:15:10 -0600
commitd9d4131cb321a9ce29b000cd7aed8ced9a18efc1 (patch)
tree5cc65cf6b0d226daa716f00aa6f667e8cf6dfa61 /src/main.zig
parent02b4c7a35ac0b714bc045d54fb4bb45d1ce4e490 (diff)
model registry sync via models.dev
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig15
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).