Skip to content

Commit 602afb4

Browse files
committed
fix(OpenAI): update tests and rework code param
1 parent bd2e666 commit 602afb4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Responses/Responses/GenericResponseError.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use OpenAI\Testing\Responses\Concerns\Fakeable;
1010

1111
/**
12-
* @phpstan-type ErrorType array{code: string, message: string}
12+
* @phpstan-type ErrorType array{code: string|int, message: string}
1313
*
1414
* @implements ResponseContract<ErrorType>
1515
*/
@@ -33,7 +33,7 @@ private function __construct(
3333
public static function from(array $attributes): self
3434
{
3535
return new self(
36-
code: $attributes['code'],
36+
code: (string)$attributes['code'],
3737
message: $attributes['message'],
3838
);
3939
}

tests/Fixtures/Responses.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,9 @@ function toolRemoteMcp(): array
544544
'require_approval' => null,
545545
'allowed_tools' => null,
546546
'headers' => null,
547+
'connector_id' => null,
548+
'authorization' => null,
549+
'server_description' => null,
547550
];
548551
}
549552

0 commit comments

Comments
 (0)