chore: rename ChatGpt -> Chatgpt in type names (#10244)

When using ChatGPT in names of types, we should be consistent, so this
renames some types with `ChatGpt` in the name to `Chatgpt`. From
https://rust-lang.github.io/api-guidelines/naming.html:

> In `UpperCamelCase`, acronyms and contractions of compound words count
as one word: use `Uuid` rather than `UUID`, `Usize` rather than `USize`
or `Stdin` rather than `StdIn`. In `snake_case`, acronyms and
contractions are lower-cased: `is_xid_start`.

This PR updates existing uses of `ChatGpt` and changes them to
`Chatgpt`. Though in all cases where it could affect the wire format, I
visually inspected that we don't change anything there. That said, this
_will_ change the codegen because it will affect the spelling of type
names.

For example, this renames `AuthMode::ChatGPT` to `AuthMode::Chatgpt` in
`app-server-protocol`, but the wire format is still `"chatgpt"`.

This PR also updates a number of types in `codex-rs/core/src/auth.rs`.
This commit is contained in:
Michael Bolin
2026-01-30 11:18:39 -08:00
committed by GitHub
parent 2d10aa6859
commit e6d913af2d
14 changed files with 55 additions and 55 deletions

View File

@@ -71,7 +71,7 @@ async fn responses_stream_includes_subagent_header_on_review() {
let config = Arc::new(config);
let conversation_id = ThreadId::new();
let auth_mode = AuthMode::ChatGPT;
let auth_mode = AuthMode::Chatgpt;
let session_source = SessionSource::SubAgent(SubAgentSource::Review);
let model_info = ModelsManager::construct_model_info_offline(model.as_str(), &config);
let otel_manager = OtelManager::new(
@@ -169,7 +169,7 @@ async fn responses_stream_includes_subagent_header_on_other() {
let config = Arc::new(config);
let conversation_id = ThreadId::new();
let auth_mode = AuthMode::ChatGPT;
let auth_mode = AuthMode::Chatgpt;
let session_source = SessionSource::SubAgent(SubAgentSource::Other("my-task".to_string()));
let model_info = ModelsManager::construct_model_info_offline(model.as_str(), &config);