Skip to content

[Platform] Update model catalogs - #1

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
automation/update-model-catalogs
Open

[Platform] Update model catalogs#1
github-actions[bot] wants to merge 1 commit into
mainfrom
automation/update-model-catalogs

Conversation

@github-actions

Copy link
Copy Markdown
Q A
Bug fix? no
New feature? yes
Docs? no
Issues -
License MIT

Automated refresh of the bridge ModelCatalog static lists from upstream metadata
(models.dev for per-provider bridges, the OpenRouter API for OpenRouter).

New models are appended; hand-curated entries are left untouched. Review the diff
before merging, and adjust capabilities or model classes where the heuristics need
a human.

@github-actions
github-actions Bot force-pushed the automation/update-model-catalogs branch 2 times, most recently from 0d0bab3 to 7e08141 Compare July 13, 2026 09:19
@github-actions
github-actions Bot force-pushed the automation/update-model-catalogs branch from 7e08141 to 72eb8df Compare July 20, 2026 08:52
chr-hertel added a commit that referenced this pull request Jul 21, 2026
…ty search metadata (chr-hertel)

This PR was merged into the main branch.

Discussion
----------

[Examples] Fix Perplexity examples crashing on empty search metadata

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| Docs?         | no
| Issues        | -
| License       | MIT

The Perplexity examples threw a `TypeError` (`print_search_results(): Argument #1 must be of type array, null given`) whenever the API returned no `search_results`/`citations`.

- `web-search.php` never demonstrated anything: `search_domain_filter` used a full URL (`https://en.wikipedia.org/wiki/Cheese`) where Perplexity expects a bare domain, and `search_recency_filter => week` narrowed it to zero. Switched to `wikipedia.org` + `month` so it returns real Wikipedia-filtered results.
- The image/PDF (and other) examples legitimately get no search results when analyzing supplied media — defaulted the metadata lookups to `[]` so they print "No search results" instead of crashing.

Commits
-------

7e94e69 [Examples] Fix Perplexity examples crashing on empty search metadata
chr-hertel added a commit that referenced this pull request Jul 21, 2026
…esults (janssensglenn)

This PR was merged into the main branch.

Discussion
----------

[Chat] Fix TypeError in Chat::submit() on non-text results

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| Docs?         | no
| Issues        | Fix symfony#2146
| License       | MIT

`Chat::submit()` assumed the agent always returns a `TextResult`:

```php
\assert($result instanceof TextResult);
$assistantMessage = Message::ofAssistant($result->getContent());
```

The `\assert()` is a no-op in production (`zend.assertions=-1`), so it never guarded
anything. When the agent returns a `MultiPartResult` — for example a reasoning/thinking
part plus the answer text, as OpenAI Responses reasoning models produce — `getContent()`
returns an array, and the variadic `Message::ofAssistant()` rejects it:

```
Message::ofAssistant(): Argument #1 must be of type
ContentInterface|ResultInterface|string, array given
```

This surfaced as an intermittent `TypeError`, only on turns where the model emitted a
multi-part response.

### Fix

`Message::ofAssistant()` already accepts a `ResultInterface` and maps every result type
recursively via `Message::toContent()` — `TextResult`, `ThinkingResult`, `ToolCallResult`,
`MultiPartResult`, etc. So the fix is to pass the result object straight through and drop
the `TextResult`-only assumption:

```diff
-        \assert($result instanceof TextResult);
-
-        $assistantMessage = Message::ofAssistant($result->getContent());
+        $assistantMessage = Message::ofAssistant($result);
```

The now-unused `TextResult` import is removed. The metadata merge on the next line is
unaffected (`ResultInterface extends MetadataAwareInterface`), and the existing
`TextResult` path is preserved by `toContent()`.

No test changes: multi-part unwrapping is `Message::toContent()`'s responsibility (covered
in the Platform component), not `Chat`'s — `Chat` contains no multi-part logic. The
existing `ChatTest` coverage of `submit()`'s contract continues to pass.

Commits
-------

94f56b5 [Chat] Fix TypeError in Chat::submit() on non-text results
@github-actions
github-actions Bot force-pushed the automation/update-model-catalogs branch 2 times, most recently from ad25349 to 4ec40fa Compare August 3, 2026 09:37
@github-actions
github-actions Bot force-pushed the automation/update-model-catalogs branch from 4ec40fa to caf8b6a Compare August 10, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants