Skip to content

Commit 65176c5

Browse files
Merge pull request #22 from carmelosantana/chore_removes-config-support
Removes OpenCLAW config support and fixes Gemini image fallback
2 parents 3727188 + 32dc444 commit 65176c5

File tree

6 files changed

+4
-275
lines changed

6 files changed

+4
-275
lines changed

src/Agent/AbstractAgent.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use CarmeloSantana\PHPAgents\Contract\ToolkitInterface;
1616
use CarmeloSantana\PHPAgents\Enum\FinishReason;
1717
use CarmeloSantana\PHPAgents\Enum\ModelCapability;
18-
use CarmeloSantana\PHPAgents\Exception\ProviderException;
1918
use CarmeloSantana\PHPAgents\Exception\TerminationException;
2019
use CarmeloSantana\PHPAgents\Exception\ToolNotFoundException;
2120
use CarmeloSantana\PHPAgents\Message\AssistantMessage;

src/Config/OpenClawConfig.php

Lines changed: 0 additions & 169 deletions
This file was deleted.

src/Contract/ConfigInterface.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@ public function resolveModel(string $modelOrAlias): string;
3333
*/
3434
public function getPrimaryModel(): string;
3535

36-
/**
37-
* Get fallback model strings, ordered by priority.
38-
*
39-
* @return string[]
40-
*/
41-
public function getFallbacks(): array;
42-
4336
/**
4437
* Get the primary vision/image model.
4538
*/

src/Exception/ConfigNotFoundException.php

Lines changed: 0 additions & 18 deletions
This file was deleted.

tests/Unit/Config/OpenClawConfigTest.php

Lines changed: 0 additions & 80 deletions
This file was deleted.

tests/Unit/Provider/GeminiProviderTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ function mockGeminiResponse(array $overrides = []): MockResponse
183183
test('URL image falls back to text description', function () {
184184
$requestPayload = null;
185185
$mockClient = new MockHttpClient(function (string $method, string $url, array $options) use (&$requestPayload): MockResponse {
186+
if ($method === 'GET') {
187+
// Image download attempt — return 404 to trigger the text fallback
188+
return new MockResponse('', ['http_code' => 404]);
189+
}
186190
$requestPayload = json_decode($options['body'], true);
187191
return mockGeminiResponse();
188192
});

0 commit comments

Comments
 (0)