Replace loopback trust with an internal process credential supplied automatically to local account-model calls. Keep configured external proxy tokens and deny tokenless requests from every source address.
Finalize local proxy credentials after model defaults are merged so legacy stored keys, inline keys, additional parameters and auth headers work without changing saved settings or account connections. Limit replacement to this process's loopback WebUI port and provider proxy path, preserving explicit credentials for other endpoints.
Keep the internal credential in the stable framework runtime module so plugin reloads do not invalidate existing model clients. No saved credential or configuration migration is required.
Isolate proxy tests from saved accounts and plugin toggles. Cover all account providers, disconnected state, custom ports, external endpoint credentials, public hostnames, forwarded headers, OAuth callback accessibility and real SDK HTTP streaming. Document the intentional requirement for external clients that previously relied on tokenless loopback trust.
Validation: 643 focused framework tests passed with 3 expected failures for two pre-existing backup/A2A issues, plus 52 isolated host checks and the OAuth UI regression. A live Codex Responses call using the existing account after plugin reload returned OK; saved credentials and configuration remained byte-for-byte unchanged.
Suggest gpt-6.1-terra for Main and gpt-6-luna for Utility through Codex
provider metadata, while preserving explicit model lists and the live
account catalog.
Change the final onboarding action to Continue and close the wizard without
creating another chat. The existing model-gate event resumes the held message
in its original chat. Update the onboarding guide and ready-screen capture.
Add regressions for recommended and explicit model selection, configured
catalog order, held-message dispatch and completion without a pending chat.
Validation: 244 focused Python tests, three onboarding Node tests and the
OAuth reconnect check passed. Verified on the dedicated instance that
Continue closes the wizard and preserves the selected chat and chat list.
Handle rejected Codex refresh tokens with a clear authentication error and
an actionable toast that opens OAuth settings. Stop retrying marked tokens
and offer Reconnect without requiring a manual disconnect; successful
sign-in replaces credentials while cancellation preserves model choices.
Display device challenge codes in a selectable box with an accessible copy
button and success/error feedback. Keep recovery behavior inside _oauth
and document the connection lifecycle.
Validation: 221 Python checks and the Node frontend regression passed.
Verified recovery navigation, reconnect cancellation, clipboard copying,
keyboard access, and desktop/mobile layouts at localhost:32081 using
simulated OAuth responses.
request_codex opened a new TCP and TLS connection to the Codex
backend for every main and utility model call. Send through a
module-level keep-alive requests.Session with cookie persistence
disabled, so each request still carries only its explicit headers.
Point the request-header test stub at the session and document the
contract.
Validation: 246 OAuth, model-config, onboarding and plugin-contract
tests passed with this change alone on the original base in the
Docker framework runtime. Earlier container measurements showed
connection reuse saving 50-80 ms per chatgpt.com request.
Pin the default Codex client version to 0.155.1 for upstream request
headers and model discovery.
Close upstream SSE responses when the Flask response closes, including
unread responses, cancellation, completion, and read errors. Apply cleanup
in the shared OAuth streaming helper and document its lifecycle contract.
Add regression coverage for all four closure paths, update the Copilot
streaming test stub, and isolate provider metadata tests from user config.
Validation: 275 OAuth, Responses, history, and plugin-scan tests passed;
all four cleanup cases also passed in the live framework runtime. Live
synthetic repeated requests reused 3,840 of 4,624 input tokens.
Translate reported Responses token counts and details into Chat usage fields.
Honor include_usage with a terminal empty-choices chunk, and request it by
default for Codex main-model Chat calls while preserving explicit options.
Forward failures, retain incomplete finish reasons, reject premature stream
termination and close the upstream stream on completion or cancellation.
Keep Responses requests and proxy access controls unchanged.
Verified 211 broader tests plus 17 final focused Chat checks. A Docker framework
bridge probe preserved captured Codex usage exactly through Context window
accounting; the restarted runtime is healthy. No preset was changed to test
the Codex Chat compatibility endpoint.
Keep session and thread IDs stable per chat and agent, preserve caller metadata through both proxy routes, and derive bounded default cache keys from caller-supplied sessions without replacing explicit keys.
Default Codex to local Responses state to avoid the rejected store=true probe while retaining native tool calls.
Validation: 274 focused tests passed in a clean checkout. Live WebUI checks showed 64-65% completed-turn cache hits and four successful upstream requests for two terminal-and-response turns.
Preserve completed SSE output items when the final Codex response envelope omits them so non-streaming utility calls retain their generated text. Add focused regression coverage for the native output-item path.
Keep generic Responses tool schemas provider-neutral and apply the strict text-only response contract at the Codex OAuth request boundary.
Preserve tool-policy filtering by tightening only an already-advertised response tool, with focused regression coverage for both generic and Codex paths.
Expose reasoning effort, reasoning summary, and answer verbosity in the Codex OAuth provider card, defaulting effort to high.\n\nNormalize provider settings and apply them to Responses requests without overriding explicit request values.
Normalize the legacy reasoning_effort field at the Codex Responses proxy boundary so it cannot reach the upstream endpoint in an unsupported shape.
Preserve an explicit native reasoning object and cover alias conversion and precedence with regression tests.
Ensure the Codex OAuth Responses proxy forwards list-shaped input for empty continuation turns while preserving string prompts as user input items. Add regression coverage for the gpt-5.5 continuation case and document the proxy contract.
Send current Codex client metadata and compatibility headers on proxied Responses requests so ChatGPT OAuth calls pass upstream call checks.
Return Codex model slugs as the primary list while preserving model metadata for descriptions in the OAuth settings UI.
Stop seeding stale Codex OAuth model metadata so connected accounts use the upstream /models response instead of the retired gpt-5.2-codex default.
Use gpt-5.5 as the Codex proxy fallback model, omit the fake legacy client version when Codex CLI is unavailable, and remove the stale Copilot fallback entry.
Add focused OAuth regressions for the current default model, upstream model-list behavior, and Copilot fallback ordering.
Rename the Gemini OAuth provider surface to Google Cloud Gemini so the OAuth provider list points users toward the required Google Cloud project setup.
Align model-provider metadata, usage-plan copy, README wording, and static assertions while keeping the Gemini API OAuth mechanics unchanged.
Add a shared provider-registry-backed OAuth status summary for the status API and discovery cards. Redesign the OAuth settings modal around provider rows, inline usage, provider details, and account-backed model slots while keeping legacy Codex compatibility fields intact.
Convert Chat Completions image_url content parts into Responses API input_image parts instead of normalizing multimodal messages down to text.
Keep text-only content lists as plain text and add OAuth bridge regression tests for image passthrough.
Allow users to disconnect their OpenAI account by clearing stored ChatGPT OAuth tokens while preserving unrelated auth data.
Fetch and normalize Codex usage windows, then show remaining percentage and reset timing in the OAuth settings UI.
Add focused tests for usage parsing and disconnect cleanup.
Decode byte chunks from the live Codex/ChatGPT account SSE stream before parsing events.
Preserve accumulated output_text deltas when the final response.completed object is present but has no extractable output content.
Update the OAuth tests to cover byte-delivered SSE chunks and empty completed responses.
Create a generic OAuth Connections plugin with Codex/ChatGPT Account as the first provider, using OpenAI's device-code flow to persist Codex-compatible account tokens.
Expose a loopback OpenAI-compatible wrapper for models, responses, and chat completions, and point LiteLLM at the container-local Agent Zero origin.
Add a dummy API-key extension and focused tests so the account-backed provider appears configured without requiring a user-entered key.
docs: add Codex plan OAuth callout
Highlight that Agent Zero can use an existing OpenAI Codex plan through the new OAuth flow.
Add the account-backed LLM plans image and surface the section from the README navigation, while pointing toward future Gemini CLI and Claude Code integrations.
Handle Codex account SSE chat chunks
Teach the Codex/ChatGPT account bridge to extract text from OpenAI-style SSE chat completion deltas and fall back to a normal output_text response when upstream only streams chunks.
Strip user-supplied stream kwargs before LiteLLM calls so Agent Zero owns streaming mode and custom parameters cannot pass stream twice.
Add targeted tests for streamed delta extraction and reconstructed responses.
update README.md with LLM plans mention