mirror of
https://github.com/openai/codex.git
synced 2026-09-13 11:47:17 +00:00
Remove stale try-operator from provider conversion
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -544,7 +544,7 @@ impl ModelClient {
|
||||
let api_provider = self.state.provider.to_api_provider(matches!(
|
||||
auth.as_ref().map(CodexAuth::auth_mode),
|
||||
Some(crate::auth::AuthMode::Chatgpt)
|
||||
))?;
|
||||
));
|
||||
let api_auth = auth_provider_from_auth(auth.clone(), &self.state.provider)?;
|
||||
Ok(CurrentClientSetup {
|
||||
auth,
|
||||
|
||||
@@ -435,7 +435,7 @@ impl ModelsManager {
|
||||
let auth_mode = auth.as_ref().map(CodexAuth::auth_mode);
|
||||
let api_provider = self
|
||||
.provider
|
||||
.to_api_provider(matches!(auth_mode, Some(AuthMode::Chatgpt)))?;
|
||||
.to_api_provider(matches!(auth_mode, Some(AuthMode::Chatgpt)));
|
||||
let api_auth = auth_provider_from_auth(auth.clone(), &self.provider)?;
|
||||
let auth_env = collect_auth_env_telemetry(
|
||||
&self.provider,
|
||||
|
||||
@@ -348,7 +348,7 @@ pub(crate) async fn handle_start(
|
||||
let provider = sess.provider().await;
|
||||
let auth = sess.services.auth_manager.auth().await;
|
||||
let realtime_api_key = realtime_api_key(auth.as_ref(), &provider)?;
|
||||
let mut api_provider = provider.to_api_provider(/*use_chatgpt_base_url*/ false)?;
|
||||
let mut api_provider = provider.to_api_provider(/*use_chatgpt_base_url*/ false);
|
||||
let config = sess.get_config().await;
|
||||
if let Some(realtime_ws_base_url) = &config.experimental_realtime_ws_base_url {
|
||||
api_provider.base_url = realtime_ws_base_url.clone();
|
||||
|
||||
Reference in New Issue
Block a user