Skip to content

Conversation

RamyHakam
Copy link
Contributor

…lementations

Q A
Bug fix? yes
New feature? no
Docs? no
Issues Fix #326
License MIT

Issue
The ModelClientInterface allows array|string $payload, but all implementations use array_merge($payload, $options) without type checking, causing fatal errors when string payloads are passed.

Fix
Remove unnecessary string support from the interface since all implementations expect arrays:

@carsonbot carsonbot added Bug Something isn't working Status: Needs Review labels Aug 18, 2025
@carsonbot carsonbot changed the title Fix array_merge() fatal error with string payloads in ModelClient imp… Fix array_merge() fatal error with string payloads in ModelClient imp… Aug 18, 2025
@chr-hertel
Copy link
Member

This breaks some huggingface examples, and embeddings - for example for openai.

Let's discuss in #326 first

@OskarStark OskarStark added the Platform Issues & PRs about the AI Platform component label Aug 24, 2025
@carsonbot carsonbot changed the title Fix array_merge() fatal error with string payloads in ModelClient imp… [Platform] Fix array_merge() fatal error with string payloads in ModelClient imp… Aug 24, 2025
@OskarStark OskarStark changed the title [Platform] Fix array_merge() fatal error with string payloads in ModelClient imp… [Platform] Fix fatal error with string payloads Aug 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Platform Issues & PRs about the AI Platform component Status: Needs Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Platform] Fatal Error: array_merge() called with string payload in ModelClient implementations
4 participants