WIP fase 2b-2: rimosso login ChatGPT/OAuth/device code, agent/workload identity, backend-client; resta solo chiave API (test non tutti verdi)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -310,7 +310,7 @@ async fn remote_compact_v2_retains_metadata_from_resumed_history() -> Result<()>
|
||||
)
|
||||
.await;
|
||||
|
||||
let builder = || test_codex().with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing());
|
||||
let builder = || test_codex().with_auth(CodexAuth::from_api_key("Test API Key"));
|
||||
let initial = builder()
|
||||
.with_pre_build_hook(|home| {
|
||||
fs::write(
|
||||
@@ -366,7 +366,7 @@ async fn remote_compact_v2_retains_only_client_developer_messages_when_enabled(
|
||||
|
||||
let harness = TestCodexHarness::with_auto_env_builder(
|
||||
test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_auth(CodexAuth::from_api_key("Test API Key"))
|
||||
.with_config(move |config| {
|
||||
if enabled {
|
||||
config
|
||||
@@ -455,7 +455,7 @@ async fn remote_compact_v2_records_usage_before_output_validation() -> Result<()
|
||||
|
||||
let harness = TestCodexHarness::with_auto_env_builder(
|
||||
test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_auth(CodexAuth::from_api_key("Test API Key"))
|
||||
.with_config(|config| {
|
||||
config.model_auto_compact_token_limit = Some(200);
|
||||
}),
|
||||
@@ -682,7 +682,7 @@ async fn remote_compact_v2_charges_retained_images_to_token_budget(
|
||||
|
||||
let harness = TestCodexHarness::with_auto_env_builder(
|
||||
test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_auth(CodexAuth::from_api_key("Test API Key"))
|
||||
.with_config(move |config| {
|
||||
let _ = config.features.enable(Feature::UnifiedImageBudget);
|
||||
if let Some(enabled) = image_budget_enabled {
|
||||
@@ -874,7 +874,7 @@ async fn remote_compact_v2_budgets_persisted_file_audio_atomically(
|
||||
) -> Result<()> {
|
||||
skip_if_no_network!(Ok(()));
|
||||
let builder = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_auth(CodexAuth::from_api_key("Test API Key"))
|
||||
.with_config(|config| {
|
||||
config
|
||||
.features
|
||||
@@ -1023,7 +1023,7 @@ async fn remote_compact_v2_reuses_compaction_trigger_for_followups() -> Result<(
|
||||
skip_if_no_network!(Ok(()));
|
||||
|
||||
let harness = TestCodexHarness::with_builder(
|
||||
test_codex().with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing()),
|
||||
test_codex().with_auth(CodexAuth::from_api_key("Test API Key")),
|
||||
)
|
||||
.await?;
|
||||
let image_url = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNgYAAAAAMAASsJTYQAAAAASUVORK5CYII=";
|
||||
@@ -1400,7 +1400,7 @@ async fn remote_compact_v2_retries_failures_with_stream_retry_budget() -> Result
|
||||
let harness = TestCodexHarness::with_builder(
|
||||
test_codex()
|
||||
.with_history_mode(ThreadHistoryMode::Paginated)
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_auth(CodexAuth::from_api_key("Test API Key"))
|
||||
.with_config(|config| {
|
||||
config.model_provider.request_max_retries = Some(0);
|
||||
config.model_provider.stream_max_retries = Some(2);
|
||||
@@ -1519,7 +1519,7 @@ async fn remote_compact_v2_rewrites_multiple_trailing_function_call_outputs(
|
||||
let harness = TestCodexHarness::with_builder(
|
||||
test_codex()
|
||||
.with_extensions(Arc::new(extensions.build()))
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_auth(CodexAuth::from_api_key("Test API Key"))
|
||||
.with_config(|config| {
|
||||
config.model_context_window = Some(2_000);
|
||||
config.model_auto_compact_token_limit = Some(200_000);
|
||||
@@ -1740,7 +1740,7 @@ async fn remote_mid_turn_compact_v2_sends_turn_state_over_http() -> Result<()> {
|
||||
|
||||
let harness = TestCodexHarness::with_builder(
|
||||
test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_auth(CodexAuth::from_api_key("Test API Key"))
|
||||
.with_config(|config| {
|
||||
config.model_auto_compact_token_limit = Some(200);
|
||||
}),
|
||||
@@ -1868,7 +1868,7 @@ async fn remote_mid_turn_compact_v2_sends_turn_state_over_websocket() -> Result<
|
||||
]])
|
||||
.await;
|
||||
let mut builder = test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
.with_auth(CodexAuth::from_api_key("Test API Key"))
|
||||
.with_config(|config| {
|
||||
config.model_auto_compact_token_limit = Some(200);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user