diff --git a/sandbox/test-batch-google.php b/sandbox/test-batch-google.php index 577ce71..8989cf5 100644 --- a/sandbox/test-batch-google.php +++ b/sandbox/test-batch-google.php @@ -19,6 +19,12 @@ ], ]); $app['config']->set('atlas.persistence.enabled', false); // stateless: exercise the provider API directly +// The Atlas singletons + facade root are resolved in bootstrap before the toggle +// above, so drop them to force a stateless rebuild — otherwise submit() runs in +// tracked mode and returns a BatchJob whose camelCase batchId is null. +$app->forgetInstance(\Atlasphp\Atlas\AtlasConfig::class); +$app->forgetInstance(\Atlasphp\Atlas\AtlasManager::class); +\Atlasphp\Atlas\Atlas::clearResolvedInstances(); use Atlasphp\Atlas\Atlas; use Atlasphp\Atlas\Enums\BatchStatus; diff --git a/sandbox/test-batch-modes.php b/sandbox/test-batch-modes.php index 63e2621..17c5f46 100644 --- a/sandbox/test-batch-modes.php +++ b/sandbox/test-batch-modes.php @@ -62,7 +62,7 @@ function batchFor(string $provider): object } return Atlas::batch('anthropic') - ->add(Atlas::text('anthropic', 'claude-sonnet-4-20250514')->message('Say OK'), key: 'a'); + ->add(Atlas::text('anthropic', 'claude-sonnet-4-5-20250929')->message('Say OK'), key: 'a'); } line('=== Atlas Batch — persistence-modes live audit ==='); diff --git a/sandbox/test-batch.php b/sandbox/test-batch.php index 92065de..e6d62e0 100644 --- a/sandbox/test-batch.php +++ b/sandbox/test-batch.php @@ -111,10 +111,10 @@ function report(string $provider, string $batchId, BatchStatus $status): void line(''); // ── 3. Anthropic text batch ────────────────────────────────────────────────── -line('[3] Anthropic text batch (claude-sonnet-4-20250514, 2 prompts)'); +line('[3] Anthropic text batch (claude-sonnet-4-5-20250929, 2 prompts)'); $anthropic = Atlas::batch('anthropic') - ->add(Atlas::text('anthropic', 'claude-sonnet-4-20250514')->message('Reply with exactly: ALPHA'), key: 'a') - ->add(Atlas::text('anthropic', 'claude-sonnet-4-20250514')->message('Reply with exactly: BETA'), key: 'b'); + ->add(Atlas::text('anthropic', 'claude-sonnet-4-5-20250929')->message('Reply with exactly: ALPHA'), key: 'a') + ->add(Atlas::text('anthropic', 'claude-sonnet-4-5-20250929')->message('Reply with exactly: BETA'), key: 'b'); $anthropicId = batchIdOf($anthropic->submit()); line(" submitted: {$anthropicId}"); $anthropicStatus = pollUntilTerminal('anthropic', $anthropicId);