pub const APIStyle = enum { openai_chat, }; /// Reasoning intensity hint sent to providers that support it. /// /// `.default` omits the field entirely so the provider's own default applies. /// `.off` sends `"none"` (supported by OpenRouter/NanoGPT; ignored or rejected /// elsewhere). The remaining values mirror the `reasoning_effort` parameter /// accepted by OpenAI reasoning models and OpenAI-compatible proxies. pub const ReasoningEffort = enum { default, off, minimal, low, medium, high, }; pub const Config = struct { api_style: APIStyle, api_key: []const u8, base_url: []const u8, model: []const u8, reasoning: ReasoningEffort = .default, }; const t = @import("std").testing; test "Config - construct with all fields" { const cfg = Config{ .api_style = .openai_chat, .api_key = "sk-test", .base_url = "https://api.openai.com/v1", .model = "gpt-4o", .reasoning = .high, }; try t.expectEqual(APIStyle.openai_chat, cfg.api_style); try t.expectEqualStrings("sk-test", cfg.api_key); try t.expectEqualStrings("https://api.openai.com/v1", cfg.base_url); try t.expectEqualStrings("gpt-4o", cfg.model); try t.expectEqual(ReasoningEffort.high, cfg.reasoning); } test "Config - reasoning defaults to .default" { const cfg = Config{ .api_style = .openai_chat, .api_key = "k", .base_url = "u", .model = "m", }; try t.expectEqual(ReasoningEffort.default, cfg.reasoning); }