summaryrefslogtreecommitdiff
path: root/src/tui_selectors.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/tui_selectors.zig')
-rw-r--r--src/tui_selectors.zig10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tui_selectors.zig b/src/tui_selectors.zig
index 590d321..e76f82d 100644
--- a/src/tui_selectors.zig
+++ b/src/tui_selectors.zig
@@ -89,7 +89,7 @@ pub const ReasoningOption = struct {
pub fn forStyle(style: APIStyle) []const ReasoningOption {
return switch (style) {
// The Responses style takes the same reasoning-effort options.
- .openai_chat, .openai_responses => &openai,
+ .openai_chat, .openai_responses, .openai_codex_responses => &openai,
.anthropic_messages => &anthropic,
};
}
@@ -100,6 +100,7 @@ pub const ReasoningOption = struct {
.openai_chat => |r| switch (cfg.*) {
.openai_chat => |*c| c.reasoning = r,
.openai_responses => |*c| c.reasoning = r,
+ .openai_codex_responses => |*c| c.reasoning = r,
.anthropic_messages => {},
},
.anthropic_messages => |sel| switch (cfg.*) {
@@ -110,7 +111,7 @@ pub const ReasoningOption = struct {
c.effort = e;
},
},
- .openai_chat, .openai_responses => {},
+ .openai_chat, .openai_responses, .openai_codex_responses => {},
},
}
}
@@ -120,7 +121,8 @@ pub const ReasoningOption = struct {
pub fn matches(self: ReasoningOption, cfg: ProviderConfig) bool {
switch (self.value) {
.openai_chat => |r| return (cfg == .openai_chat and cfg.openai_chat.reasoning == r) or
- (cfg == .openai_responses and cfg.openai_responses.reasoning == r),
+ (cfg == .openai_responses and cfg.openai_responses.reasoning == r) or
+ (cfg == .openai_codex_responses and cfg.openai_codex_responses.reasoning == r),
.anthropic_messages => |sel| {
if (cfg != .anthropic_messages) return false;
const c = cfg.anthropic_messages;
@@ -173,7 +175,7 @@ pub fn adaptiveFallback(cfg: *ProviderConfig) bool {
c.thinking_budget_tokens = budget;
return true;
},
- .openai_chat, .openai_responses => return false,
+ .openai_chat, .openai_responses, .openai_codex_responses => return false,
}
}