Skip to content

Commit ca3123c

Browse files
committed
Make sure beta_features option is an array
1 parent da0e676 commit ca3123c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ public function request(Model $model, array|string $payload, array $options = []
4848
$options['tool_choice'] = ['type' => 'auto'];
4949
}
5050

51-
if (isset($options['beta_features']) && !empty($options['beta_features'])) {
51+
if (
52+
isset($options['beta_features'])
53+
&& is_array($options['beta_features'])
54+
&& !empty($options['beta_features'])
55+
) {
5256
$headers['anthropic-beta'] = implode(',', $options['beta_features']);
5357
unset($options['beta_features']);
5458
}

0 commit comments

Comments
 (0)