diff options
| author | t <t@tjp.lol> | 2026-06-13 23:45:59 -0600 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-06-15 15:08:32 -0600 |
| commit | 02b4c7a35ac0b714bc045d54fb4bb45d1ce4e490 (patch) | |
| tree | 134196a82dd6fdd55b735be4c0cf38428c85038d /libpanto/src/config.zig | |
| parent | 71643a5d69ffc40882c9fcde3cc8a3bcf02d7396 (diff) | |
Add Codex Responses support and session debugging
Teach provider config and auth resolution about the Codex Responses
dialect, including user-facing `style = "openai_responses"` with
`dialect = "codex"`. Serialize and parse Responses traffic with
provider-specific reasoning replay, assistant phase metadata, and robust
function-call assembly keyed by `output_index` so streamed tool inputs
survive proxy quirks and empty terminal payloads.
Also persist thinking origins and message metadata across sessions, add
the Anthropic interleaved-thinking header switch, write per-session
debug logs, and improve the TUI and scripts for inspecting tool output
and session costs.
Diffstat (limited to 'libpanto/src/config.zig')
| -rw-r--r-- | libpanto/src/config.zig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libpanto/src/config.zig b/libpanto/src/config.zig index c48cefc..7c8a495 100644 --- a/libpanto/src/config.zig +++ b/libpanto/src/config.zig @@ -27,6 +27,9 @@ pub const APIStyle = enum { /// OpenAI Responses API (`/responses`). Used by the ChatGPT-subscription /// Codex backend, whose request/stream shape differs from Chat Completions. openai_responses, + /// ChatGPT-subscription Codex Responses dialect. User config selects this + /// with `style = "openai_responses"` plus `dialect = "codex"`. + openai_codex_responses, }; /// A single HTTP request header (name/value). Used for provider @@ -155,6 +158,7 @@ pub const ProviderConfig = union(APIStyle) { openai_chat: OpenAIChatConfig, anthropic_messages: AnthropicMessagesConfig, openai_responses: OpenAIResponsesConfig, + openai_codex_responses: OpenAIResponsesConfig, pub fn style(self: ProviderConfig) APIStyle { return @as(APIStyle, self); @@ -187,6 +191,12 @@ pub const ProviderConfig = union(APIStyle) { .model = c.model, .reasoning = c.reasoning, }, + .openai_codex_responses => |c| .{ + .api_style = .openai_codex_responses, + .base_url = c.base_url, + .model = c.model, + .reasoning = c.reasoning, + }, }; } }; |
