diff options
Diffstat (limited to 'src/config_file.zig')
| -rw-r--r-- | src/config_file.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/config_file.zig b/src/config_file.zig index 533eb48..f7589fe 100644 --- a/src/config_file.zig +++ b/src/config_file.zig @@ -130,6 +130,7 @@ pub fn buildProviderConfig( 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 max_tokens: u32 = if (def_opt) |d| (d.max_tokens orelse 64_000) else 64_000; switch (prov.style) { .openai_chat => return .{ .openai_chat = .{ @@ -137,13 +138,14 @@ pub fn buildProviderConfig( .base_url = prov.base_url, .model = wire_model, .reasoning = reasoning, + .max_tokens = max_tokens, } }, .anthropic_messages => return .{ .anthropic_messages = .{ .api_key = prov.api_key, .base_url = prov.base_url, .model = wire_model, .api_version = if (def_opt) |d| (d.api_version orelse "2023-06-01") else "2023-06-01", - .max_tokens = if (def_opt) |d| (d.max_tokens orelse 4096) else 4096, + .max_tokens = max_tokens, } }, } } |
