chore(app-server): document AuthMode (#10191)
Explain what this is and what it's used for.
This commit is contained in:
parent
11958221a3
commit
c6e1288ef1
1 changed files with 10 additions and 0 deletions
|
|
@ -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")]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue