aKode fase 2b-2: rimosso login ChatGPT e tutti i sottosistemi solo-ChatGPT
- Login: resta solo chiave API (+ header, Bedrock). Rimossi OAuth/browser, device code, refresh/revoke su auth.openai.com, PAT, agent/workload identity, runtime agent instance, backend-client e openapi-models, workspace routing. - Rimossi: generazione immagini (ext + skill imagegen), history notes, plugin remoti (catalogo, sync, share), cyber access program, daybreak, cloud config e requirements (config_server ora fail-closed), attestation, frozen cloud skills, EMA MCP auth, Codex Apps/connettori, ricerca ospitata, header/zstd/ routing/cookie del backend Codex, fallback OPENAI_API_KEY del realtime. - Messaggi d'errore senza link a chatgpt.com. - Chiavi di config legacy accettate e ignorate; feature rimosse = Stage::Removed. - Test: cancellati solo quelli del codice rimosso; test di sicurezza (sandbox estensioni, permessi, redazione, auth storage, requirements) adattati. Restano solo fallimenti d'ambiente (code-mode-host/V8, ~/.agents). - Istruzioni di sistema invariate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,6 @@ use codex_extension_api::ThreadStartInput;
|
||||
use codex_extension_api::ToolContributor;
|
||||
use codex_http_client::HttpClientFactory;
|
||||
use codex_login::AuthManager;
|
||||
use codex_model_provider::WorkspaceRoutingContext;
|
||||
use codex_model_provider_info::ModelProviderInfo;
|
||||
use codex_protocol::config_types::WebSearchContextSize;
|
||||
use codex_protocol::config_types::WebSearchMode;
|
||||
@@ -45,7 +44,6 @@ impl From<&Config> for WebSearchExtensionConfig {
|
||||
fn from(config: &Config) -> Self {
|
||||
Self {
|
||||
provider_supports_search: config.model_provider.is_openai()
|
||||
|| config.model_provider.uses_openai_actor_authorization()
|
||||
|| config.model_provider.supports_standalone_web_search,
|
||||
http_client_factory: config.http_client_factory(),
|
||||
provider: config.model_provider.clone(),
|
||||
@@ -126,9 +124,8 @@ impl ToolContributor for WebSearchExtension {
|
||||
) -> Vec<
|
||||
Arc<dyn for<'call> codex_extension_api::ToolExecutor<codex_extension_api::ToolCall<'call>>>,
|
||||
> {
|
||||
let (Some(config), Some(workspace_routing), Some(mode)) = (
|
||||
let (Some(config), Some(mode)) = (
|
||||
thread_store.get::<WebSearchExtensionConfig>(),
|
||||
thread_store.get::<WorkspaceRoutingContext>(),
|
||||
step_store.get::<WebSearchMode>(),
|
||||
) else {
|
||||
return Vec::new();
|
||||
@@ -141,7 +138,6 @@ impl ToolContributor for WebSearchExtension {
|
||||
.unwrap_or_else(|| {
|
||||
Arc::new(codex_model_provider::ProviderAuthContext {
|
||||
credentials: Arc::clone(&self.auth_manager),
|
||||
runtime_auth: None,
|
||||
})
|
||||
});
|
||||
|
||||
@@ -149,7 +145,6 @@ impl ToolContributor for WebSearchExtension {
|
||||
session_id: session_store.level_id().to_string(),
|
||||
http_client_factory: config.http_client_factory.clone(),
|
||||
provider: auth.model_provider(config.provider.clone()),
|
||||
workspace_routing,
|
||||
settings: SearchSettings {
|
||||
external_web_access: Some(external_web_access_for_mode(*mode)),
|
||||
..config.settings.clone()
|
||||
@@ -174,10 +169,6 @@ pub fn install(registry: &mut ExtensionRegistryBuilder<Config>, auth_manager: Ar
|
||||
registry.tool_contributor(extension);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "routing_tests.rs"]
|
||||
mod routing_tests;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use codex_extension_api::ExtensionData;
|
||||
@@ -186,7 +177,6 @@ mod tests {
|
||||
use codex_http_client::HttpClientFactory;
|
||||
use codex_http_client::OutboundProxyPolicy;
|
||||
use codex_login::CodexAuth;
|
||||
use codex_model_provider::WorkspaceRoutingContext;
|
||||
use codex_model_provider_info::ModelProviderInfo;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
@@ -231,9 +221,6 @@ mod tests {
|
||||
let session_store = ExtensionData::new("session");
|
||||
let thread_store = ExtensionData::new("11111111-1111-4111-8111-111111111111");
|
||||
let step_store = ExtensionData::new("step");
|
||||
thread_store.insert(WorkspaceRoutingContext::new(
|
||||
"https://chatgpt.com/backend-api".to_string(),
|
||||
));
|
||||
step_store.insert(WebSearchMode::Cached);
|
||||
thread_store.insert(WebSearchExtensionConfig {
|
||||
provider_supports_search: true,
|
||||
|
||||
Reference in New Issue
Block a user