summaryrefslogtreecommitdiff
path: root/src/config_file.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/config_file.zig')
-rw-r--r--src/config_file.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/config_file.zig b/src/config_file.zig
index f1ae65f..229a5b2 100644
--- a/src/config_file.zig
+++ b/src/config_file.zig
@@ -51,7 +51,7 @@ const models_toml = @import("models_toml.zig");
// constructors/mutators.
const tvalue = toml.value_mod;
-pub const APIStyle = panto.config.APIStyle;
+pub const APIStyle = panto.APIStyle;
// ===========================================================================
// Resolved config model
@@ -109,7 +109,7 @@ pub const Policy = struct {
}
};
-/// Build a `panto.config.ProviderConfig` for a chosen `<provider>:<alias>` model
+/// Build a `panto.ProviderConfig` for a chosen `<provider>:<alias>` model
/// reference, combining the resolved provider (transport/auth) with the
/// model definition from `models.toml` (wire name + knobs).
///
@@ -117,19 +117,19 @@ pub const Policy = struct {
/// a missing alias falls back to using the alias verbatim as the wire
/// model name with default knobs. Returns the assembled `Config` plus the
/// wire model id (borrowed from `defs`/`ref` — valid as long as both
-/// outlive the returned config's use). The `panto.config.ProviderConfig` itself
+/// outlive the returned config's use). The `panto.ProviderConfig` itself
/// borrows the provider/model strings; the caller must keep `cfg` (the
/// `Config`) and `defs` alive for its lifetime.
pub fn buildProviderConfig(
cfg: *const Config,
defs: *const models_toml.ModelRegistry,
ref: ModelRef,
-) ResolveError!panto.config.ProviderConfig {
+) ResolveError!panto.ProviderConfig {
const prov = cfg.provider(ref.provider) orelse return error.UnknownProvider;
const def_opt = defs.get(ref.provider, ref.model);
const wire_model: []const u8 = if (def_opt) |d| d.model else ref.model;
- const reasoning: panto.config.ReasoningEffort = if (def_opt) |d| d.reasoning else .default;
+ const reasoning: panto.ReasoningEffort = if (def_opt) |d| d.reasoning else .default;
const max_tokens: u32 = if (def_opt) |d| (d.max_tokens orelse 64_000) else 64_000;
switch (prov.style) {
@@ -944,7 +944,7 @@ test "buildProviderConfig: missing alias uses the alias verbatim as wire model"
const pc = try buildProviderConfig(&cfg, &models, ref);
try testing.expectEqual(APIStyle.openai_chat, pc.style());
try testing.expectEqualStrings("gpt-4o", pc.openai_chat.model);
- try testing.expectEqual(panto.config.ReasoningEffort.default, pc.openai_chat.reasoning);
+ try testing.expectEqual(panto.ReasoningEffort.default, pc.openai_chat.reasoning);
}
test "buildProviderConfig: unknown provider errors" {