From eb19fd812e15de5a6930daf2fcd0b2b0757687c7 Mon Sep 17 00:00:00 2001 From: t Date: Sat, 13 Jun 2026 12:22:18 -0600 Subject: auth: openai_responses provider for Codex subscription (Tier 2) Add the OpenAI Responses API wire dialect (openai_responses APIStyle + OpenAIResponsesConfig), a request serializer (instructions/input items, flat function tools, reasoning, store:false, include encrypted reasoning), and a streaming state machine over the typed response.* SSE events mapping to the shared block model. Wire dispatch, buildProviderConfig, the C-ABI free switch, and the reasoning selectors. Ship a commented Codex example in the default config. Implemented from the Responses API docs + the open-source Codex client and covered by fixture tests; live verification against a ChatGPT plan is still required (documented). --- libpanto-c/src/lib.zig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libpanto-c/src') diff --git a/libpanto-c/src/lib.zig b/libpanto-c/src/lib.zig index 78202fb..888c6d6 100644 --- a/libpanto-c/src/lib.zig +++ b/libpanto-c/src/lib.zig @@ -368,6 +368,14 @@ fn freeProvider(pv: *panto.ProviderConfig) void { allocator.free(c.model); if (c.api_version.ptr != "2023-06-01".ptr) allocator.free(c.api_version); }, + // The Responses style is not constructible across the C ABI (no + // PantoAPIStyle variant), so `convertProvider` never builds it; this + // case exists only to keep the union switch exhaustive. + .openai_responses => |c| { + allocator.free(c.api_key); + allocator.free(c.base_url); + allocator.free(c.model); + }, } } -- cgit v1.3