agent-zero/plugins/_oauth/default_config.yaml
Alessandro f67564a8ae Add Codex/ChatGPT account OAuth provider
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
2026-04-28 16:14:53 +02:00

33 lines
947 B
YAML

# Generic OAuth connection settings. Only Codex is implemented for now.
codex:
enabled: true
# Empty means auto-discover CODEX_HOME/auth.json, ~/.codex/auth.json,
# CHATGPT_LOCAL_HOME/auth.json, then ~/.chatgpt-local/auth.json.
auth_file_path: ""
issuer: "https://auth.openai.com"
token_url: "https://auth.openai.com/oauth/token"
client_id: "app_EMoamEEZ73f0CkXaXp7hrann"
scopes:
- openid
- profile
- email
- offline_access
- api.connectors.read
- api.connectors.invoke
open_browser_from_server: false
forced_workspace_id: ""
upstream_base_url: "https://chatgpt.com/backend-api/codex"
codex_version: ""
models: []
request_timeout_seconds: 120
# The OpenAI-compatible wrapper is mounted at /oauth/codex/v1.
# It is loopback-only by default and does not emit CORS headers.
proxy_base_path: "/oauth/codex"
callback_path: "/auth/callback"
require_proxy_token: false
proxy_token: ""