mirror of
https://github.com/openai/codex.git
synced 2026-11-13 06:45:07 +00:00
[codex] Add externally provided Codex auth (#31274)
## Summary Add an in-memory externally provided Codex auth snapshot with explicit runtime capabilities, installed through the existing `ExternalAuth` provider path. ## Testing - `just fmt-check` - `cargo test -p codex-login --lib externally_provided_auth` - `cargo test -p codex-core --lib external_auth_snapshot_is_installed_from_runtime_config` - `cargo test -p codex-model-provider --lib external_auth` - `cargo test -p codex-mcp-extension --test hosted_apps_mcp hosted_apps_mcp_accepts_external_provided_codex_auth` - `cargo check -p codex-app-server -p codex-core-api -p codex-thread-manager-sample` --------- Co-authored-by: pakrym-oai <pakrym@openai.com>
This commit is contained in:
1 parent
dbd2df27d1
commit
8784de445e
29 files changed
+278
-7
No files matched your search
@@ -244,6 +244,7 @@ impl ModelProviderInfo {
|
||||
Some(
|
||||
AuthMode::Chatgpt
|
||||
| AuthMode::ChatgptAuthTokens
|
||||
| AuthMode::Headers
|
||||
| AuthMode::AgentIdentity
|
||||
| AuthMode::PersonalAccessToken
|
||||
)
|
||||
|
||||
@@ -148,6 +148,15 @@ fn test_personal_access_token_uses_chatgpt_codex_base_url() {
|
||||
assert_eq!(api_provider.base_url, CHATGPT_CODEX_BASE_URL);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_header_auth_uses_chatgpt_codex_base_url() {
|
||||
let api_provider = ModelProviderInfo::create_openai_provider(/*base_url*/ None)
|
||||
.to_api_provider(Some(AuthMode::Headers))
|
||||
.expect("OpenAI provider should build API provider");
|
||||
|
||||
assert_eq!(api_provider.base_url, CHATGPT_CODEX_BASE_URL);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_supports_remote_compaction_for_azure_name() {
|
||||
let provider = ModelProviderInfo {
|
||||
|
||||
Reference in new issue
Block a user