Skip to content

feat(sandbox): openai model provider authenticates via ChatGPT OAuth (requires_openai_auth)#112

Open
dinghengda-creator wants to merge 1 commit into
volcengine:mainfrom
dinghengda-creator:feat/codex-openai-auth-provider
Open

feat(sandbox): openai model provider authenticates via ChatGPT OAuth (requires_openai_auth)#112
dinghengda-creator wants to merge 1 commit into
volcengine:mainfrom
dinghengda-creator:feat/codex-openai-auth-provider

Conversation

@dinghengda-creator

@dinghengda-creator dinghengda-creator commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Reuses the existing --model-provider / --model-name / --model-base-url path.

When --model-provider is openai, build_codex_config_toml emits requires_openai_auth = true and no env_key, so codex authenticates that provider with the chatgpt oauth token from agentkit sandbox codex-login. --model-name and --model-base-url pass through (base-url can point at a proxy); they default to codex's ChatGPT endpoint and gpt-5-codex. Ark providers (model_square / coding_plan / agent_plan) keep env_key = CODEX_API_KEY.

requires_openai_auth is a ModelProviderInfo field in codex 0.135.

Tests cover the openai case and that Ark providers are unchanged. ruff/mypy pass.

Note: takes effect when the tool is created with --model-provider openai. Serving a turn from a China-region sandbox additionally needs egress to OpenAI via a supported region (codex has CODEX_REFRESH_TOKEN_URL_OVERRIDE for the token refresh).

--model-provider openai now emits requires_openai_auth = true (and no env_key) so codex
authenticates that provider with the injected ChatGPT oauth token instead of an api key.
--model-name and --model-base-url pass through; the model and base_url default to codex's
ChatGPT endpoint. Ark providers (model_square / coding_plan / agent_plan) are unchanged.
@dinghengda-creator dinghengda-creator force-pushed the feat/codex-openai-auth-provider branch from b946538 to a786318 Compare July 1, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant