Skip to content

Commit 1b96815

Browse files
committed
Pass beta features in via the options param instead of a new param.
1 parent 82b33bf commit 1b96815

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/platform/src/Bridge/Anthropic/ModelClient.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function supports(Model $model): bool
3737
return $model instanceof Claude;
3838
}
3939

40-
public function request(Model $model, array|string $payload, array $options = [], array $betaFeatures = []): RawHttpResult
40+
public function request(Model $model, array|string $payload, array $options = []): RawHttpResult
4141
{
4242
$headers = [
4343
'x-api-key' => $this->apiKey,
@@ -48,8 +48,9 @@ public function request(Model $model, array|string $payload, array $options = []
4848
$options['tool_choice'] = ['type' => 'auto'];
4949
}
5050

51-
if (!empty($betaFeatures)) {
52-
$headers['anthropic-beta'] = implode(',', $betaFeatures);
51+
if (isset($options['beta_features']) && !empty($options['beta_features'])) {
52+
$headers['anthropic-beta'] = implode(',', $options['beta_features']);
53+
unset($options['beta_features']);
5354
}
5455

5556

0 commit comments

Comments
 (0)