mirror of
https://github.com/openai/codex.git
synced 2026-02-01 22:47:52 +00:00
chore(app-server): document AuthMode (#10191)
Explain what this is and what it's used for.
This commit is contained in:
@@ -23,12 +23,22 @@ impl GitSha {
|
||||
}
|
||||
}
|
||||
|
||||
/// Authentication mode for OpenAI-backed providers.
|
||||
///
|
||||
/// This is used internally to determine the base URL for generating responses, and to gate
|
||||
/// ChatGPT-only behaviors like rate limits and available models (as opposed to API key-based
|
||||
/// auth).
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, Display, JsonSchema, TS)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum AuthMode {
|
||||
/// OpenAI API key provided by the caller and stored by Codex.
|
||||
ApiKey,
|
||||
/// ChatGPT OAuth managed by Codex (tokens persisted and refreshed by Codex).
|
||||
ChatGPT,
|
||||
/// [UNSTABLE] FOR OPENAI INTERNAL USE ONLY - DO NOT USE.
|
||||
///
|
||||
/// ChatGPT auth tokens are supplied by an external host app and are only
|
||||
/// stored in memory. Token refresh must be handled by the external host app.
|
||||
#[serde(rename = "chatgptAuthTokens")]
|
||||
#[ts(rename = "chatgptAuthTokens")]
|
||||
#[strum(serialize = "chatgptAuthTokens")]
|
||||
|
||||
Reference in New Issue
Block a user