WIP: feat: add named OpenAI API Chat Completions provider #462

Draft
nsaspy wants to merge 1 commit from codex/openai-api-provider into main
Owner

Runtime invariant

The named OpenAI API provider uses the existing Chat Completions transport, resolves OPENAI_API_KEY only at dispatch, preserves provider identity, and keeps tool and SSE handling on the canonical path.

Scope

OpenAI API Chat Completions only. This does not provide the Responses API or ChatGPT/Codex subscription authentication, and does not duplicate Z.AI PR #460.

Verification

At 91b170f282: 1,240/1,240 deterministic tests, 16/16 deterministic benchmark, 15/15 deep experiment, runtime/load/CLI/diff checks, and prolog-verify check passed. Live OpenAI conformance is pending because OPENAI_API_KEY is unavailable.

## Runtime invariant The named OpenAI API provider uses the existing Chat Completions transport, resolves OPENAI_API_KEY only at dispatch, preserves provider identity, and keeps tool and SSE handling on the canonical path. ## Scope OpenAI API Chat Completions only. This does not provide the Responses API or ChatGPT/Codex subscription authentication, and does not duplicate Z.AI PR #460. ## Verification At 91b170f282272cfbb0a0fa7acf96198f4d738de5: 1,240/1,240 deterministic tests, 16/16 deterministic benchmark, 15/15 deep experiment, runtime/load/CLI/diff checks, and prolog-verify check passed. Live OpenAI conformance is pending because OPENAI_API_KEY is unavailable.
feat: add named OpenAI API Chat Completions provider
All checks were successful
CI / Deterministic unit and load checks (pull_request) Successful in 2m13s
CI / REAL OpenRouter integration (pull_request) Has been skipped
Clean SWI pack install / Install and load copied pack (pull_request) Successful in 48s
Paid OpenRouter / Pinned paid OpenRouter integration (pull_request) Has been skipped
Nix flake / Flake package and clean runtime load (pull_request) Successful in 7m42s
Tree-sitter FFI / Direct SWI-Prolog Tree-sitter FFI (pull_request) Successful in 7m55s
91b170f282
All checks were successful
CI / Deterministic unit and load checks (pull_request) Successful in 2m13s
CI / REAL OpenRouter integration (pull_request) Has been skipped
Clean SWI pack install / Install and load copied pack (pull_request) Successful in 48s
Paid OpenRouter / Pinned paid OpenRouter integration (pull_request) Has been skipped
Nix flake / Flake package and clean runtime load (pull_request) Successful in 7m42s
Tree-sitter FFI / Direct SWI-Prolog Tree-sitter FFI (pull_request) Successful in 7m55s
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin codex/openai-api-provider:codex/openai-api-provider
git switch codex/openai-api-provider

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff codex/openai-api-provider
git switch codex/openai-api-provider
git rebase main
git switch main
git merge --ff-only codex/openai-api-provider
git switch codex/openai-api-provider
git rebase main
git switch main
git merge --no-ff codex/openai-api-provider
git switch main
git merge --squash codex/openai-api-provider
git switch main
git merge --ff-only codex/openai-api-provider
git switch main
git merge codex/openai-api-provider
git push origin main
Sign in to join this conversation.
No description provided.